mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Fix check_perfmon to support non-localized names
This fixes check_perfmon to support non-localized names on localized Windows machines. The fix handles the given performance counter by default as non-localized name, if none is found it falls back to the localized name. refs #5546 (cherry picked from commit 5da4fbde3b501c174ec028b7a7ae036194a5a77e)
This commit is contained in:
parent
2fdc1ccd7a
commit
60bc79ffa2
@ -297,7 +297,11 @@ bool QueryPerfData(printInfoStruct& pI)
|
||||
if (FAILED(status))
|
||||
goto die;
|
||||
|
||||
status = PdhAddCounter(hQuery, pI.wsFullPath.c_str(), NULL, &hCounter);
|
||||
status = PdhAddEnglishCounter(hQuery, pI.wsFullPath.c_str(), NULL, &hCounter);
|
||||
|
||||
if (FAILED(status))
|
||||
status = PdhAddCounter(hQuery, pI.wsFullPath.c_str(), NULL, &hCounter);
|
||||
|
||||
if (FAILED(status))
|
||||
goto die;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user