From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/136841-newdiff | 87 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 web/attachments/136841-newdiff (limited to 'web/attachments/136841-newdiff') diff --git a/web/attachments/136841-newdiff b/web/attachments/136841-newdiff new file mode 100644 index 0000000..371d0a8 --- /dev/null +++ b/web/attachments/136841-newdiff @@ -0,0 +1,87 @@ +Index: check_tcp.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v +retrieving revision 1.65 +diff -r1.65 check_tcp.c +166a167,176 +> else if (strstr (argv[0], "check_clamd")) { +> progname = strdup ("check_clamd"); +> SERVICE = strdup ("CLAMD"); +> SEND = strdup ("PING"); +> EXPECT = strdup ("PONG"); +> QUIT = NULL; +> PROTOCOL = IPPROTO_TCP; +> PORT = 3310; +> } +> +380,381c390,397 +< +< printf +--- +> if(server_address[0]=='/') +> printf +> (_("%s %s%s - %.3f second response on socket %s"), +> SERVICE, +> state_text (result), +> (was_refused) ? " (refused)" : "", +> elapsed_time, server_address); +> else printf +488c504 +< if (is_host (optarg) == FALSE) +--- +> if (optarg[0]!= '/' && is_host (optarg) == FALSE) +763c779 +< printf (_("This plugin tests %s connections with the specified host.\n\n"), +--- +> printf (_("This plugin tests %s connections with the specified host or unix socket.\n\n"), +Index: netutils.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/netutils.c,v +retrieving revision 1.24 +diff -r1.24 netutils.c +166a167 +> +172a174 +> if (host_name[0] != '/') { +212a215,239 +> } +> else{ // unix socket +> struct sockaddr_un su; +> if (strlen(host_name) >= sizeof(su.sun_path)) { +> printf("Hostname too long for unix domain socket: %s\n", +> host_name); +> return STATE_UNKNOWN; +> } +> memset(&su, 0, sizeof su); +> su.sun_family = AF_UNIX; +> strncpy(su.sun_path, host_name, sizeof su.sun_path); +> *sd = socket(PF_UNIX, SOCK_STREAM, 0); +> if ( sd < 0) { +> printf ("Socket creation failed\n"); +> return STATE_UNKNOWN; +> } +> result=connect(*sd, (struct sockaddr *)&su, sizeof su); +> if (result == -1) { +> printf ("Connect to socket failed\n"); +> close(*sd); +> return STATE_UNKNOWN; +> } +> +> } +> +Index: netutils.h +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/netutils.h,v +retrieving revision 1.12 +diff -r1.12 netutils.h +37a38 +> #include +Index: utils.h +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.h,v +retrieving revision 1.22 +diff -r1.22 utils.h +139c139 +< Host name or IP Address\n\ +--- +> Host name or IP Address or unix socket (starting with \"/\")\n\ -- cgit v1.2.3-74-g34f1