Topic: monitoring disks

does anyone here use scripts to monitor disk usage?

it would be nice to be alerted via email when the capacity of /dev/stripe/st0a goes above 90%.

also, it would be nice to alerted via email if gmirror or gstripe statuses change.

--

ttf cross-post

Last edited by lucas (2009-08-12 07:24:39)

Re: monitoring disks

It might be slightly overkill, but I'll mention it anyway: Nagios. It monitors all sorts of stuff for you by providing a number of plugins (disk usage is one of the default ones, most others check the availability of networking services; also it's very easy to write plugins yourself, they're just shell scripts basically that have to return a status value), and can be configured to do all sorts of things when some set limit is crossed, including of course, sending an email.

Re: monitoring disks

maxlor, can you recommend any other monitoring software?

i've been trying out nagios, and it's pretty messy, in my opinion. is there a cleaner solution that is decent?

Re: monitoring disks

i suppose i'll trudge through this matrix:

http://en.wikipedia.org/wiki/Comparison … ng_systems

Re: monitoring disks

bah. i'm running this every five minutes via cron:

#!/bin/sh

HOSTNAME=`hostname`;
HOME_USAGE=`df | awk '/usr\/home/ { sub(/%/,"",$5); print $5}'`;
GMIRROR_STATUS=`/sbin/gmirror status | grep "^mirror" | awk {'print $2'} | sort -u`;

if [ $HOME_USAGE -ge 90 ]; then

    df -h | mail -s "$HOSTNAME: /usr/home usage high" root

fi

if [ "$GMIRROR_STATUS" != 'COMPLETE' ]; then

    /sbin/gmirror status | mail -s "$HOSTNAME: raid array incomplete" root

fi

any feedback is appreciated! does this look ok?