On 26/11/10 13:26, Mark A. Lappin wrote:
> Good Morning!
>
> I guess I'm trying to do something "weird" since I've not been able to find 
> an example (yet).  I have some Windows hosts where I need them to stay logged 
> in and running various "things"  - for software not written to run as a 
> service.   Easy enough, if explorer.exe is not running (along with the other 
> processes I have service checks for, I get errors and notifications.
>
> Other systems however, should not be logged in, and for various reasons, 
> sometimes get left logged in if somebody just disconnects their RDP session 
> without logging off or doesn't log off the local console.  I need a check for 
> the "OK" state to be if explorer.exe is not running and for the error state 
> to be if explorer.exe IS running.
>
> Below are the two definitions, pretty much straight out of the default 
> example configuration files which I modified just slightly.  I'm not sure 
> where I got the "=stopped" on my check_command from, its been a while since 
> I've modified anything in Nagios until this week.
>
> Any ideas somebody would be willing to share would be greatly appreciated!
>
> define service{
>          use                     generic-service
>          hostgroups              windows-servers
>          service_description     Explorer
>          check_command           check_nt!PROCSTATE!-d SHOWALL -l 
> "Explorer.exe"=stopped
> }
>
> define command{
>          command_name    check_nt
>          command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s 
> nagios12345 -v $ARG1$ $ARG2$
>          }
>
>
>
> --Mark
>

I have not heard about the option of "=stopped" , but if that works it's 
a good way.

another way to manipulate the return output is to use the "nagate" 
plugin ( should be in the libexec dir ) , and it will allow you to twick 
the output submitted to nagios from the service execution .

http://nagiosplugins.org/man/negate

Assaf

-- 
Never,Ever Cut A Deal With a Dragon


Next year I will be doing the London to Paris bike ride to
raise money for the DogTrust (www.dogstrust.co.uk) .
Please Sponsor me at http://www.justgiving.com/Assaf-Flatto


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to