[Nagiosplug-devel] [ nagiosplug-Patches-660973 ] check_tcp refusals okay
noreply at sourceforge.net
noreply at sourceforge.net
Fri Jan 3 18:39:02 CET 2003
Patches item #660973, was opened at 2003-01-02 07:12
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=660973&group_id=29880
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Rodger Allen (derais)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_tcp refusals okay
Initial Comment:
The accompanying patch adds an interface to netutils
and an option to check_tcp to allow for different STATE
returns when the the tcp connection receives a
connection refused (ECONNREFUSED).
This may be useful in a heavily firewalled environment
where ICMP may be denied and there are restrictions on
which ports are allowed access to certain machines.
Receiving a connection refused is an indication that
the ip stack on the machine is working okay, and
therefore may be read in a similar manner to a ping,
viz, the machine is alive and able to respond, even
though there may not be a service running on that port
at that time.
It can be used in place of check_ping in a
check-host-alive command. (In our situation we only
allow ssh to particular servers, and would like to know
if the machine is actually "up" even though the sshd
may be down.)
The default behaviour is to act as it does now, issuing
a CRITICAl if the connection is refused. The behviour
can be changed to issue an OK or a WARNING when the
connection is refused, and it will also indicate if it
has been refused as well as returning the requested
state.
The option added to check_tcp:
" -r, --refuse=ok|warn|crit
Accept tcp refusals with states ok,warn, crit
(default: crit)"
eg:
$ ./check_tcp -H foo -p 443; echo $?
Connection refused by host
2
$ ./check_tcp -H foo -p 443 --refuse=crit; echo $?
Connection refused by host
2
$ ./check_tcp -H foo -p 443 --refuse=warn; echo $?
TCP WARNING (refused) - ...
1
$ ./check_tcp -H foo -p 443 --refuse=ok; echo $?
TCP OK (refused) - ...
0
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=660973&group_id=29880
More information about the Devel
mailing list