I'm using SNMP v3 with check_snmp v1.4.15 and snmpget v5.4.1 and ran into an interesting issue.<div><br></div><div>I setup my Netgear switch to not need a password, and to use the Community public and the User public. When I do this, I get a response from snmpget stating there was no securityName.</div>
<div><br></div><div>I can use snmpget to get the results I need:</div><div>snmpget -v 3 -c public -u public 10.1.1.3 sysName.0</div><div><br></div><div>however, I cannot with check_snmp. To correct this, on my side (and probably not correctly), I modified check_snmp.c:</div>
<div><br></div><div><div>FROM:</div><div><br></div><div>if (strcmp(seclevel, "noAuthNoPriv") == 0) {</div><div> numauthpriv = 2;</div><div> authpriv = calloc (numauthpriv, sizeof (char *));</div>
<div> authpriv[0] = strdup ("-l");</div><div> authpriv[1] = strdup ("noAuthNoPriv");</div><div><br></div><div><br></div><div>TO:</div><div><br></div><div>if (strcmp(seclevel, "noAuthNoPriv") == 0) {</div>
<div> numauthpriv = 4;</div><div> authpriv = calloc (numauthpriv, sizeof (char *));</div><div> authpriv[0] = strdup ("-l");</div><div> authpriv[1] = strdup ("noAuthNoPriv");</div>
<div> authpriv[2] = strdup ("-u");</div><div> authpriv[3] = strdup (secname);</div><div><br></div><div><br></div><div><br></div><div><br></div><div>Am I doing something incorrect in my implementation of SNMP v3?</div>
<div><br></div><div><br></div><br>-- <br>Take care,<br>William Attwood<br>Idea Extraordinaire<br><a href="mailto:wattwood@gmail.com">wattwood@gmail.com</a><br>
</div>