0

I am trying to use SNMP to monitor disk usage for a particular filesystem on several servers. Each server is the only Ubuntu 16.04 guest on a dedicated ESXi host. Each server is configured with two virtual volumes provided by ESX. One volume is used for the OS and the other is used for data only and mounted on /history.

I want to monitor the usage on /history, but an snmpwalk on each server shows it is reported on different OIDs.

When I do an snmpwalk on .1.3.6.1.2.1.25.2.3.1.3 I get two different results:

  • Server A has .1.3.6.1.2.1.25.2.3.1.3.60 /history
  • Server B has .1.3.6.1.2.1.25.2.3.1.3.59 /history

This OID translates to: HOST-RESOURCES-MIB::hrStorageDescr

I have several servers to monitor (not just the two above) and would really love to be able to use the same OID for each server's /history usage statistic.

Is there a way to achieve this consistency?

As far as I can tell the servers are all configured with same number of virtual disks and the same filesystem structure. Within their respective hosts the disks and RAID configurations are the same. Would it even matter how hosts disks are arranged?

I would appreciate any assistance or tips on where to look.

-Sander

Sander
  • 1
  • 1
  • Wrong site. You're looking for [ubuntu.se] or [sf] instead. This site is for programming related questions. – Ken White Feb 14 '18 at 02:07
  • The SNMP RFC documents do not cover that (no enforcement on item order in a table), so it is almost impossible to achieve what you wanted. – Lex Li Feb 14 '18 at 04:09
  • The correct answer is that EVERY system is going to have different configuration, such as storage volumes. Even if the configuration is exactly the same, the SNMP subsystem could use a non-deterministic algorithm to instrument the data (eg. subsystems start up at different times, and are instrumented by time). Your best bet is to rephrase the question to: how can I collect information based on the volume name (description)? If that is the question, the answer is that you need to walk the entire table and search for an entry of that name. – Gambit Support Feb 15 '18 at 15:26
  • Thanks for the responses everyone. I agree that I would need to walk the tree to ensure I get a deterministic result. Unfortunately, the system I am working with does not support this without some dev my client may not pay for. So I am left with a less than perfect solution based on something I discovered since my original post. The SNMP agent apparently puts the storage volumes in the tree in the order in which they are mounted. I got the two different results because one of the servers was rebooted since a mod but the other was not. The mount order changed after the reboot. Thanks again. – Sander Feb 16 '18 at 23:15

0 Answers0