problem with "negate "

le jert lejert at hotmail.com
Wed Mar 12 14:45:56 CET 2003


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





More information about the Users mailing list