WMI Queries
-
I am impressed with Netxms, especially the fact the data is stored in SQL which allows for a simple to use data collector.
A few days have been spent on getting SNMP queries to a MS-SQL 2005 system working when I found a webpage showing that Microsoft no longer support SNMP queries to SQL 2005 .... so that leaves WMI to perform the checks.
I see that Netxms has a "Generic WMI Query" option within the agent, but I do not see any information on how to use this feature.
Has anyone done WMI queries on SQL and/or other Windows performance settings? If so how is this done.
-
Hello.
You need to load "wmi" subagent (add "SubAgent = wmi.nsm" to your nxagentd.conf), this will add "WMI.Query()" parameter to the agent.
This parameter takes two arguments: namespace and query string.Sample:
nxget SERVER_IP '"WMI.Query('root\WMI', 'SELECT InstanceName,CurrentTemperature FROM MSAcpi_ThermalZoneTemperature')"I have no experience with querying MSSQL status using WMI, but according to google you can do something like this:
nxget SERVER_IP "WMI.Query('root\Microsoft\SqlServer\ComputerManagement', 'SELECT State FROM SqlService')" -
Hi!
Actually, WMI.Query(*) gets three parameters - namespace, query string, and property name. For example, to get CPU information, you can use the following parameter:
WMI.Query(root\CIMV2,SELECT * FROM Win32_Processor,Name)Best regards,
Victor -
can't get it to work =(
nxget.exe 192.168.0.1 -a "none" -K "c:\netxms\var\server_key" "WMI.Query(root\CIMV2,SELECT * FROM Win32_Processor,Name)"
or
nxget.exe 192.168.0.1 -a none -K c:\netxms\var\server_key "WMI.Query('root\WMI', 'SELECT InstanceName,CurrentTemperature FROM MSAcpi_ThermalZoneTemperature')"
always have:
500: Internal error
-
Is WMI service running? Is there any WMI-related messages in agent's log? Also, if start agent in debug mode (by adding -D switch), it will produce additional diagnostics.
-
-
-
question about nxget: is it something like SNMP GET?
and i can get only one value, but can't get the list?looks like an SNMP commands: "get" and "walk".
is it possible to do "walk" with nxget.exe for query lists of available values form nodes?
Your test query: WMI.Query(root\CIMV2,SELECT * FROM Win32_Processor,Name) - it works for me!

Please, need more information about syntax (root\CIMV2,SELECT * FROM Win32_Processor,Name
what is red-lighted parameter and how about other parameters?I need to execute this queries, but i can't to do it (always have "500 internal error")
select DatabaseNodeMemory from Win32_PerfFormattedData_DNS_DNS
select DynamicUpdateQueued from Win32_PerfFormattedData_DNS_DNS
select TotalQueryReceived from Win32_PerfFormattedData_DNS_DNS
select TotalResponseSent from Win32_PerfFormattedData_DNS_DNS -
I know that the post is old, But I just want to report what I found in case it helps someone else when searching on this f贸rum.
Please let me know if is there a better way to do this.I found that Dell Servers have a particular way to interact with ACPI on this f贸rum : http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1307729003111+28353475&threadId=940582
So I made the following query using NetXMS agent :
WMI.Query(root\CIMV2\dell, SELECT * FROM CIM_TemperatureSensor where DeviceID=2, CurrentReading)
It works perfectly to me as the DeviceID 2 is the "BMC Ambient Temp Sensor" wich gives me better values (only 2 degrees of difference) like if the room temperature is around 25 Celcius, this sensor gives me the value of 270.
Also for those who want to explore WMI, I recommend 2 tools. One is Windows native called Wbemtest.exe (C:\windows\system32\wbem) and the other you have to download and is called "WMI Administrative Tools" http://www.microsoft.com/downloads/en/details.aspx?familyid=6430f853-1120-48db-8cc5-f2abdc3ed314
Thanks.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 馃挆
Register Login