check_wmi_not fully grasping how this works yet.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tonyroth
Posts: 18
Joined: Tue Mar 11, 2014 12:16 pm

Re: check_wmi_not fully grasping how this works yet.

Post by tonyroth »

yes when running the wmic command on the xi server I do have the domain/user syntax correct and it does work fine like you say it just doesn't translate to the monitor working correctly. I get a status information tghat says
"OK - Found 0 Instance(s) of "MediaBeacon64.exe" running (0 excluded)."
which is correct but means that the process isn't running which is bad and should send an alert..
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_wmi_not fully grasping how this works yet.

Post by sreinhardt »

Ah gotcha, just add a -w 1: to send a warning if less than 1 process is detected, or -c 1: if you wish to have a critical instead.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
tonyroth
Posts: 18
Joined: Tue Mar 11, 2014 12:16 pm

Re: check_wmi_not fully grasping how this works yet.

Post by tonyroth »

damn all this for one little switch how funny, sorry I wasted your time. Thanks much for you patience.
tr
tonyroth
Posts: 18
Joined: Tue Mar 11, 2014 12:16 pm

Re: check_wmi_not fully grasping how this works yet.

Post by tonyroth »

ok I put -c 1 at the end of the line but its not flagging as critcal.

check_xi_service_wmiplus!'NWEA/ssss!xxxxx!checkprocess!-s Commandline -a 'MediaBeacon642.exe' -c 1

mediabeacon is missed named in this case so that it errors out but nothing happens. did I put the -c 1 in the wrong place.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_wmi_not fully grasping how this works yet.

Post by sreinhardt »

Hey no worries at all, we all started somewhere. The issue you are having now is that you would only get a critical if 1 process is running, you need 1: (with a colon) per the threshold guidelines. This will cause it to check for less than 1, so negative infinity to 0.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
tonyroth
Posts: 18
Joined: Tue Mar 11, 2014 12:16 pm

Re: check_wmi_not fully grasping how this works yet.

Post by tonyroth »

head hurtz don't want to read this doc... :)
tonyroth
Posts: 18
Joined: Tue Mar 11, 2014 12:16 pm

Re: check_wmi_not fully grasping how this works yet.

Post by tonyroth »

is this correct then

check_xi_service_wmiplus!dccc\-user-ITS'!'NWssE@&strenadgth+4cowsYES'!checkprocess!-s Commandline -a 'MediaBeacon642.exe' -c1:
tonyroth
Posts: 18
Joined: Tue Mar 11, 2014 12:16 pm

Re: check_wmi_not fully grasping how this works yet.

Post by tonyroth »

guess it needs a space between the c and the 1 so -c 1:

time to get a beer, thanks
tr
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_wmi_not fully grasping how this works yet.

Post by tmcdonald »

tonyroth wrote:time to get a beer, thanks
Well hey, if you're buying :D

Mind if we close up the thread?
Former Nagios employee
tonyroth
Posts: 18
Joined: Tue Mar 11, 2014 12:16 pm

Re: check_wmi_not fully grasping how this works yet.

Post by tonyroth »

sorry yes you can close the thread , and anytime you are in portland oregon the beers are on me.
Locked