Windows WMI Perfmon Monitor

Document created by Srikant Noorani Employee on Jul 10, 2015Last modified by Srikant Noorani Employee on Jul 10, 2015
Version 3Show Document
  • View in full screen mode

Hi

if you need to collect windows wmi metrics and publish it to EM through EPAgent you will find the attached plugin helpful. This plugin runs as a statefull epagent that continuously queries for WMI metrics. The WMI metrics can be specified using the XML file. The xml gives you lot of flexibility by allowing you to specify data type, multiple instance of the counter etc. With the ability to specify data type it gives lot flexibility in aggregation.

 

Here is a sample wmi counter that you can specify in xml file

 

<Metrics>

  <Metric>

  <WilyResourceName>Disk</WilyResourceName>

  <InstanceNames>C:;_Total</InstanceNames>

  <WilyMetricName>% Free Space</WilyMetricName>

  <WilyDataType>LongCounter</WilyDataType>

  <CounterPath>\LogicalDisk(*)\% Free Space</CounterPath>

  <Description>Windows disk metric with multiple instances</Description>

  </Metric>

  <Metric>

  .....

 

 

The plugin is written in Powershell.

 

deploy the agent under c:\EPAgent and make following changes to properties file

 

introscope.epagent.plugins.stateful.names=POWERSHELL

introscope.epagent.stateful.POWERSHELL.command=powershell -File C:\\EPAgent\\epaplugins\\windows\\WMI\\WindowsEPAPlugin.ps1

 

its been tested for 9.5,9.6,9.7

 

If you find any issue pls make changes and upload it for others benefit

 

Hope you find it useful

 

thanks

Attachments

Outcomes