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/394815-woo | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 web/attachments/394815-woo (limited to 'web/attachments/394815-woo') diff --git a/web/attachments/394815-woo b/web/attachments/394815-woo new file mode 100644 index 0000000..352f7de --- /dev/null +++ b/web/attachments/394815-woo @@ -0,0 +1,49 @@ +--- orig/plugins/check_hpjd.c 2010-07-27 21:47:16.000000000 +0100 ++++ new/plugins/check_hpjd.c 2010-11-30 12:25:56.000000000 +0000 +@@ -41,7 +41,7 @@ + #define DEFAULT_COMMUNITY "public" + + +-const char *option_summary = "-H host [-C community]\n"; ++const char *option_summary = "-H host [-C community] [-p port]\n"; + + #define HPJD_LINE_STATUS ".1.3.6.1.4.1.11.2.3.9.1.1.2.1" + #define HPJD_PAPER_STATUS ".1.3.6.1.4.1.11.2.3.9.1.1.2.2" +@@ -66,6 +66,7 @@ + + char *community = NULL; + char *address = NULL; ++short port = 161; + + int + main (int argc, char **argv) +@@ -119,8 +120,8 @@ + HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY); + + /* get the command to run */ +- sprintf (command_line, "%s -OQa -m : -v 1 -c %s %s %s", PATH_TO_SNMPGET, community, +- address, query_string); ++ sprintf (command_line, "%s -OQa -m : -v 1 -c %s %s:%hd %s", PATH_TO_SNMPGET, community, ++ address, port, query_string); + + /* run the command */ + child_process = spopen (command_line); +@@ -324,7 +325,7 @@ + + + while (1) { +- c = getopt_long (argc, argv, "+hVH:C:", longopts, &option); ++ c = getopt_long (argc, argv, "+hVH:C:p:", longopts, &option); + + if (c == -1 || c == EOF || c == 1) + break; +@@ -347,6 +348,9 @@ + case 'h': /* help */ + print_help (); + exit (STATE_OK); ++ case 'p': /* port */ ++ port = (short) atoi(optarg); ++ break; + case '?': /* help */ + usage5 (); + } -- cgit v1.2.3-74-g34f1