problem with "negate "

Voon, Ton Ton.Voon at egg.com
Wed Mar 12 15:30:16 CET 2003


What is your result on the command line?

I find that you need to place the command in quotes so
./negate ./check_http -H localhost
will fail, but
./negate "./check_http -H localhost"
will work.

> -----Original Message-----
> From:	le jert [SMTP:lejert at hotmail.com]
> Sent:	Wednesday, March 12, 2003 1:46 PM
> To:	nagios-users at lists.sourceforge.net
> Subject:	[Nagios-users] problem with "negate "
> 
> Hi !
> 
> In order to check firewall security, I would like to know how I can
> check if certain ports are closed (and not open, as usually). I
> mean
> writing 'ok' for the service if ports 23,... are closed.
> I use the negate command, but I don't know exactly where I am wrong :
> 
> 
> $USER1$/negate $USER1$/check_tcp -H <HOST> -p 22
> 
> here's my config :
> 
> 
> # 'check_tcp_closed' command definition
> define command{
> command_name check_tcp_closed
> command_line $USER1$/negate $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
> }
> 
> 
> 
> # Service definition for checking if SSh port 22 is closed
> define service{
> use generic-service
> host_name xxx
> service_description Check SSH closed
> is_volatile 0
> check_period 24x7
> contact_groups xxx
> notification_options c,r,w
> check_command check_tcp_closed!22
> }
> 
> 
> Could you help me finding what's wrong ???
> 
> thanks
> 
> Note : I'm running nagios-1.0 with pluggin 1.3.0 beta2 on a redhat
> 7.3
> 
> 
> 
> _________________________________________________________________
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open! 
> Get cracking and register here for some mind boggling fun and 
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> _______________________________________________
> 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 private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
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