0

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
  • 2
    "the file"? Which file? Heck, which snmpd?
    – DerfK
    Mar 16, 2011 at 22:09
  • 1
    Sorry for being terse! It's the snmpd.conf from net-snmp. Mar 20, 2011 at 3:32

2 Answers 2

4

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.

-2

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

1
  • 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, 2012 at 18:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .