WMI Wizard Checks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

WMI Wizard Checks

Post by rseiwert »

A couple of interesting things. I am getting intermittent false positives on the WMI Wizard Check. Getting critical CPU alerts for small negative numbers. Typically they will be like -0.02% is critical. Not sure how CPU utilization could be negative. CRITICAL - [Triggered by _AvgCPU0] - Average CPU Utilisation -4.58% (Over approx 5 sec period)

Also getting process checks Ok for non-running processes. OK - Found 0 Instance(s) of "0440000.exe" running.

These are all un-modified WMI wizard checks.
Grumpy Olde IT Guy
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: WMI Wizard Checks

Post by mguthrie »

Good to know. I put this on my TODO list to take a look at this check plugin for any logical errors. It's probably some logical bug in the WMI check plugin itself.
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

Re: WMI Wizard Checks

Post by rseiwert »

FYI: For the process checks the wizard doesn't seem to set a warning or crit level for the checkprocess. I haven't check the service monitoring from the wizard. Adding -c 0:0 to the end of the check causes an alert when the process is not running. Good to know you need to tweak each of these checks.

check_xi_service_wmiplus!domain/user!password!checkprocess!-s Commandline -a 0440000.exe -c @0:0

But wait, It returns Critical in text but OK on the status code.

[root@nagios libexec]# ./check_wmi_plus.pl -H procman2 -m checkprocess -s Name -a 04040000.exe -c @0:0
CRITICAL - [Triggered by _ItemCount in the range 0:0] - Found 0 Instance(s) of "04040000.exe" running.|'Process Count'=0;0;
[root@nagios libexec]# echo $?
0

Checking the scripts authors site I downloaded the latest copy but dropping it in caused a flood of alerts. I put the old one back and set it up in it's own directory to test. Seems the lastest version (1.45) of the check_wmi_plus.pl exits with the proper code.

[root@nagios libexec]# ./wmitest.pl -H procman2.vca.com -m checkprocess -a bob.exe -c @0:0
CRITICAL - [Triggered by _ItemCount in the range 0:0] - Found 0 Instance(s) of "bob.exe" running.|'Process Count'=0;0;
[root@nagios libexec]# echo $?
2

Frustrating and very time consuming. At least I will know perl by the time this is implemented.
Grumpy Olde IT Guy
hhlodge
Posts: 206
Joined: Tue Mar 08, 2011 2:13 pm

Re: WMI Wizard Checks

Post by hhlodge »

The author of this plugin has released a new version to address this issue after I reported it to him. In fact, there a few major changes so the new plugin won't quite line up with the wizard, so the PHP template needs to be tweaked for the new mode arguments. I was going to email the developers to let them know there'd been major changes but didn't get around to it. Here's the link to download.
http://www.edcint.co.nz/checkwmiplus/
- Kyle
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: WMI Wizard Checks

Post by nscott »

Thanks for the info Kyle.
Nicholas Scott
Former Nagios employee
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

Re: WMI Wizard Checks

Post by rseiwert »

I downloaded this update and from the command line it seems to work but when I replace the script in libexec it really broke everything. Put the old script back and things are "working" if you consider false OK statuses working.

If anyone has a tweaked script which makes the WMI actually work I would love to know about it.
Grumpy Olde IT Guy
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: WMI Wizard Checks

Post by mguthrie »

We'll put it on our TODO to get the latest WMI check working with the wizard, other users have reported some issues as well...
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

Re: WMI Wizard Checks

Post by rseiwert »

This is important to me. Deployed about 20 hosts with specific monitoring or services and processes using WMI only to notice that the wizard produced monitoring that doesn't work.

I need to know if this is something that will be fixed in the short term or do I need a Plan B?
Grumpy Olde IT Guy
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: WMI Wizard Checks

Post by mguthrie »

We don't have a concrete ETA on this as of yet. We need to test out the plugin and update the wizard if the arguments have changed. We'll try and have some more info on this this week.
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

Re: WMI Wizard Checks

Post by rseiwert »

I do appreciate it.. If I knew linux, perl or php this wouldn't be so hard for me to solve on my own but without that base it takes me forever just to troubleshoot a few lines of code... I sure I mentioned that it's very frustrating for me as well.
Grumpy Olde IT Guy
Locked