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

Jason Byrns jason-sourceforge at microlnk.net
Wed Dec 8 10:25:34 CET 2004


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




More information about the Devel mailing list