I would like to configure snmpd to send traps for disk usage. Currently the file includes these lines:

disk /ramdisk
ignoreDisk /dev/sda1
ignoreDisk /dev/sda3
disk / 1%
load 60 30 15
linkUpDownNotifications yes

As far as I know that will just allow snmpget requests for this data. How do I enable traps based off this info? Thanks!

  • 2
    "the file"? Which file? Heck, which snmpd? – DerfK Mar 16 '11 at 22:09
  • 1
    Sorry for being terse! It's the snmpd.conf from net-snmp. – CarpeNoctem Mar 20 '11 at 3:32

Net-snmp can be configured to make internal SNMP query and send traps from DISMAN-EVENT-MIB when disk usage exceeds defined threshold.

In order to send traps for the disk usage, add the following lines to snmpd.conf and restart the agent:

# trap target and community
trap2sink localhost public

# authorization for self monitoring
createUser    internalMonitoringName SHA mysecretpassword AES
rouser        internalMonitoringName
iquerySecName internalMonitoringName

# define
# message to send 
# OID to monitor
# threshold value
monitor DiskAlmostFull dskPercent > 90

Details can be found on http://www.net-snmp.org/wiki/index.php/TUT:DisMan_Monitoring and in man snmpd.conf - section about DisMan Event MIB.


Out of the box, snmpd on Linux does not have getting information on disk usage enabled. This has to be manually added. To do this add the disk(s) to be monitored to the end of /etc/snmp/snmpd.conf

have a look at the following tutorial for steps How to set up SNMP to get disk usage information from servers

  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Scott Pack Oct 20 '12 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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