MIBS problem

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: MIBS problem

Post 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:~#
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MIBS problem

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: MIBS problem

Post 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:~#
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MIBS problem

Post by abrist »

So your mib is there and working. When doing a walk ir translating a trap, make sure to specify the whole path.

Code: Select all

 /usr/share/mibs/netsnmp/
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: MIBS problem

Post 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 .....
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MIBS problem

Post 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:

Code: Select all

/usr/share/mibs/netsnmp/
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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: MIBS problem

Post 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 .....
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MIBS problem

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: MIBS problem

Post 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 .......
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MIBS problem

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked