--0016e644c7c2a83dc9048ca0a2e1
Content-Type: text/plain; charset=ISO-8859-1
I'm using SNMP v3 with check_snmp v1.4.15 and snmpget v5.4.1 and ran into an
interesting issue.
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.
I can use snmpget to get the results I need:
snmpget -v 3 -c public -u public 10.1.1.3 sysName.0
however, I cannot with check_snmp. To correct this, on my side (and
probably not correctly), I modified check_snmp.c:
FROM:
if (strcmp(seclevel, "noAuthNoPriv") == 0) {
numauthpriv = 2;
authpriv = calloc (numauthpriv, sizeof (char *));
authpriv[0] = strdup ("-l");
authpriv[1] = strdup ("noAuthNoPriv");
TO:
if (strcmp(seclevel, "noAuthNoPriv") == 0) {
numauthpriv = 4;
authpriv = calloc (numauthpriv, sizeof (char *));
authpriv[0] = strdup ("-l");
authpriv[1] = strdup ("noAuthNoPriv");
authpriv[2] = strdup ("-u");
authpriv[3] = strdup (secname);
Am I doing something incorrect in my implementation of SNMP v3?
--
Take care,
William Attwood
Idea Extraordinaire
[email protected]
--0016e644c7c2a83dc9048ca0a2e1
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I'm using SNMP v3 with check_snmp v1.4.15 and snmpget v5.4.1 and ran in=
to an interesting issue.I setup my Netgear switch to no=
t need a password, and to use the Community public and the User public. =A0=
When I do this, I get a response from snmpget stating there was no security=
Name.
I can use snmpget to get the results I need:=
snmpget -v 3 -c public -u public 10.1.1.3 sysName.0however, I cannot with check_snmp. =A0To correct this, on my side (and pr=
obably not correctly), I modified check_snmp.c:
FROM:if (strcmp(seclevel=
, "noAuthNoPriv") =3D=3D 0) {=A0=A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0numauthpriv =3D 2;=A0=A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0authpriv =3D calloc (numauthpriv, sizeof (ch=
ar *));
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0authpriv[0] =3D strd=
up ("-l");=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0authpriv[1] =3D strdup ("noAuthNoPriv");TO:if (strcmp(seclevel, &q=
uot;noAuthNoPriv") =3D=3D 0) {
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0numauthpriv =3D 4;=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0authpriv =3D cal=
loc (numauthpriv, sizeof (char *));=A0=A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0authpriv[0] =3D strdup ("-l");=
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0authpriv[1] =3D strdup (&=
quot;noAuthNoPriv");
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0authpriv[2] =3D strd=
up ("-u");=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0authpriv[3] =3D strdup (secname);Am I doing something incorrect in my im=
plementation of SNMP v3?
-- Take care,William AttwoodI=
dea Extraordinairewattwood@gmail.=
com
--0016e644c7c2a83dc9048ca0a2e1--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]