Bug 756148

Summary: Plug-ins using Windows Performance Data Helper API via Sigar fail to collect metrics on non-English systems
Product: [Other] RHQ Project Reporter: Larry O'Leary <loleary>
Component: PluginsAssignee: Nobody <nobody>
Status: CLOSED EOL QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3CC: hbrock, hrupp, watchasiandramacool
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-16 07:21:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Larry O'Leary 2011-11-22 20:09:29 UTC
Description of problem:
Metrics are not collected for resources on Windows that rely on metric data from Windows Performance Data Helper (PDH) API when the operating system language is something other then English. 

For example, an IIS resource on a Windows host:

Language............1046:Portuguese (Brazil)
Perflib lang id.....016

Contains the following messages in the agent log:
WARN  [MeasurementManager.collector-1] (rhq.core.pc.measurement.MeasurementCollectorRunner)- Failure to collect measurement data for Resource[id=10105, type=IIS, key=C:\WINNT\System32\inetsrv\inetinfo.exe, name=IIS, parent=myplatform.example.com, version=5.0], requests=[ScheduledMeasurementInfo[res=10105, name=Total Get Requests, sched=13824], ScheduledMeasurementInfo[res=10105, name=Bytes Sent/sec, sched=13802], ScheduledMeasurementInfo[res=10105, name=Current Connections, sched=13819], ScheduledMeasurementInfo[res=10105, name=Bytes Received/sec, sched=13804]], report.size()=11

org.hyperic.sigar.win32.Win32Exception: The specified object could not be found on the computer

	at org.hyperic.sigar.win32.Pdh.pdhAddCounter(Native Method)

	at org.hyperic.sigar.win32.Pdh.getValue(Pdh.java:294)

	at org.hyperic.sigar.win32.Pdh.getRawValue(Pdh.java:202)

	at org.rhq.plugins.iis.IISServerComponent.getValues(IISServerComponent.java:88)

	at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.lang.reflect.Method.invoke(Unknown Source)

	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)

	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

	at java.util.concurrent.FutureTask.run(Unknown Source)

	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

	at java.lang.Thread.run(Unknown Source)


Version-Release number of selected component (if applicable):
3.0.1

Additional info:
This is due to how Windows PDH stores these performance metric names and how Sigar queries them. See http://support.microsoft.com/kb/287159 for more details.

Comment 1 Ian Springer 2011-11-29 19:32:29 UTC
SIGAR supposedly added support for using the English names for PDH metrics on non-English systems way back in SIGAR 1.4.0 (2007)...

https://jira.hyperic.com/browse/SIGAR-29

Looks like a bit more debugging may be needed to see if this is a SIGAR issue, an issue in the way we are using SIGAR, or something else like a new version of IIS that changed the PDH metric names.