Jun 15, 2010 10:38 AM
Using WMI Data Source in Reports
-
Like (0)
Hi all,
I've been searching the forums for a good example of how to use WMI query results using the WMI Data Source community plugin in a report and so far haven't found a good one, so maybe this can be the start of one...
I've found a few bits and pieces (interestingly both by Noel Brockett):
What I'm trying to do is list the number and type of sticks of RAM memory in a group of Windows 2003 servers in a report.
So far I've been able to get the information I need using a wmic command on a Windows Server command prompt:
wmic memorychip get /?
wmic memorychip get BankLabel,Capacity,Tag ...
Using http://www.1e.com/techblog/post/2009/09/23/wmic-aliaswmi-class-mapping.aspx as a guide to getting the correct command.
And using http://msdn.microsoft.com/en-us/library/aa394347(v=VS.85).aspx as a guide to the Win32_PhysicalMemory Class.
So then was able to define a new zenoss data source on the /CIM/WMI device template using the query:
SELECT BankLabel, Capacity, Tag FROM Win32_PhysicalMemory
This seems to work as I can test it against a device and it gives an expected result.
And I think (!) adding a Data Point with the same name as the variable name makes it available to graphs and reports (is this correct?)
I have implemented a python script that runs the same code as the first link above and included it as a column in a custom report which works:
return ','.join([ s.name() for s in context.os.ipservices() if s.monitored() ])
But how do I modify it to get at the data from the new WMI data source?
Any hints are much appreciated!
Thanks,
Richard
Hi Richard
Hit similar dead end
after creating a WMI Qury which graphs DiskWriteBytesPerSec in Zenoss
SELECT DiskReadBytesPerSec,DiskWriteBytesPerSec FROM Win32_PerfRawData_PerfDisk_PhysicalDisk WHERE Name="_Total"
I want to create a report to total the Bytes written in the day over a week and then over a month
have you found a way to do this? or does anyone else have some ideas?
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||