|
From: Balestra, R. <Rob...@ge...> - 2005-05-18 16:21:28
|
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=20
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: nag...@li...
> [mailto:nag...@li...]On Behalf Of D.S.
> Sent: mercoled=EC 18 maggio 2005 17.58
> To: nag...@li...
> Subject: [Nagios-users] Checking for VNC(or arbitrary TCP service)
>=20
>=20
> 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=20
> will require
> a TCP connection to port 5900...
>=20
> ./check_tcp -h
>=20
> Doesn't seem to give me the format that I expect to use in=20
> services.cfg
> (check_tcp!whatever!stuff).. How would I go about monitoring port 5900
> on host 1.1.1.1 ?=20
>=20
> I tried looking for services.cfg examples of something akin=20
> 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?
>=20
> Any help would be appreciated.
>=20
> --David
>=20
>=20
> -------------------------------------------------------
> 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=3D7412&alloc_id=3D16344&op=3Dclick
> _______________________________________________
> Nagios-users mailing list
> Nag...@li...
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS=20
> when reporting any issue.=20
> ::: Messages without supporting info will risk being sent to /dev/null
>=20
|