Page 1 of 1

Disk Space Plugin is not detecting the drive

Posted: Wed Aug 29, 2018 9:06 am
by Siddharth Hegde
Hi,

I have installed nope in one of the servers and in that server

Code: Select all

command[check_hda1]
and

Code: Select all

command[check_disk]
and

Code: Select all

command[check_mnt]
is not working. it is not detecting the drive.

Code: Select all

DISK CRITICAL - /dev/hda1 is not accessible: No such file or directory
In Client

Code: Select all

vi /usr/local/nagios/etc/nrpe.cfg

command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda1
command[check_mnt]=/usr/local/nagios/libexec/check_disk -w 5% -c 3% -p /mymnt
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 5% -c 3% -A -I '/mydrive/*'

Code: Select all

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        30G  8.3G   21G  29% /
/dev/sdc1        50G   38G  9.1G  81% /mydrive
/dev/sdb1       197G   60M  187G   1% /mymnt
In Nagios Server

Code: Select all


/usr/local/nagios/etc/servers/client.cfg

define service{
        use                             generic-service
        host_name                       client
        service_description             Disk Space
        check_command                   check_nrpe!check_hda1!20%!10%!/
        contact_groups                 nagiosadmin
        }
define service{
        use                             generic-service
        host_name                      client
        service_description             Disk Spaces
        check_command                   check_nrpe!check_disk
        contact_groups                 nagiosadmin
        }
and

Code: Select all

vi /usr/local/nagios/etc/objects/commands.cfg

#'check_disk' command definition
define command{
    command_name    check_disk
    command_line    $USER1$/check_nrpe -H '$HOSTADDRESS$' -t 30 -c check_disk
     }
Please let me know how to resolve the issue and also, if there is any better way to get the disk details.

Thanks,
Siddarth Hegde

Re: Disk Space Plugin is not detecting the drive

Posted: Wed Aug 29, 2018 11:14 am
by scottwilkerson
You would change this

Code: Select all

command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda1
to this

Code: Select all

command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
then restart nrpe

Re: Disk Space Plugin is not detecting the drive

Posted: Thu Aug 30, 2018 12:57 am
by Siddharth Hegde
Thank You scottwilkerson for resolving this issue

Re: Disk Space Plugin is not detecting the drive

Posted: Thu Aug 30, 2018 8:12 am
by scottwilkerson
Siddharth Hegde wrote:Thank You scottwilkerson for resolving this issue
Great!
Locking thread