Re: looking for snmpv3 context in check _snmp

Lars <[email protected]>
Newsgroups gmane.network.nagios.plugins
Message-ID <[email protected]>
John Q <john_q61@...> 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@...
> 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


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.