You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Application pools configured with "No Managed Code" are for applications that do not use .NET's CLR (Common Language Runtime), such as PHP or native applications.
In this case, the .NET CLR counters such as Exceptions will not be associated with the w3wp process because those counters are specific to managed code environments. This leads to errors being thrown in the logs by metricbeat.
The goal of this issue is to bypass errors for those specific environments for counters, such as:
Element not found.failed to expand counter path (query= "%v")\.NET CLR Exceptions(w3wp*)\# of Finallys / sec
Element not found.failed to expand counter path (query= "%v")\.NET CLR Exceptions(w3wp*)\# of Exceps Thrown / sec
Element not found.failed to expand counter path (query= "%v")\.NET CLR Exceptions(w3wp*)\# of Exceps Thrown
Element not found.failed to expand counter path (query= "%v")\.NET CLR Exceptions(w3wp*)\# of Filters / sec
Element not found.failed to expand counter path (query= "%v")\.NET CLR Exceptions(w3wp*)\Throw To Catch Depth / sec
The text was updated successfully, but these errors were encountered:
so back in GetCounterPaths there is no check for PdhErrno(syscall.ERROR_NOT_FOUND) error. Which results in Element not found. being logged.
The main question here is why PdhErrno(syscall.ERROR_NOT_FOUND) error is returned from ExpandWildCardPath and not one of PDH_CSTATUS_NO_COUNTER, PDH_CSTATUS_NO_COUNTERNAME, PDH_CSTATUS_NO_INSTANCE, PDH_CSTATUS_NO_OBJECT when there is no such counter? I'm not sure I have a good answer since I'm not really familiar with windows and .NET but it seems to me that the counter itself exists but has no data for w3wp process. And that is why syscall to PDH (specifically https://learn.microsoft.com/en-us/windows/win32/api/pdh/nf-pdh-pdhexpandwildcardpathw) doesn't return an error but also doesn't return any data.
I suggest adding a check for PdhErrno(syscall.ERROR_NOT_FOUND) error in this condition. I've tried doing so - Element not found.f logs go away.
P.S I'm not sure I've done a great job explaining everything so feel free to ask questions
Application pools configured with "No Managed Code" are for applications that do not use .NET's CLR (Common Language Runtime), such as PHP or native applications.
In this case, the .NET CLR counters such as Exceptions will not be associated with the w3wp process because those counters are specific to managed code environments. This leads to errors being thrown in the logs by metricbeat.
The goal of this issue is to bypass errors for those specific environments for counters, such as:
The text was updated successfully, but these errors were encountered: