Page 1 of 1

Monitoring SNMP Thecus NAS

Posted: Thu Jan 24, 2019 2:10 pm
by alejandro_arroyo
Hi,

I am trying to configure the monitoring of a Thecus NAS using SNMP. I already tested the NAS with MIB browser software and found for example that with this OID I get the used percentage of every RAID:

.iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage
.1.3.6.1.4.1.38243.1.3.1.1.8

If I query using a MIB Browser tool I get a correct response, but if I use the Configuration Wizard: SNMP Walk with the OID field empty to scan for all OIDs on the device I get multiple results but not the ones I want.

I believe the MIB file is not loaded properly. From terminal, if I execute
./check_snmp -P 2c -C public -H [ip address] --oid
.iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage

I get this response:
SNMP OK - No Such Instance currently exists at this OID |

How do I know if the MIB file is loaded properly?

Thanks,

Alejandro Arroyo

Re: Monitoring SNMP Thecus NAS

Posted: Thu Jan 24, 2019 5:44 pm
by cdienger
Did you load the mib under Admin > System Extensions > Manage MIBs and do you see it under /usr/share/snmp/mibs/ ? The mib file should have read access set for everyone.

Does the command work if you use the number instead of the name:

./check_snmp -P 2c -C public -H [ip address] --oid .1.3.6.1.4.1.38243.1.3.1.1.8

?

Re: Monitoring SNMP Thecus NAS

Posted: Fri Jan 25, 2019 11:15 am
by alejandro_arroyo
Hello,

Yes I loaded the MIB files from the GUI (admin > manage MIBS). I see them listed on /usr/share/snmp/mibs :

[root@nagios mibs]# ls -l NAS*
-rw-rw-r-- 1 apache apache 6223 Jan 24 13:52 NAS-DISK-MIB.txt
-rw-rw-r-- 1 apache apache 4170 Jan 24 13:52 NAS-RAID-MIB.txt
-rw-rw-r-- 1 apache apache 3132 Jan 25 11:06 NAS-SYSTEM-MIB.txt
[root@nagios mibs]#

Read permissions are present. The owner of the file was apache and the others are root:nagios. I changed to root:nagios:

[root@nagios mibs]# chown root:nagios NAS*
[root@nagios mibs]# ls -l NAS*
-rw-rw-r-- 1 root nagios 6223 Jan 24 13:52 NAS-DISK-MIB.txt
-rw-rw-r-- 1 root nagios 4170 Jan 24 13:52 NAS-RAID-MIB.txt
-rw-rw-r-- 1 root nagios 3132 Jan 25 11:06 NAS-SYSTEM-MIB.txt

But the results are the same:

check_snmp -P 2c -C public -H [ip address] --oid .1.3.6.1.4.1.38243.1.3.1.1.8
SNMP OK - No Such Instance currently exists at this OID |

[root@nagios libexec]# ./check_snmp -P 2c -C public -H 192.168.0.18 --oid .iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage
SNMP OK - No Such Instance currently exists at this OID |
[root@nagios libexec]#

Thanks

Re: Monitoring SNMP Thecus NAS

Posted: Fri Jan 25, 2019 4:07 pm
by cdienger
Are you able to run snmpget on the machine with the MIB browser? I'd be curious to see the results of running this command on both that machine and the XI server:

snmpget -v2c -c public .iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage
snmpget -v2c -c public .1.3.6.1.4.1.38243.1.3.1.1.8

Re: Monitoring SNMP Thecus NAS

Posted: Fri Jan 25, 2019 4:26 pm
by alejandro_arroyo
Hi,

The machine with MIB browser is Windows based, not sure if I can use snmpget.

Using snmpget on nagios xi machine:

# cd /usr/bin
# ./snmpget -c public -v 2c 192.168.0.18 .iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage
No log handling enabled - turning on stderr logging
.iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage: Unknown Object Identifier (Sub-id not found: enterprises -> nasstorage)
# snmpget -c public -v 2c 192.168.0.18 .1.3.6.1.4.1.38243.1.3.1.1.8
SNMPv2-SMI::enterprises.38243.1.3.1.1.8 = No Such Instance currently exists at this OID
#

I also ran snmpwalk on the nagios xi server:

# cd /usr/bin
# ./snmpwalk -v 2c -c public 192.168.0.18 .1.3.6.1.4.1.38243.1.3

SNMPv2-SMI::enterprises.38243.1.3.1.1.2.1 = INTEGER: 0
SNMPv2-SMI::enterprises.38243.1.3.1.1.3.1 = STRING: "RAID5NAS02"
SNMPv2-SMI::enterprises.38243.1.3.1.1.4.1 = STRING: "raid5"
SNMPv2-SMI::enterprises.38243.1.3.1.1.5.1 = INTEGER: 0
SNMPv2-SMI::enterprises.38243.1.3.1.1.6.1 = STRING: "sda2 sdh2 sdg2 sdf2 sde2 sdd2 sdc2 sdb2"
SNMPv2-SMI::enterprises.38243.1.3.1.1.7.1 = STRING: "34167834624 KB"
SNMPv2-SMI::enterprises.38243.1.3.1.1.8.1 = INTEGER: 90


Thanks,

Alejandro Arroyo

Re: Monitoring SNMP Thecus NAS

Posted: Mon Jan 28, 2019 2:18 pm
by cdienger
It looks like there may be another level that needs to be defined. Try:

snmpget -c public -v 2c 192.168.0.18 .1.3.6.1.4.1.38243.1.3.1.1.8.0
snmpget -v2c -c public .iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage.0


snmpget -c public -v 2c 192.168.0.18 .1.3.6.1.4.1.38243.1.3.1.1.8.1
snmpget -v2c -c public .iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage.1


The SNMP walk wizard may not show all results too if there are a lot. Increasing the settings in php.ini can help:

https://support.nagios.com/kb/article/n ... e-611.html

There is also a "Max Results" field in the wizard that defaults to 100. You may need to increase that.

Re: Monitoring SNMP Thecus NAS

Posted: Tue Jan 29, 2019 1:40 pm
by alejandro_arroyo
Hi,

These are the results:

snmpget -c public -v 2c 192.168.0.18 .1.3.6.1.4.1.38243.1.3.1.1.8.0
SNMPv2-SMI::enterprises.38243.1.3.1.1.8.0 = INTEGER: 90

snmpget -c public -v 2c 192.168.0.18 .1.3.6.1.4.1.38243.1.3.1.1.8.1
SNMPv2-SMI::enterprises.38243.1.3.1.1.8.1 = INTEGER: 90

snmpget -c public -v 2c 192.168.0.18 .iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage.0
No log handling enabled - turning on stderr logging
.iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage.0: Unknown Object Identifier (Sub-id not found: enterprises -> nasstorage)

snmpget -c public -v 2c 192.168.0.18 .iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage.1
No log handling enabled - turning on stderr logging
.iso.org.dod.internet.private.enterprises.nasstorage.nas.nasRaid.raidTable.raidEntry.raidUsedPercentage.1: Unknown Object Identifier (Sub-id not found: enterprises -> nasstorage)


Let me modify php.ini and Max Results and will let you know.

Thanks,

Alejandro

Re: Monitoring SNMP Thecus NAS

Posted: Tue Jan 29, 2019 3:40 pm
by cdienger
Thanks. Keep us posted.