NSClient++ Help (#1) - CheckWMI broken? (#137) - Message List
Hi, I have serious trouble in using the CheckWMI module. For testing purpose I took following WMI query as starting point: "select name, state from win32_Service". So everybody is able to reproduce this on a whatever flavoured windows machine.
When I test this on the windows machine with "nsclient++.exe CheckWMI "select name, state from win32_Service" I get the expected result, a list of all defined services with its states.
Expanding this query to get only the result of one service, I get an error: "nsclient++.exe CheckWMI "select name, state from win32_Service where name=Wmi" gives "CheckWMI.cpp(264) WMIQuery failed: ExecQuery? failed:select name, state from win32_Service where name=Wmi (reason is: WinMgmt? - ):failed to lookup error code: 2147749911( reson:317)". Isn't it possible to create such queries or do I use the wrong syntax?
Then I switched to the Nagios host and tried there: "check_nrpe -H 10.2.0.1 -c CheckWMI -a "Query=select name, state from win32_Service" and get: "OK: WMI Query returned no results." Why no results? Where is the list of services?
When I call this check from the nagios server with "check_nrpe -H 10.2.0.1 -c check_example" I get the result "OK: WMI Query returned no results.|' '=0;1;5;" . Since there are a lot more than five services defined, it should return critical state, shouldn't it?
I've read all available documentation and older postings here, but got no clue on this. Perhaps somebody here can tell me, what I'm doing wrong.
And a last question: Is there a way to call the modules CheckWMI and CheckEventlog? with the NSClientListener instead of using NRPE?
I'm using: Nagios 3.01, Nagios-Plugins 1.4.11 (check_nrpe version 2.8.1), NSClient++ 0.3.1
It does not sound like you are doing something wrong, I shall investigate this and see what I can figure out...
Added a bug report: #169 for tracking this issue.
MickeMmickem05/08/08 11:27:34 (5 years ago)