-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
perfmon - remove negative counter value errors from the event output #18361
Conversation
Pinging @elastic/integrations (Team:Integrations) |
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me. Left only some minor comments.
…lastic#18361) * handle errors * update changelog * fix tests * address review (cherry picked from commit 89a4f3a)
…lastic#18361) * handle errors * update changelog * fix tests * address review (cherry picked from commit 89a4f3a)
What does this PR do?
PDH_CALC_NEGATIVE_VALUE
andPDH_INVALID_DATA
type errors from the event outputcstatus
value in the debug informationWhy is it important?
When collecting a high number of counters values seems that for specific processes the counter values retrieved are negative and the win32 api returns the error:
0x800007D8 (PDH_CALC_NEGATIVE_VALUE) | A counter with a negative value was detected.
or
0xC0000BC6 (PDH_INVALID_DATA) | The data is not valid.
with cstatus0xC0000BBA (PDH_CSTATUS_INVALID_DATA) | The returned data is not valid.
Which means the counter was successfully found, but the data returned is not valid. This error can occur if the counter value is less than the previous value. (Because counter values always increment, the counter value rolls over to zero when it reaches its maximum value.) Another possible cause is a system timer that is not correct.
These errors do not cause the application to run unsuccessfully and the following calls return a positive value.
These types of errors are still logged as debug messages.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Create a perfmon configuration with a high number of perfmon counters including
Process
object counters since the errors are encountered only at that level and run the perfmon metricset with a small interval.Related issues
Logs