Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

You can monitor lots of different data points about a Linux system using SNMP, if you pick the correct MIB numbers (e.g. like . on

Where is the code for each MIB test stored on a Linux machine?

Is it possible to add your own custom tests? (e.g. when a custom MIB is queried, run a python script and return the response)?

share|improve this question

The location is probably dependent on your distribution; on Debian they live under /usr/share/snmp/mibs. In addition to Antoine's answer on simple exec plugins for net-snmpd, you can also write more complicated plugins for net-snmpd that integrate more seamlessly; I've also written my own Ruby SNMP agent which is designed to make it trivial to handle custom SNMP data (it's the whole reason for it's existence).

share|improve this answer

I don't know where the MIB is stored on a Linux machine but you can add the result of scripts in the default MIB by using the following syntax :

exec railsversion "/bin/bash /etc/snmp/"

It will show up in your MIB which you can test by using the following command.

snmpwalk -v 1 -c public localhost .

This is pretty well documented in the snmpd.conf file found in Debian and probably other distros.

I find this option very useful as it eliminates the need for a specific monitoring agent.

share|improve this answer

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.