Checking for VNC(or arbitrary TCP service)

Balestra, Roberto Roberto.Balestra at getronics.com
Wed May 18 18:21:16 CEST 2005


Hi David,
check_tcp command is defined as
 $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
in chkcommand.cfg file.

In your service definition for your server 1.1.1.1, you have set "check_command" parameter to 
   check_tcp!5900

Nagios gets $HOSTADDRESS$ from your configuration files (hosts.cfg), and matches $ARG1$ with 5900.
Every ! is a separator for argument to pass to command.

So you have:
hosts.cfg
define host{
  use ...
  host_name   yourhost
  address     1.1.1.1
  alias       ....
  ....
}

chkcommand.cfg
define command{
  command_name	check_tcp
  command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
}

services.cfg
define service{
  use ...
  host_name            yourhost
  servicedescription   Check VNC (if you like it)
  check_command        check_tcp!5900
  ....
}
bye
	Roberto

> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of D.S.
> Sent: mercoledì 18 maggio 2005 17.58
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Checking for VNC(or arbitrary TCP service)
> 
> 
> Hello I'm new to nagios, but thanks to some help from the list, and a
> lot of reading I've got it up and running and monitoring the first few
> services!!  I'm interested in montoring a VNC process which 
> will require
> a TCP connection to port 5900...
> 
> ./check_tcp -h
> 
> Doesn't seem to give me the format that I expect to use in 
> services.cfg
> (check_tcp!whatever!stuff).. How would I go about monitoring port 5900
> on host 1.1.1.1 ? 
> 
> I tried looking for services.cfg examples of something akin 
> to this but
> I just don't see how the !! syntax translates into the " check_tcp -H
> host -p port " type of syntax -h gives.  What are the !'s anyway?
> 
> Any help would be appreciated.
> 
> --David
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at 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
> 


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list