Operating System - Tru64 Unix
1748166 Members
3579 Online
108758 Solutions
New Discussion юеВ

Tracking Disk Space via snmp trap

 
Alan NGUYEN
Occasional Contributor

Tracking Disk Space via snmp trap

Does anyone know how to set up the snmp trap to monitor the disk space ?

Alan
3 REPLIES 3
Ivan Ferreira
Honored Contributor

Re: Tracking Disk Space via snmp trap

Normally, we dont "send" traps based on disk space, we "get" the information via snmp and use the software to send an alert or notification (For example, nagios, System Insight Manager??)
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Manish PATHAK_2
Regular Advisor

Re: Tracking Disk Space via snmp trap

Hi ,

Please find one script below, thanks to ernesto for writting the same.

#!/bin/sh
THRESHHOLD="7[0-9]%"
THRESHHOLD1="8[0-9]%"
THRESHHOLD2="9[0-9]%"
THRESHHOLD3="100%"

# BDF ON SERVER_NAME
echo "#######################" > bdf_on_servers.txt
echo "# BDF ON SERVER_NAME#" >> bdf_on_servers.txt
echo "#######################" >> bdf_on_servers.txt
echo "\n" >> bdf_on_servers.txt
echo "Filesystem kbytes used avail %used Mounted on \n" >> bdf_on_servers.txt
bdf -l | grep -e $THRESHHOLD -e $THRESHHOLD1 -e $THRESHHOLD2 -e $THRESHHOLD3 >> bdf_on_servers.txt

ux2dos bdf_on_servers.txt | mailx -s "BDF on UNIX SERVERS" name.surname@site.it

where name.surname@site.it is your email address.

i didn't checked it but Hopefully it should work.

Regards
Manish
Manish PATHAK_2
Regular Advisor

Re: Tracking Disk Space via snmp trap

Why don't you try MRTG or BigBrother. I have used both and they gives very good result.


Regards
Manish