Merged disk checks

Rasmus Plewe rplewe at ess.nec.de
Thu Dec 19 07:25:07 CET 2002


On Tue, 2002-12-17 at 07:46, Kraus, Markus wrote:
> Hello @,
> 
> I monitor about 100 servers each with at least 5 Partitions. That makes over
> all 500 check_disk calls. Isn' t there a plugin which tests all partitions
> of a system and returns only an over all status?
> 
> Any help which can be offered is greatly appreciated.

checkcommands.cfg:
define command{
        command_name    check_local_disk
        command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ \
-l user -C "/remote/plugins/check_local_disk.sh $ARG1$ $ARG2$"

check_local_disk.sh on the remote host:
#!/bin/sh
FSLIST=`df -hl | grep dev | awk '{print $1} ' | \
sed -e 's|/dev| /dev|g' | tr -d "\n"`
/remote/plugins/check_disk -w $1 -c $2 -p "$FSLIST"

Might not be the most elegant way, but it works. 


Regards,
         Rasmus


-------------------------------------------------------
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players,  XBox Games,  Flying Saucers,  WebCams,  Smart Putty.
T H I N K G E E K . C O M       http://www.thinkgeek.com/sf/




More information about the Users mailing list