summaryrefslogtreecommitdiffstats
path: root/web/attachments/136758-mmmm
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/136758-mmmm
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'web/attachments/136758-mmmm')
-rw-r--r--web/attachments/136758-mmmm75
1 files changed, 75 insertions, 0 deletions
diff --git a/web/attachments/136758-mmmm b/web/attachments/136758-mmmm
new file mode 100644
index 0000000..768eb35
--- /dev/null
+++ b/web/attachments/136758-mmmm
@@ -0,0 +1,75 @@
1*** check_snmp.c.old Tue May 31 22:09:23 2005
2--- check_snmp.c Tue May 31 23:35:45 2005
3***************
4*** 336,341 ****
5--- 336,342 ----
6
7 i++;
8
9+ /* I think this declaration here is bad syntax, and compilation fails */
10 char *str[MAX_INPUT_BUFFER];
11 asprintf(str, "=%s%s;;;; ", show, type ? type : "");
12 strcat(perfstr, *str);
13***************
14*** 376,381 ****
15--- 377,383 ----
16 char *ptr;
17 int c = 1;
18 int j = 0, jj = 0, ii = 0;
19+ int needmibs = FALSE;
20
21 int option = 0;
22 static struct option longopts[] = {
23***************
24*** 510,515 ****
25--- 512,525 ----
26 retries = atoi(optarg);
27 break;
28 case 'o': /* object identifier */
29+ if ( strspn( optarg, "0123456789." ) != strlen( optarg ) ) {
30+ /*
31+ * we have something other than digits and periods, so we
32+ * have a mib variable, rather than just an SNMP OID, so
33+ * we have to actually read the mib files
34+ */
35+ needmibs = TRUE;
36+ }
37 for (ptr = optarg; (ptr = index (ptr, ',')); ptr++)
38 ptr[0] = ' '; /* relpace comma with space */
39 for (ptr = optarg; (ptr = index (ptr, ' ')); ptr++)
40***************
41*** 628,633 ****
42--- 638,646 ----
43 if (community == NULL)
44 community = strdup (DEFAULT_COMMUNITY);
45
46+ if ( ! needmibs )
47+ miblist = "''"; /* don't read any MIB files */
48+
49 return validate_arguments ();
50 }
51
52***************
53*** 913,921 ****
54 /* OID Stuff */
55 printf (_("\
56 -o, --oid=OID(s)\n\
57! Object identifier(s) whose value you wish to query\n\
58 -m, --miblist=STRING\n\
59! List of MIBS to be loaded (default = ALL)\n -d, --delimiter=STRING\n\
60 Delimiter to use when parsing returned data. Default is \"%s\"\n\
61 Any data on the right hand side of the delimiter is considered\n\
62 to be the data that should be used in the evaluation.\n"), DEFAULT_DELIMITER);
63--- 926,937 ----
64 /* OID Stuff */
65 printf (_("\
66 -o, --oid=OID(s)\n\
67! Object identifier(s) or SNMP variables whose value you wish to query\n\
68 -m, --miblist=STRING\n\
69! List of MIBS to be loaded (default = ALL)\n\
70! Set empty if polling only OIDs, and not SNMP variables\n\
71! (since no MIB files are needed if we already have the OIDs)\n\
72! -d, --delimiter=STRING\n\
73 Delimiter to use when parsing returned data. Default is \"%s\"\n\
74 Any data on the right hand side of the delimiter is considered\n\
75 to be the data that should be used in the evaluation.\n"), DEFAULT_DELIMITER);