[Nagiosplug-help] looking for snmpv3 context in check_snmp

Lars mathwig at gmx.de
Tue Dec 18 19:25:38 CET 2012


John Q <john_q61 at ...> writes:

> 
> 
> Hi folks,
> 
> Could someone point me to a script or patch so I can use check_snmp with
SNMPv3 context suppport? This is critical to my SNMPv3 based application.
> 
> 
> Best Regards
> 
> John
> 
> 
> 
> ------------------------------------------------------------------------------
> LogMeIn Central: Instant, anywhere, Remote PC access and management.
> Stay in control, update software, and manage PCs from one command center
> Diagnose problems and improve visibility into emerging IT issues
> Automate, monitor and manage. Do more in less time with Central
> http://p.sf.net/sfu/logmein12331_d2d
> 
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at ...
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 


Hi John,

I solved it with this diff against check_snmp 1.4.16:

106a107
> char *context = NULL;
264a266,267
>       command_line[9] = "-n";
>       command_line[10] = strdup (context);
267c270
<               command_line[9 + i] = authpriv[i];
---
>               command_line[11 + i] = authpriv[i];
270c273
<       asprintf (&command_line[9 + numauthpriv], "%s:%s",
 server_address, port);
---
>       asprintf (&command_line[11 + numauthpriv], "%s:%s",
 server_address, port);
278c281
<               command_line[9 + numauthpriv + 1 + i] = oids[i];
---
>               command_line[11 + numauthpriv + 1 + i] = oids[i];
282c285
<       command_line[9 + numauthpriv + 1 + numoids] = NULL;
---
>       command_line[11 + numauthpriv + 1 + numoids] = NULL;
594a598
>               {"context", required_argument, 0, 'N'},
617c621
<               c = getopt_long (argc, argv,
"nhvVOt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:L:U:a:x:A:X:",
---
>               c = getopt_long (argc, argv,
"nhvVOt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:L:U:a:x:A:X:N:",
650a655,657
>                       break;
>               case 'N':
>                       context = optarg;


Regards, Lars





More information about the Help mailing list