[Nagiosplug-devel] check_snmp -- Modify source code, to allow SNMP protocol version 2c?

Andrew Lillie a.lillie at surewest.net
Wed Dec 8 12:14:12 CET 2004


I don't think that the individual plugins have their own make targets.  
But, you can just run "make" (and skip "make install") and copy the new 
check_snmp plugin to your production plugins directory.

As far as SNMP v2 goes... I don't actually know.  There may be reasons 
to avoid it (perhaps someone else on the list can address this), but I 
was in the same boat you were: I had some devices that only used SNMP 
v2, thus I added support for it in.

-=A=-

Jason Byrns wrote:

> Andrew Lillie wrote:
>
>> Jason,
>>
>> I had a similar issue, so I added in the following (in between the 
>> version 1 and version 3 sections (line 725 in my copy of the source)):
>>
>>        else if ((strcmp(proto,"2c") == 0) || (strcmp(proto,"2") == 
>> 0)) {       /* why does the world hate snmp v2 so much? */
>>                asprintf(&proto, "%s", "2c");
>>                asprintf(&authpriv, "%s%s", "-c ", community);
>>        }
>>
>> This works for me without any issues.
>
>
> Excellent, thanks very much!  Glad to hear it was pretty much like I 
> was expecting.  I submitted this as a bug through Sourceforge, as it 
> seems like the main plugin should be updated.  (Or is there some 
> special reason they chose to avoid SNMP protocol V2?)
>
> Any easy way to compile just this one plugin, after I modify it?  So 
> far, all I can find makes it sound like you have to compile and 
> install ALL plugins at once.
>
> (I was hoping I could just compile check_snmp.c, and copy the 
> resulting file over to the appropriate location.  Would that work okay?)
>
> Thanks again!
>
> --Jason Byrns
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now. 
> http://productguide.itmanagersjournal.com/
> _______________________________________________________
> Nagios Plugin Development Mailing List 
> Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at 
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any 
> issue. ::: Messages without supporting info will risk being sent to 
> /dev/null
>
>




More information about the Devel mailing list