Windows Performance Monitoring in Zenoss using WMI
Now that we have our ZenPack, we need to begin making it do something for us. The goal here is to monitor Windows server performance using WMI and alert on overage. To do this we are going to start by importing a Perl script to access WMI.
Importing the Perl script
- There is a ZenPack available from Zenoss called Perfmon that includes a script called perfmon.pl. We could simply import this ZenPack and then reference the file, but I am going to import the file itself to keep things simple in the future.
- Download and extract the Perfmon ZenPack and copy perfmon.pl to the $ZENHOME/ZenPacks/ZenPacks.
/ZenPacks/ lib Install the wmi-client tools — apt-get install wmi-client Make a symbolic link for winexe — ln -s /usr/bin/winexe /usr/local/zenoss/zenoss/bin/
Create the performance template – Data Sources
Browse to Classes | Devices | Server | Windows and click the Templates tab Create a new template by selecting Available Performance Templates | Add Template Enter the name “Basic Windows Performance” and click OK Create a new Data Source by clicking Data Sources | Add Data Source For name, enter dsCpuPercentage, Type of Command For Command Template, enter $$ZENHOME/ZenPacks/ZenPacks. . /ZenPacks/ / /lib/perfmon.pl 1 “${dev/manageIp}” “${dev/zWinUser}” “${dev/zWinPassword}” “Processor(_Total)% Processor Time” “cpu_ProcessorTime” Select DataPoints | Add Data Point Enter cpu_ProcessorTime and click Add
Create the performance template – Thresholds
Browse to Classes | Devices | Server | Windows and click the Templates tab Click the Basic Windows Performance template Select Thresholds | Add Threshold Enter a name of thCpuPercentage, type MinMaxThreshold, click OK On the threshold page, select the appropriate Data Points For Max Value, type 80 Set Event Class to /Perf/CPU Click Save
Create the performance template – Graph Definitions
Browse to Classes | Devices | Server | Windows and click the Templates tab Click the Basic Windows Performance template Select Graph Definitions | Add Graph For name, enter CPU Utilization Select Graph Points | Add DataPoint, select the data points to include Click OK, Save
Include the template in the ZenPack
- Browse to Classes | Devices | Server | Windows and click the Templates tab
- Click the Basic Windows Performance template
- Select Performance Template | Add to ZenPack
This comment has been removed by a blog administrator.
Hello! I'm newbie in Internet, can you give me some useful links? I know only about Yahoo [url=http://yahoo.com]Yahoo[/url] http://yahoo.com Yahoo