Page 2 of 5
Re: MIBS problem
Posted: Fri Jun 07, 2013 10:53 pm
by MPIvan
here is what iv got ...
root@nagios:~# snmptranslate .1.3.6.1.2.1.1.3 -m /usr/share/snmp/mibs/SNMPv2-MIB.my
No log handling enabled - turning on stderr logging
/usr/share/snmp/mibs/SNMPv2-MIB.my: No such file or directory
iso.3.6.1.2.1.1.3
root@nagios:~#
Re: MIBS problem
Posted: Mon Jun 10, 2013 11:13 am
by abrist
Try this path:
Code: Select all
snmptranslate .1.3.6.1.2.1.1.3 -m /usr/share/mibs/netsnmp/SNMPv2-MIB.my
Re: MIBS problem
Posted: Tue Jun 11, 2013 5:34 am
by MPIvan
here it is ....
root@nagios:~# snmptranslate .1.3.6.1.2.1.1.3 -m /usr/share/mibs/netsnmp/SNMPv2-MIB.my
SNMPv2-MIB::sysUpTime
root@nagios:~#
Re: MIBS problem
Posted: Tue Jun 11, 2013 9:42 am
by abrist
So your mib is there and working. When doing a walk ir translating a trap, make sure to specify the whole path.
Re: MIBS problem
Posted: Tue Jun 11, 2013 10:10 am
by MPIvan
When doing a walk ir translating a trap, make sure to specify the whole path.
Im a little confused now .... can you gave me some directions or example .....
Re: MIBS problem
Posted: Tue Jun 11, 2013 10:36 am
by abrist
Code: Select all
MIB search path:
/root/.snmp/mibs
/usr/share/mibs/site
/usr/share/snmp/mibs
/usr/share/mibs/iana
/usr/share/mibs/ietf
/usr/share/mibs/netsnmp
It is quite odd that your mib directory:
Is listed in the mib search path, but is not found by translate, walks or gets. You may have to specify the full path to the mib when performing a check that requires said mib. For example:
Code: Select all
snmpget -v 1 -c <community> <ip of host> sysUpTime.0 -m /usr/share/snmp/mibs/SNMPv2-MIB.my
Re: MIBS problem
Posted: Wed Jun 12, 2013 8:37 am
by MPIvan
Here it is the output
root@nagios:~# snmpget -v 2c -c MyCom1 172.25.1.101 sysUpTime.0 -m /usr/share/mibs/netsnmp/SNMPv2-MIB.my
SNMPv2-MIB::sysUpTime.0 = Timeticks: (8854816) 1 day, 0:35:48.16
root@nagios:~#
.... so if i understand ok, My mibs are in this placeses
- /usr/share/mibs/iana
/usr/share/mibs/ietf
/usr/share/mibs/netsnmp
So how to make all in one folder and all scripts or snmpget to get the info about mibs in that folder or something like that .....
Re: MIBS problem
Posted: Wed Jun 12, 2013 9:56 am
by abrist
That is the issue, as those directories are already in your path and yet, unless we declare the full path to the mib, the commands are not finding the mibs.
Re: MIBS problem
Posted: Wed Jun 12, 2013 10:03 am
by MPIvan
Ok that was my question .... how to declare the full path to the mib's and to be just one path, one directory or something like that .... or to delete the other empty paths or paths that are not used .......
Re: MIBS problem
Posted: Wed Jun 12, 2013 10:12 am
by abrist
The empty paths don't hurt as it will procedurally search through each one for the necessary mib. If you look at the last path in the default directories below, it is the right path.
Code: Select all
/root/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp