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/122140-diff | 91 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 web/attachments/122140-diff (limited to 'web/attachments/122140-diff') diff --git a/web/attachments/122140-diff b/web/attachments/122140-diff new file mode 100644 index 0000000..736b1c1 --- /dev/null +++ b/web/attachments/122140-diff @@ -0,0 +1,91 @@ +Index: check_tcp.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v +retrieving revision 1.61 +diff -r1.61 check_tcp.c +99c99 +< int use_ssl = FALSE; +--- +> int use_ssl = FALSE; +170a171,180 +> else if (strstr (argv[0], "check_clamd")) { +> progname = strdup ("check_clamd"); +> SERVICE = strdup ("CLAMD"); +> SEND = strdup ("PING"); +> EXPECT = strdup ("PONG"); +> QUIT = NULL; +> PROTOCOL = TCP_PROTOCOL; +> PORT = 3310; +> } +> +378,379c388,395 +< +< 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 +486c502 +< if (is_host (optarg) == FALSE) +--- +> if (optarg[0]!= '/' && is_host (optarg) == FALSE) +761c777 +< 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.22 +diff -r1.22 netutils.c +221a222 +> +227a229 +> if (host_name[0] != '/') { +267a270,294 +> } +> 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.10 +diff -r1.10 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