Page 1 of 2

Nagios XI - SNMP walk wizard not using MIB's

Posted: Mon Oct 19, 2015 8:31 am
by jacek
Hello,

I've recently noticed, that the SNMP walk wizard does not use the OID's from MIB's I've added (it is even saying that it is using SNMPv2-SMI in the "MIB To Use" column).
I presume this is the same topic as here (https://support.nagios.com/forum/viewto ... 16&t=30838), but I have no access...
Here You have the screen of the 1st and 2nd wizard steps, so You see what I've set:
NagiosXI-snmpwalkwizard-1.PNG
NagiosXI-snmpwalkwizard-2.PNG
Now below You can find the result of the snmpwalk command, where I explicitly told to use the QNAP MIB file and this works perfectly as You can see.

Code: Select all

snmpwalk -m /usr/share/snmp/mibs/QNAP-TS-221.mib 172.16.11.85 -v 2c -c public .1.3.6.1.4.1.24681.1
QNAP-TS-221::SystemCPU-Usage.0 = STRING: "100.00 %"
QNAP-TS-221::IfIndexEX.1 = INTEGER: 1
QNAP-TS-221::IfDescrEX.1 = STRING: "eth0"
QNAP-TS-221::IfPacketsReceivedEX.1 = Counter32: 2147483647
QNAP-TS-221::IfPacketsSentEX.1 = Counter32: 2147483647
QNAP-TS-221::IfErrorPacketsEX.1 = Counter32: 2
QNAP-TS-221::HdIndexEX.1 = INTEGER: 1
QNAP-TS-221::HdIndexEX.2 = INTEGER: 2
QNAP-TS-221::HdDescrEX.1 = STRING: "HDD1"
QNAP-TS-221::HdDescrEX.2 = STRING: "HDD2"
QNAP-TS-221::HdTemperatureEX.1 = Wrong Type (should be INTEGER): STRING: "34 C/93 F"
QNAP-TS-221::HdTemperatureEX.2 = Wrong Type (should be INTEGER): STRING: "33 C/91 F"
I presume I should somehow change the MIB to use? I tried to change the name to QNAP-TS-221 and go forward and back in the wizard, but this didn't help (didn't really expect it would, but hey, why not test?).
Maybe someone has access to the thread linked on the beginning of my post...?

Re: Nagios XI - SNMP walk wizard not using MIB's

Posted: Mon Oct 19, 2015 4:39 pm
by ssax
What are the permissions on your MIB?

Code: Select all

ls -l /usr/share/snmp/mibs/QNAP-TS-221.mib

Re: Nagios XI - SNMP walk wizard not using MIB's

Posted: Mon Oct 19, 2015 4:40 pm
by tgriep
When you run the wizard, try increasing the timeout to 180, the Max Results to 2000 and change the force scan to yes.
It might take a while to run this and that should help.
Can you run the following and post the output?

Code: Select all

 ls -l/usr/share/snmp/mibs

Re: Nagios XI - SNMP walk wizard not using MIB's

Posted: Tue Oct 20, 2015 4:16 am
by jacek
I've already thought about the same, as on the Nagios XI "Manage MIB's" You can see the permissions, and I noticed, that newly added had apache/apache.
So I deleted the MIB, re-downloaded the file keeping it's original name (file and OID inside the file): NAS-MIB.mib.
I corrected the permissions by copying them from other file, here is the result:

Code: Select all

ls -l /usr/share/snmp/mibs/
total 1820
-rw-rw-r-- 1 root nagios  17455 Aug 17 17:57 AGENTX-MIB.txt
-rw-rw-r-- 1 root nagios  50948 Aug 17 17:57 BRIDGE-MIB.txt
-rw-rw-r-- 1 root nagios  68104 Aug 17 17:57 DISMAN-EVENT-MIB.txt
-rw-rw-r-- 1 root nagios  24613 Aug 17 17:57 DISMAN-SCHEDULE-MIB.txt
-rw-rw-r-- 1 root nagios  64311 Aug 17 17:57 DISMAN-SCRIPT-MIB.txt
-rw-rw-r-- 1 root nagios  84492 Aug 17 17:57 EtherLike-MIB.txt
-rw-rw-r-- 1 root nagios   4660 Aug 17 17:57 HCNUM-TC.txt
-rw-rw-r-- 1 root nagios  52544 Aug 17 17:57 HOST-RESOURCES-MIB.txt
-rw-rw-r-- 1 root nagios  10583 Aug 17 17:57 HOST-RESOURCES-TYPES.txt
-rw-rw-r-- 1 root nagios   4819 Aug 17 17:57 IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
-rw-rw-r-- 1 root nagios  29665 Aug 17 17:57 IANAifType-MIB.txt
-rw-rw-r-- 1 root nagios   4299 Aug 17 17:57 IANA-LANGUAGE-MIB.txt
-rw-rw-r-- 1 root nagios   3513 Aug 17 17:57 IANA-RTPROTO-MIB.txt
-rw-rw-r-- 1 root nagios   5066 Aug 17 17:57 IF-INVERTED-STACK-MIB.txt
-rw-rw-r-- 1 root nagios  71691 Aug 17 17:57 IF-MIB.txt
-rw-rw-r-- 1 root nagios  16782 Aug 17 17:57 INET-ADDRESS-MIB.txt
-rw-rw-r-- 1 root nagios  46286 Aug 17 17:57 IP-FORWARD-MIB.txt
-rw-rw-r-- 1 root nagios 185667 Aug 17 17:57 IP-MIB.txt
-rw-rw-r-- 1 root nagios  15936 Aug 17 17:57 IPV6-ICMP-MIB.txt
-rw-rw-r-- 1 root nagios  48703 Aug 17 17:57 IPV6-MIB.txt
-rw-rw-r-- 1 root nagios   7257 Aug 17 17:57 IPV6-TCP-MIB.txt
-rw-rw-r-- 1 root nagios   2367 Aug 17 17:57 IPV6-TC.txt
-rw-rw-r-- 1 root nagios   4400 Aug 17 17:57 IPV6-UDP-MIB.txt
-rw-rw-r-- 1 root nagios   5931 Aug 17 17:57 LM-SENSORS-MIB.txt
-rw-rw-r-- 1 root nagios  42375 Aug 17 17:57 MTA-MIB.txt
-rwxrwxr-x 1 root nagios  19760 Sep 30 12:37 NAGIOS-NOTIFY-MIB.txt
-rwxrwxr-x 1 root nagios   2093 Sep 30 12:37 NAGIOS-ROOT-MIB.txt
[b]-rw-rw-r-- 1 root nagios  24061 Oct 20 10:32 NAS-MIB.mib[/b]
-rw-rw-r-- 1 root nagios  15732 Aug 17 17:57 NET-SNMP-AGENT-MIB.txt
-rw-rw-r-- 1 root nagios   9160 Aug 17 17:57 NET-SNMP-EXAMPLES-MIB.txt
-rw-rw-r-- 1 root nagios   9198 Aug 17 17:57 NET-SNMP-EXTEND-MIB.txt
-rw-rw-r-- 1 root nagios   2036 Aug 17 17:57 NET-SNMP-MIB.txt
-rw-rw-r-- 1 root nagios   3350 Aug 17 17:57 NET-SNMP-PASS-MIB.txt
-rw-rw-r-- 1 root nagios   4686 Aug 17 17:57 NET-SNMP-TC.txt
-rw-rw-r-- 1 root nagios   5039 Aug 17 17:57 NET-SNMP-VACM-MIB.txt
-rw-rw-r-- 1 root nagios  21006 Aug 17 17:57 NETWORK-SERVICES-MIB.txt
-rw-rw-r-- 1 root nagios  24694 Aug 17 17:57 NOTIFICATION-LOG-MIB.txt
-rw-rw-r-- 1 root nagios   3067 Aug 17 17:57 RFC1155-SMI.txt
-rw-rw-r-- 1 root nagios  79667 Aug 17 17:57 RFC1213-MIB.txt
-rw-rw-r-- 1 root nagios   1174 Aug 17 17:57 RFC-1215.txt
-rw-rw-r-- 1 root nagios 147822 Aug 17 17:57 RMON-MIB.txt
-rw-rw-r-- 1 root nagios  45323 Aug 17 17:57 SCTP-MIB.txt
-rw-rw-r-- 1 root nagios   4649 Aug 17 17:57 SMUX-MIB.txt
-rw-rw-r-- 1 root nagios  15490 Aug 17 17:57 SNMP-COMMUNITY-MIB.txt
-rw-rw-r-- 1 root nagios  22342 Aug 17 17:57 SNMP-FRAMEWORK-MIB.txt
-rw-rw-r-- 1 root nagios   5496 Aug 17 17:57 SNMP-MPD-MIB.txt
-rw-rw-r-- 1 root nagios  20014 Aug 17 17:57 SNMP-NOTIFICATION-MIB.txt
-rw-rw-r-- 1 root nagios   9106 Aug 17 17:57 SNMP-PROXY-MIB.txt
-rw-rw-r-- 1 root nagios  22769 Aug 17 17:57 SNMP-TARGET-MIB.txt
-rw-rw-r-- 1 root nagios  39201 Aug 17 17:57 SNMP-USER-BASED-SM-MIB.txt
-rw-rw-r-- 1 root nagios   2205 Aug 17 17:57 SNMP-USM-AES-MIB.txt
-rw-rw-r-- 1 root nagios  21101 Aug 17 17:57 SNMP-USM-DH-OBJECTS-MIB.txt
-rw-rw-r-- 1 root nagios   8263 Aug 17 17:57 SNMPv2-CONF.txt
-rw-rw-r-- 1 root nagios  29305 Aug 17 17:57 SNMPv2-MIB.txt
-rw-rw-r-- 1 root nagios   8924 Aug 17 17:57 SNMPv2-SMI.txt
-rw-rw-r-- 1 root nagios  38034 Aug 17 17:57 SNMPv2-TC.txt
-rw-rw-r-- 1 root nagios   5775 Aug 17 17:57 SNMPv2-TM.txt
-rw-rw-r-- 1 root nagios  34162 Aug 17 17:57 SNMP-VIEW-BASED-ACM-MIB.txt
-rw-rw-r-- 1 root nagios  28564 Aug 17 17:57 TCP-MIB.txt
-rw-rw-r-- 1 root nagios  16418 Aug 17 17:57 TRANSPORT-ADDRESS-MIB.txt
-rw-rw-r-- 1 root nagios   2163 Aug 17 17:57 UCD-DEMO-MIB.txt
-rw-rw-r-- 1 root nagios   4402 Aug 17 17:57 UCD-DISKIO-MIB.txt
-rw-rw-r-- 1 root nagios   3010 Aug 17 17:57 UCD-DLMOD-MIB.txt
-rw-rw-r-- 1 root nagios   8118 Aug 17 17:57 UCD-IPFWACC-MIB.txt
-rw-rw-r-- 1 root nagios  46150 Aug 17 17:57 UCD-SNMP-MIB.txt
-rw-rw-r-- 1 root nagios  20882 Aug 17 17:57 UDP-MIB.txt
I re-run the test, setting 180 timeout and 1000 results.
I've got exactly 26 OID's (exactly as before - I didn't fit them all into the previous screenshot, but they are exactly the same as the result from the cmd in my last post where I set which MIB to use).

I've also tested the wizard with blanking out the OID field, set 180 timeout and 5000 results limit which gave me 1417 results (hanging the web browser).
The MIB To Use column showed: SNMPv2-MIB, IF-MIB, RFC1213-MIB, IP-MIB, IP-FORWARD-MIB, TCP-MIB.

Re: Nagios XI - SNMP walk wizard not using MIB's

Posted: Tue Oct 20, 2015 8:08 am
by gormank
It may not matter, but you might run file on the files in the mib dir to see if they have DOS crlf and use dos2unix to fix any you find.

Re: Nagios XI - SNMP walk wizard not using MIB's

Posted: Tue Oct 20, 2015 4:17 pm
by tgriep
Thanks gormank for the tip.

Can you post the MIB file so we can review it?

Re: Nagios XI - SNMP walk wizard not using MIB's

Posted: Wed Oct 21, 2015 2:26 am
by jacek
Thanks for the reply,
looks fine to me (look below), only the NAGIOS-NOTIFY-MIB.txt and NAGIOS-ROOT-MIB.txt have the CRLF terminators.
The only difference I see is the extension (*.mib instead of *.txt, but I can't imagine that this would be a problem on Linux).

I've also attached the file:
NAS-MIB.zip

Code: Select all

file /usr/share/snmp/mibs/*
/usr/share/snmp/mibs/AGENTX-MIB.txt:                      ASCII English text
/usr/share/snmp/mibs/BRIDGE-MIB.txt:                      ASCII English text
/usr/share/snmp/mibs/DISMAN-EVENT-MIB.txt:                ASCII English text
/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt:             ASCII English text
/usr/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt:               ASCII English text
/usr/share/snmp/mibs/EtherLike-MIB.txt:                   ASCII English text
/usr/share/snmp/mibs/HCNUM-TC.txt:                        ASCII English text
/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt:              ASCII English text
/usr/share/snmp/mibs/HOST-RESOURCES-TYPES.txt:            ASCII English text
/usr/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt: ASCII English text
/usr/share/snmp/mibs/IANAifType-MIB.txt:                  ASCII English text
/usr/share/snmp/mibs/IANA-LANGUAGE-MIB.txt:               ASCII English text
/usr/share/snmp/mibs/IANA-RTPROTO-MIB.txt:                ASCII English text
/usr/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt:           ASCII English text
/usr/share/snmp/mibs/IF-MIB.txt:                          ASCII English text
/usr/share/snmp/mibs/INET-ADDRESS-MIB.txt:                ASCII English text
/usr/share/snmp/mibs/IP-FORWARD-MIB.txt:                  ASCII English text
/usr/share/snmp/mibs/IP-MIB.txt:                          ASCII English text
/usr/share/snmp/mibs/IPV6-ICMP-MIB.txt:                   ASCII English text
/usr/share/snmp/mibs/IPV6-MIB.txt:                        ASCII English text
/usr/share/snmp/mibs/IPV6-TCP-MIB.txt:                    ASCII English text
/usr/share/snmp/mibs/IPV6-TC.txt:                         ASCII English text
/usr/share/snmp/mibs/IPV6-UDP-MIB.txt:                    ASCII English text
/usr/share/snmp/mibs/LM-SENSORS-MIB.txt:                  ASCII English text
/usr/share/snmp/mibs/MTA-MIB.txt:                         ASCII English text
/usr/share/snmp/mibs/NAGIOS-NOTIFY-MIB.txt:               ASCII English text, with CRLF line terminators
/usr/share/snmp/mibs/NAGIOS-ROOT-MIB.txt:                 ASCII English text, with CRLF line terminators
/usr/share/snmp/mibs/NAS-MIB.mib:                         ASCII English text
/usr/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt:              ASCII English text
/usr/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt:           ASCII English text
/usr/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt:             ASCII English text
/usr/share/snmp/mibs/NET-SNMP-MIB.txt:                    ASCII English text
/usr/share/snmp/mibs/NET-SNMP-PASS-MIB.txt:               ASCII English text
/usr/share/snmp/mibs/NET-SNMP-TC.txt:                     ASCII English text
/usr/share/snmp/mibs/NET-SNMP-VACM-MIB.txt:               ASCII English text
/usr/share/snmp/mibs/NETWORK-SERVICES-MIB.txt:            ASCII English text
/usr/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt:            ASCII English text
/usr/share/snmp/mibs/RFC1155-SMI.txt:                     ASCII English text
/usr/share/snmp/mibs/RFC1213-MIB.txt:                     ASCII English text
/usr/share/snmp/mibs/RFC-1215.txt:                        ASCII English text
/usr/share/snmp/mibs/RMON-MIB.txt:                        ASCII English text
/usr/share/snmp/mibs/SCTP-MIB.txt:                        ASCII English text
/usr/share/snmp/mibs/SMUX-MIB.txt:                        ASCII English text
/usr/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt:              ASCII English text
/usr/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt:              ASCII English text
/usr/share/snmp/mibs/SNMP-MPD-MIB.txt:                    ASCII English text
/usr/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt:           ASCII English text
/usr/share/snmp/mibs/SNMP-PROXY-MIB.txt:                  ASCII English text
/usr/share/snmp/mibs/SNMP-TARGET-MIB.txt:                 ASCII English text
/usr/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt:          ASCII English text
/usr/share/snmp/mibs/SNMP-USM-AES-MIB.txt:                ASCII English text
/usr/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt:         ASCII English text
/usr/share/snmp/mibs/SNMPv2-CONF.txt:                     ASCII English text
/usr/share/snmp/mibs/SNMPv2-MIB.txt:                      ASCII English text
/usr/share/snmp/mibs/SNMPv2-SMI.txt:                      ASCII English text
/usr/share/snmp/mibs/SNMPv2-TC.txt:                       ASCII English text
/usr/share/snmp/mibs/SNMPv2-TM.txt:                       ASCII English text
/usr/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt:         ASCII English text
/usr/share/snmp/mibs/TCP-MIB.txt:                         ASCII English text
/usr/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt:           ASCII English text
/usr/share/snmp/mibs/UCD-DEMO-MIB.txt:                    ASCII English text
/usr/share/snmp/mibs/UCD-DISKIO-MIB.txt:                  ASCII English text
/usr/share/snmp/mibs/UCD-DLMOD-MIB.txt:                   ASCII English text
/usr/share/snmp/mibs/UCD-IPFWACC-MIB.txt:                 ASCII English text
/usr/share/snmp/mibs/UCD-SNMP-MIB.txt:                    ASCII English text
/usr/share/snmp/mibs/UDP-MIB.txt:                         ASCII English text

Re: Nagios XI - SNMP walk wizard not using MIB's

Posted: Wed Oct 21, 2015 5:22 pm
by tgriep
The MiB file looks good. I translated it and the OID's look correct.

Try running the wizard again but don't fill in the OID field. Does it find the OID's that you are looking for?

Re: Nagios XI - SNMP walk wizard not using MIB's

Posted: Wed Oct 21, 2015 5:29 pm
by jdalrymple
A stab in the dark of my own - can you try importing this MIB also?

Re: Nagios XI - SNMP walk wizard not using MIB's

Posted: Thu Oct 22, 2015 7:06 am
by jacek
tgriep wrote:The MiB file looks good. I translated it and the OID's look correct.

Try running the wizard again but don't fill in the OID field. Does it find the OID's that you are looking for?
Nope, sadly not, its puking a lot of IP OID's etc.
jdalrymple wrote:A stab in the dark of my own - can you try importing this MIB also?
Hmm, did it, but what You want me to do with it?