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. --- .../37326-nagiosplugins-updates-20021210.diff | 180 +++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 web/attachments/37326-nagiosplugins-updates-20021210.diff (limited to 'web/attachments/37326-nagiosplugins-updates-20021210.diff') diff --git a/web/attachments/37326-nagiosplugins-updates-20021210.diff b/web/attachments/37326-nagiosplugins-updates-20021210.diff new file mode 100644 index 0000000..a8f81ad --- /dev/null +++ b/web/attachments/37326-nagiosplugins-updates-20021210.diff @@ -0,0 +1,180 @@ +Index: check_dig.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dig.c,v +retrieving revision 1.7 +diff -u -r1.7 check_dig.c +--- check_dig.c 21 Nov 2002 12:40:58 -0000 1.7 ++++ check_dig.c 11 Dec 2002 02:40:59 -0000 +@@ -57,7 +57,7 @@ + usage ("Could not parse arguments\n"); + + /* get the command to run */ +- asprintf (&command_line, "%s @%s %s", PATH_TO_DIG, dns_server, query_address); ++ asprintf (&command_line, "%s -t any @%s %s", PATH_TO_DIG, dns_server, query_address); + + alarm (timeout_interval); + time (&start_time); +Index: check_dns.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v +retrieving revision 1.5 +diff -u -r1.5 check_dns.c +--- check_dns.c 14 Nov 2002 02:26:34 -0000 1.5 ++++ check_dns.c 11 Dec 2002 02:40:59 -0000 +@@ -308,7 +308,7 @@ + timeout_interval = atoi (optarg); + break; + case 'H': /* hostname */ +- if (is_host (optarg) == FALSE) { ++ if ((is_host (optarg)) == FALSE) { + printf ("Invalid host name/address\n\n"); + print_usage (); + exit (STATE_UNKNOWN); +@@ -318,7 +318,7 @@ + strcpy (query_address, optarg); + break; + case 's': /* server name */ +- if (is_host (optarg) == FALSE) { ++ if ((is_host (optarg)) == FALSE) { + printf ("Invalid server name/address\n\n"); + print_usage (); + exit (STATE_UNKNOWN); +@@ -328,7 +328,7 @@ + strcpy (dns_server, optarg); + break; + case 'r': /* reverse server name */ +- if (is_host (optarg) == FALSE) { ++ if ((is_host (optarg)) == FALSE) { + printf ("Invalid host name/address\n\n"); + print_usage (); + exit (STATE_UNKNOWN); +@@ -338,7 +338,7 @@ + strcpy (ptr_server, optarg); + break; + case 'a': /* expected address */ +- if (is_dotted_quad (optarg) == FALSE) { ++ if ((is_ipv4_addr (optarg)) == FALSE) { + printf ("Invalid expected address\n\n"); + print_usage (); + exit (STATE_UNKNOWN); +@@ -352,8 +352,8 @@ + } + + c = optind; +- if (query_address[0] == 0) { +- if (is_host (argv[c]) == FALSE) { ++ if (query_address == NULL) { ++ if ((is_host (argv[c])) == FALSE) { + printf ("Invalid name/address: %s\n\n", argv[c]); + return ERROR; + } +@@ -362,8 +362,8 @@ + strcpy (query_address, argv[c++]); + } + +- if (dns_server[0] == 0) { +- if (is_host (argv[c]) == FALSE) { ++ if (dns_server == NULL) { ++ if ((is_host (argv[c])) == FALSE) { + printf ("Invalid name/address: %s\n\n", argv[c]); + return ERROR; + } +Index: check_ldap.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ldap.c,v +retrieving revision 1.2 +diff -u -r1.2 check_ldap.c +--- check_ldap.c 14 Nov 2002 02:26:34 -0000 1.2 ++++ check_ldap.c 11 Dec 2002 02:40:59 -0000 +@@ -7,7 +7,7 @@ + * + * Last Modified: $Date: 2002/11/14 02:26:34 $ + * +- * Command line: check_ldap -h -b -p -w -w ++ * Command line: check_ldap -H -b -p -w -w + * + * Description: + * +@@ -197,7 +197,7 @@ + crit_time = atoi (optarg); + break; + default: +- usage ("check_ldap: could not parse arguments\n"); ++ usage ("check_ldap: could not parse unknown arguments\n"); + break; + } + } +@@ -253,6 +253,6 @@ + { + printf + ("Usage: %s -H -b -p [-a ] [-D ]\n" +- " [-P ] [-w ] [-c ] [-t timeout]\n" ++ " [-P ] -w -c [-t timeout]\n" + "(Note: all times are in seconds.)\n", PROGNAME); + } +Index: check_ping.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v +retrieving revision 1.10 +diff -u -r1.10 check_ping.c +--- check_ping.c 13 Nov 2002 11:50:54 -0000 1.10 ++++ check_ping.c 11 Dec 2002 02:40:59 -0000 +@@ -88,9 +88,15 @@ + + /* does the host address of number of packets argument come first? */ + #ifdef PING_PACKETS_FIRST +- asprintf (&command_line, PING_COMMAND, max_packets, server_address); ++ if (is_ipv6_addr (server_address)) ++ asprintf (&command_line, PING6_COMMAND, max_packets, server_address); ++ else ++ asprintf (&command_line, PING_COMMAND, max_packets, server_address); + #else +- asprintf (&command_line, PING_COMMAND, server_address, max_packets); ++ if (is_ipv6_addr (server_address)) ++ asprintf (&command_line, PING6_COMMAND, server_address, max_packets); ++ else ++ asprintf (&command_line, PING_COMMAND, server_address, max_packets); + #endif + + /* Set signal handling and alarm */ +Index: check_tcp.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v +retrieving revision 1.8 +diff -u -r1.8 check_tcp.c +--- check_tcp.c 25 Nov 2002 12:00:17 -0000 1.8 ++++ check_tcp.c 11 Dec 2002 02:40:59 -0000 +@@ -225,8 +225,12 @@ + { + if (PROTOCOL == UDP_PROTOCOL) + result = my_udp_connect (server_address, server_port, &sd); +- else /* default is TCP */ +- result = my_tcp_connect (server_address, server_port, &sd); ++ else ++ /* default is TCP */ ++ // result = my_tcp_connect (server_address, server_port, &sd); ++ result = my_connect (server_address, server_port, &sd, IPPROTO_TCP); ++printf ("Catch value: %d\n", result); ++printf ("XXX: Check valve\n"); + } + + if (result == STATE_CRITICAL) +Index: check_udp.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_udp.c,v +retrieving revision 1.2 +diff -u -r1.2 check_udp.c +--- check_udp.c 30 Oct 2002 18:46:01 -0000 1.2 ++++ check_udp.c 11 Dec 2002 02:40:59 -0000 +@@ -74,9 +74,8 @@ + alarm (socket_timeout); + + time (&start_time); +- result = +- process_udp_request (server_address, server_port, server_send, +- recv_buffer, MAX_INPUT_BUFFER - 1); ++ result = process_udp_request (server_address, server_port, server_send, ++ recv_buffer, MAX_INPUT_BUFFER - 1); + time (&end_time); + + if (result != STATE_OK) { -- cgit v1.2.3-74-g34f1