[Nagiosplug-devel] [ nagiosplug-Bugs-822662 ] check_tcp does not return "TCP CRITICAL"
SourceForge.net
noreply at sourceforge.net
Mon Oct 13 08:50:03 CEST 2003
Bugs item #822662, was opened at 2003-10-13 12:00
Message generated for change (Comment added) made by tonvoon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=822662&group_id=29880
Category: Parsing problem
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Hugo Monteiro (hvm_pt)
Assigned to: Jeremy T. Bouse (undrgrid)
Summary: check_tcp does not return "TCP CRITICAL"
Initial Comment:
check_tcp plugin should return a "TCP CRITICAL:
Connection refused by host" when the tcp service port
checked is down.
example: "check_tcp server1 -p 3128" (SQUID Port)
If the squid service is down we get a "Connection
refused by host" but we should get a "TCP CRITICAL:
etc.." since this service is down.
Because of this, Nagios puts this service in the
critical services group, but we can't get any
availability report because services checked by this
plugin (using check_tcp xxx -p xxxx) are not returning
valid exit codes/echoes: "TCP OK", "TCP WARNING" or
"TCP CRITICAL".
This service check not even appear has unknown!?!!
----------------------------------------------------------------------
>Comment By: Ton Voon (tonvoon)
Date: 2003-10-13 16:48
Message:
Logged In: YES
user_id=664364
I had a problem with extra nagios logs being created (with -
23). It turned out to be an NTP problem on the server I was
using. See http://www.nagios.org/faqs/viewfaq.php?
faq_id=93 for the resolution.
----------------------------------------------------------------------
Comment By: Hugo Monteiro (hvm_pt)
Date: 2003-10-13 16:37
Message:
Logged In: YES
user_id=12156
Additional notes:
The exit code seems to be valid to NAGIOS process, it can
process it well. The problem was that something broke the
archived LOG, it appeared "nagios-10-10-2003-23.log" (notice
the -23) instead of "nagios-10-10-2003-00.log". That was why
this services didn't appear in the Availability Report. (I'm
still searching what caused this.)
Besides this, i've added the following lines to 'netutils.c'
starting line 309:
-- cut here --
printf ("CONNECTION CRITICAL: ");
--- end cut ---
So, if we cannot make a connection it will print something
like CONNECTION CRITICAL: "+"Error message from the
'switch/case on the line below"'
example: "CONNECTION CRITICAL: Connection refused by host."
PS: Check all information i sent and see if this really is
an check_tcp plugin issue, and something needs to be
modified, or if this bug report can be closed.
----------------------------------------------------------------------
Comment By: Jeremy T. Bouse (undrgrid)
Date: 2003-10-13 14:28
Message:
Logged In: YES
user_id=10485
As I've done quite a few changes in the current CVS HEAD
version of the check_tcp code I believe I know where this
problem lies. It seems to be in the actual connection code
and not in the processing of the reply as it never gets the
connection socket to open. I'll look into it and see if this
is possible to preface with "TCP CRITICAL" however the code
to my knowledge DOES return the proper exit code it is just
the human readable details that is failing to display.
----------------------------------------------------------------------
Comment By: Hugo Monteiro (hvm_pt)
Date: 2003-10-13 12:46
Message:
Logged In: YES
user_id=12156
The problem seems to be in "netutils.c" file between line
308 and 320.
Even if this errors are not known, a plugin should always
return a known error (OK, WARNING, CRITICAL or UNKNOWN) if
it sends anything besides this, it will break Nagios service
information (reports, stats, etc.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=822662&group_id=29880
More information about the Devel
mailing list