-
Incident report
-
Resolution: Unresolved
-
Trivial
-
None
-
None
-
- Zabbix 2.2.7
- Monitored client OS: Windows Server 2012 R2
Phenomenon:
In zabbix_agent for Windows, the performance data is acquired by using the performance data helper (PDH) of Windows API.
But we have encountered unstable error cases as below.
The function that caused the error this time is "PdhLookupPerfNameByIndex ()" function, as has been recorded in the agentd.log.
In this case, only "perf_count((_Total)% Processor Time)" item becomes a non-acquisition state until the next zabbix_agent restart, but the other items can be acquired correctly.
It seemed that this error is a phenomenon seen only immediately after start-up of Windows OS.
Recorded messages are as below.
<<<<< info#1 "agentd.log" messages
2900:20160211:041920.803 Starting Zabbix Agent [xxxxxxxx.xx.xxx.xx.xx]. Zabbix 2.2.7-1 (revision 50148).
2900:20160211:041920.803 using configuration file: C:\Program Files\ZABBIX Agent\zabbix_agentd.conf
2964:20160211:041920.803 agent #0 started [collector]
2968:20160211:041920.803 agent #1 started listener #1
2976:20160211:041920.803 agent #3 started listener #3
2980:20160211:041920.803 agent #4 started active checks #1
2972:20160211:041920.803 agent #2 started listener #2
2964:20160211:041949.334 PdhLookupPerfNameByIndex() failed: [0x800007D0] Unable to connect to the specified computer or the computer is offline."
2964:20160211:041949.584 cannot add performance counter ""\UnknownPerformanceCounter(_Total)% Processor Time"": invalid format
>>>>> info. #1
Our survey result:
I have checked related case by Internet, then found some similar phenomenon as below.
Please refer to the following URLs.
<<<<< info. #2
"First call to Windows Performance Counters (PDH) sometimes fails"
<http://stackoverflow.com/questions/4441896/first-call-to-windows-performance-counters-pdh-sometimes-fails>
>>>>> info. #2
Also, the JAPAN Platform SDK (Windows SDK) Support Team Blog reported this problem formally as below.
But, it seemed that this page is Japanese only. I will explain the summary of this page in English as info.#3.
<<<<< info. #3
"It may not be possible to acquire the performance information in the PDH or Registry function"
phenomenon
If any of the following methods on the application at system startup tries to acquire performance information, there is a case where the information to be expected cannot be obtained.
- To use the PDH (Performance Data Helper) function
- To use the Registry function (specify the HKEY_PERFORMANCE_DATA in RegQueryValueEx function)
Cause
Windows OS will perform the initialization process related to performance information in the system start-up timing. At that time, information for managing the performance information will be created once in the registry, but the information does not get in if the acquisition of performance information was requested at this timing.
Workaround
It will be the supposed operation for the Windows OS that the initialization process for the performance information is executed while system startup. For this reason, if you want to get the performance information at the system startup timing, you must to confirm the presence or absence of the above Updating entry, and please take an appropriately adjustment at the call timing of the PDH function or the RegQueryValueEx function.
>>>>> info. #3
Our Suggestion:
Above info.#3 Workaround shows that this issue will be cleared by call timing adjustment.
Please consider the code change, in case of an error in the “PdhLookupPerfNameByIndex” function to get performance data correctly.
It means that some wait and retry logic change would be required.
Regards,
- is duplicated by
-
ZBX-11699 [0xC0000BBD] A required argument is missing or not correct.
-
- Closed
-