Set up SNMP Trap for disk usage?
15,867
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.
Related videos on Youtube
Author by
CarpeNoctem
Updated on September 17, 2022Comments
-
CarpeNoctem over 1 year
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!
-
DerfK about 13 years"the file"? Which file? Heck, which snmpd?
-
CarpeNoctem about 13 yearsSorry for being terse! It's the snmpd.conf from net-snmp.
-
-
Scott Pack over 11 yearsWhilst 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.