# check_nt (nagios) syntax?[solved]

## arndawg

Hi there. 

I've setup a working Nagios installation with the Nagios guide on the wiki. 

I've innstalled the plugins on my windows sever for monitoring. Everything seams okay.

But how do I check status of services and processes. I can't figure out the syntax for it. So does anyone know this?

Here'sthe commands i found on the wiki.

```

        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v USEDDISKSPACE -l $ARG1$ -w $ARG2$ -c $ARG3$

        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v CPULOAD -l $ARG1$

  

        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v UPTIME

        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v CLIENTVERSION

        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v PROCSTATE -l $ARG1$

        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v SERVICESTATE -d SHOWALL -l $ARG1$

        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v MEMUSE -w $ARG1$ -c $ARG2$

        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v COUNTER -l "\\Paging File(_Total)\\% Usage","Paging File usage is %.2f %%" -w $ARG1$ -c $ARG2$

```

So if i want to check UPTIME i just do this:

#/usr/nagios/libexec/check_nt -H ipofwinserver -v UPTIME

and that gives me an output of: "

System Uptime - 199 day(s) 19 hour(s) 21 minute(s)"

All good.. Now, if i want to check e.x CPULOAD. 

#/usr/nagios/libexec/check_nt -H ipofwinserver -v CPULOAD

I get this:

missing -l parameters.  

I can't figure out what should be after -l. The same goes for all other commands. I can't figure out the $ARG$ parts. 

does anyone know? 

Sorry for my bad explanation.Last edited by arndawg on Thu Aug 03, 2006 1:47 pm; edited 1 time in total

----------

## frilled

Execute /usr/nagios/libexec/check_nt --help by hand, there's some info there, notably:

```
   CLIENTVERSION = Get the NSClient version

     If -l <version> is specified, will return warning if versions differ.

   CPULOAD = Average CPU load on last x minutes.

     Request a -l parameter with the following syntax:

     -l <minutes range>,<warning threshold>,<critical threshold>.

     <minute range> should be less than 24*60.

     Thresholds are percentage and up to 10 requests can be done in one shot.

     ie: -l 60,90,95,120,90,95

   UPTIME = Get the uptime of the machine.

     No specific parameters. No warning or critical threshold

   USEDDISKSPACE = Size and percentage of disk use.

     Request a -l parameter containing the drive letter only.

     Warning and critical thresholds can be specified with -w and -c.

   MEMUSE = Memory use.

     Warning and critical thresholds can be specified with -w and -c.

   SERVICESTATE = Check the state of one or several services.

     Request a -l parameters with the following syntax:

     -l <service1>,<service2>,<service3>,...

     You can specify -d SHOWALL in case you want to see working services

                 in the returned string.

   PROCSTATE = Check if one or several process are running.

     Same syntax as SERVICESTATE.

   COUNTER = Check any performance counter of Windows NT/2000.

     Request a -l parameters with the following syntax:

                 -l "\\<performance object>\\counter","<description>

     The <description> parameter is optional and

     is given to a printf output command which requires a float parameter.

     If <description> does not include "%", it is used as a label.

     Some examples:

       "Paging file usage is %.2f %%"

       "%.f %% paging file used."

```

----------

## arndawg

Thanks. Now I'm monitoring the windows 2003 servers perfectly  :Very Happy: 

----------

