Check Disk Space Plugin for Nagios and Cacti

check_disk_cacti_nagios

This script provides disk utilization for a mountpoint on the target machine.

Should work with many flavors of Linux, and possibly UNIX.  (Uses GNU df)

This script requires: 1) Change NAGCACTIUSER to match the username you use for Nagios/Cacti data collection. 2) ssh key set up from the Nagios/Cacti server to the desired user on the remote machine 3) If the user that connects to the remote machine is different from the one that Nagios/Cacti run under, then you need something like this in sudoers:

cacti   ALL=NOPASSWD: /bin/su - *

In command.cfg:

define command{
    command_name    check_disk
    command_line    $USER1$/check_disk_cacti_nagios.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ nagios
}

In services.cfg

define service{
    use                             service_1_min      
    host_name                       remotehost1,remotehost2
    service_description             /var space
    check_command                   check_disk!/var!80!90
    max_check_attempts              5
    contact_groups                  admins
}

Info on importing into Cacti