-
Notifications
You must be signed in to change notification settings - Fork 708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performancecounter: fails if one or more following counters fail (failed to collect data: performance counter not initialized) #1807
Comments
Exclude separate counter is not possible by design. However, it possible to ignore failed object block definition (once integrated). In that case, you have to declare separate blocks for optional counters. Should be an issue to declare Bitlocker multiple times. [{
"object": "BitLocker",
"instances": [
"*"
],
"instance_label": "Laufwerk",
"counters": [
{
"name": "Write Requests/sec",
"type": "counter"
}
]
},{
"object": "BitLocker",
"instances": [
"*"
],
"instance_label": "Laufwerk",
"counters": [
{
"name": "Write Subrequests/sec",
"type": "counter"
}
]
}]
I will add an new property named "name" that end-users can define as they would. Since objects can be defined multiple times, I need some more unique property. |
That is the trade-off from #1748 where the exporter should not log spam. The error are logged as error on application start once. But based and your feedback and feedback from users, I will raise it again to warn. That |
Current findings are implemented and solved via #1809 |
Current Behavior
windows_exporter 0.32.0-rc-2
If I configure performancecounters, e.g. Memory, Bitlocker and "User Input Delay per Session" and e.g. BitLocker fails then the following "User Input Delay per Session" performancecounter is skipped.
This is my config file:
Szenario A:
time=2024-12-06T11:03:32.191+01:00 level=DEBUG source=collect.go:213 msg="collector performancecounter failed after 0s, resulting in 1 metrics" err="failed to collect data: performance counter not initialized"
Scenario B:
Expected Behavior
The failing counter should be skipped and other working counters should collect metrics. After the failing one the other counters should not stop working. A proper error message should be generated (look at 2.)
The error message is only visible if "DEBUG" log level is set. From the message itself it looks like it should be level=error. If possible the failing counter Name (object) should be listet to indicate which one failed.
time=2024-12-06T11:03:32.191+01:00 level=DEBUG source=collect.go:213 msg="collector performancecounter failed after 0s, resulting in 1 metrics" err="failed to collect data: performance counter not initialized"
The collector_success metric is "0" if one performancecounter failed (Memory, Bitlocker worked; the other failed). This may be misleading if we only skip the failing one and proceed all others as suggested in (1.). So we need to take care that this metric represents the correct information.
As performance counters are custom and some can work and others not it maybe it would be and idea to add a separate label for each of the "objects" defined in performance counter.
e.g.
windows_exporter_collector_success{collector="performancecounter",object="Memory"} 1
windows_exporter_collector_success{collector="performancecounter",object="BitLocker"} 1
windows_exporter_collector_success{collector="performancecounter",object="User Input Delay per Session"} 0
This would result in additional metrics like "timeout" and "duration" for each of these "objects".
Maybe would help to identify which counter failed and which other counters are heavy and need long time to be processed.
CPU and memory collectors have individual metrics for success and duration.
different performancecounters could be treated the same way.
Steps To Reproduce
Environment
windows_exporter logs
Anything else?
No response
The text was updated successfully, but these errors were encountered: