[Nagiosplug-devel] [ nagiosplug-Patches-1145413 ] This patche allow to use unix sockets in nagios plugins.

SourceForge.net noreply at sourceforge.net
Sat Oct 29 11:25:18 CEST 2005


Patches item #1145413, was opened at 2005-02-21 15:20
Message generated for change (Comment added) made by samm2
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1145413&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: Enhancement
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alex Samorukov (samm2)
Assigned to: Nobody/Anonymous (nobody)
Summary: This patche allow to use unix sockets in nagios plugins.

Initial Comment:
With this patch user can specify unix socket as -H
argument. This allow to check tcp services which are
bind to unix sockets only.
I use this for checking clamav-clamd. Alsi, i added
check_clamd prototype to check status of the CLAMAV
daemon (clamav.net).



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

>Comment By: Alex Samorukov (samm2)
Date: 2005-10-29 21:23

Message:
Logged In: YES 
user_id=891004

I tried latest  CVS and 
found some errors on it.
This small error make check_tcp completely unusable (core on
startup).
Here is a correction:

samm>~/src/nagios-plugins/nagiosplug/plugins: cvs diff -u
cvs diff: Diffing .
Index: check_tcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
retrieving revision 1.70
diff -u -r1.70 check_tcp.c
--- check_tcp.c 25 Oct 2005 10:38:02 -0000      1.70
+++ check_tcp.c 29 Oct 2005 18:15:10 -0000
@@ -177,7 +177,7 @@
               QUIT = "QUIT\r\n";
               PORT = 119;
       }
-       else if (strncmp(SERVICE, "CLAMD", 5)) {
+       else if (!strncmp(SERVICE, "CLAMD", 5)) {
               SEND = "PING";
               EXPECT = "PONG";
               QUIT = NULL;
@@ -550,7 +550,7 @@

       if (server_address == NULL)
               usage4 (_("You must provide a server address"));
-       else if (is_host (optarg) == FALSE && optarg[0] != '/')
+       else if (is_host (server_address) == FALSE &&
server_address[0] 
!= '/')
               usage2 (_("Invalid hostname, address, or
socket"), optarg);

       return TRUE;



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

Comment By: Subhendu Ghosh (sghosh)
Date: 2005-06-01 17:29

Message:
Logged In: YES 
user_id=46572

Can you take a shot at reworking the patch based on the
current CVS - a bunch of changes went in a couple of weeks
ago that breaks this patch.

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

Comment By: Alex Samorukov (samm2)
Date: 2005-03-11 12:04

Message:
Logged In: YES 
user_id=891004

Hi. Will nagios-plugins use this code?

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1145413&group_id=29880




More information about the Devel mailing list