[Nagiosplug-devel] [ nagiosplug-Bugs-822662 ] check_tcp does not return " TCP CRITICAL"

SourceForge.net noreply at sourceforge.net
Fri Jun 1 04:20:07 CEST 2007


Bugs item #822662, was opened at 2003-10-13 04:00
Message generated for change (Comment added) made by sf-robot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=822662&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing problem
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Hugo Monteiro (hvm_pt)
Assigned to: Ton Voon (tonvoon)
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: SourceForge Robot (sf-robot)
Date: 2007-05-31 19:20

Message:
Logged In: YES 
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

Comment By: Matthias Eble (psychotrahe)
Date: 2007-05-17 07:37

Message:
Logged In: YES 
user_id=1694341
Originator: NO

Hi Hugo,

can you confirm that this problem still exists?
I'm setting this case to "pending" which means it will be closed
automatically within 14 days if
you won't post a reply until then.

Best regards
Matthias

----------------------------------------------------------------------

Comment By: Chris Funderburg (funderburg)
Date: 2005-05-19 05:54

Message:
Logged In: YES 
user_id=10827

This still appears to not work even in CVS code.  Is Nagios
not being maintained anymore ?

----------------------------------------------------------------------

Comment By: Jeremy T. Bouse (undrgrid)
Date: 2003-10-13 09:23

Message:
Logged In: YES 
user_id=10485

I believe if you check the contents of
nagios-10-10-2003-00.log thru nagios-10-10-2003-23.log you
would find that all the entries are for the same day but the
logs have been truncated because they grew to be too long...
What you need to do when doing reports is to tell it that it
can go back through more logs by setting the "Backtracked
Archives" to higher than the default (which for me is 2)... 

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2003-10-13 08: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 08: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 06: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 04: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