Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure snmpd on my CentOS hosts to monitor the free disk usage in percent.

If I set snmpd.conf to

disk /
disk /var

, the values can be queries with for "/" and for "/var".

I have several servers which don't have a separate "/var" partition. So the disk layout isn't standardized. I figured out, that the disk statement order in snmpd.conf dictates the dskIndex number of the snmp query result. So if I would flip "/" and "/var", "/" would have dskIndex 2.

In my monitoring system, I would have to configure each OID for each server separately because they might be different. So the idea is to have placeholders for non-existing filesystems.

Is it possible to either have placeholders to artificially count the dskIndex up or to somehow influence the dskIndex manually in snmpd.conf?

Thanks in advance

share|improve this question

I don't know how to change dskIndex manually but snmpd use the order define in the snmpd.conf file , so it's predictable.

If you look for an other solution read above :
snmpd provide information about the disk index , if you poll the oid : the system will return list of disk available , example:

$ snmpwalk -v 2c -c public
iso. = STRING: "Physical memory"
iso. = STRING: "Virtual memory"
iso. = STRING: "Memory buffers"
iso. = STRING: "Cached memory"
iso. = STRING: "Shared memory"
iso. = STRING: "Swap space"
iso. = STRING: "/"
iso. = STRING: "/sys/fs/fuse/connections"
iso. = STRING: "/dev"
iso. = STRING: "/media/KINGSTON"

the last digit is the index , so you can request size of the / partition like this :

snmpwalk -v 2c -c public
iso. = INTEGER: 37458759

I don't know which monitoring system you use but read this script, the perl script retrieve the index table with SNMP and request only the good OID. It work for nagios maybe you can adapt it for an other system.

share|improve this answer
I'm using Whatsup v16. I know the index number is predictable, but to not have to configure a monitor per partition and server, I need to be able to define it manually. – zero_r Aug 12 '13 at 9:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.