NSClient - and args with spaces

Rusch, Daniel Daniel.Rusch at GlobalCrossing.com
Wed Sep 11 16:36:28 CEST 2002


Got it working, see the tips below. 

Sorry, I did read the FM several times, but not being a windoze aficionado I
had no idea what it meant and therefore I thought I was using the "real"
name (now I know what regedit is).  The windows sys admins frown on
installing "free" software onto production systems.....

Anyway for my fellow Unix geeks who have been blessed and never had the
misfortune of working on a windows box here are some tips:

1. Look either in My Computer/Manage/Services or Control Panel/Services and
find the service you want to monitor.  Next view it's properties.  Look at
the "Path to executable" and note the name of the executable.  Next, run
regedit to view the contents of the registry and find:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services  and search for the
service you want it should be the same name as the name of the executable.
Remember that the registry name may not even remotely look like the display
name.  Use this name!

Thanks,

Dan  


-----Original Message-----
From: Tom DE BLENDE [mailto:tdeblend at gcc.dhl.com]
Sent: Wednesday, September 11, 2002 1:53 AM
To: John Sellens
Cc: Rusch, Daniel; nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] NSClient - and args with spaces


Read the Readme File...

Services states

Syntax: check_nt -H <hostname> -p <port> -v SERVICESTATE [-d SHOWALL]
-l <service 1>[,<service 2>,<service 3>,...]

     <service> should be the real name of the service, not the
displayed name. You can find this information when going to the
registry for the corresponding
     service : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

     or use the free utility: 'Service Manager NT' :
http://www-rnks.informatik.tu-cottbus.de/~fsch/english/nttols.htm
     -d SHOWALL can be specified if you want to see all tested
services including started ones.

You can specify serveral services in one request. NO BLANK SHOULD
APPEAR IN THE LIST !

If not all services are running, you get the faulty one(s) and a
critical state.

Example:
./check_nt -H 192.168.1.1 -p 1248 -v SERVICESTATE -d SHOWALL -l
LanmanServer,Schedule



John Sellens wrote:
> 
> Put quotes around the ARG in the command definition i.e.
>     command_line        /usr/local/nagios/libexec/check_nt -H
$HOSTADDRESS$ -v SERVICESTATE -t 30 -l "$ARG1$"
> 
> This doesn't work for perl scripts with the embedded perl interpreter,
> but check_nt is a C program.
> 
> Cheers
> 
> John
> jsellens at generalconcepts.com
> 
> | From: "Rusch, Daniel" <Daniel.Rusch at GlobalCrossing.com>
> | Date: Tue, 10 Sep 2002 17:01:39 -0400
> |
> | All,
> |
> | Using NSClient:
> |
> | I have the following command defined:
> |
> | # 'check_nt_service' command definition
> | define command{
> |       command_name    check_nt_service
> |       command_line    /usr/local/nagios/libexec/check_nt -H
$HOSTADDRESS$
> | -v SERVICESTATE -t 30 -l $ARG1$
> |       }
> |
> | In my services.cfg I have two services with the following commands
defined
> | for the same host:
> |
> | check_command                 check_nt_service!MESSENGER
> |
> | check_command                 check_nt_service!TREND SERVERPROTECT
> 
> -------------------------------------------------------
> In remembrance
> www.osdn.com/911/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users


-------------------------------------------------------
In remembrance
www.osdn.com/911/




More information about the Users mailing list