Disk Space Plugin is not detecting the drive

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Siddharth Hegde
Posts: 70
Joined: Mon Aug 07, 2017 4:19 am

Disk Space Plugin is not detecting the drive

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Disk Space Plugin is not detecting the drive

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Siddharth Hegde
Posts: 70
Joined: Mon Aug 07, 2017 4:19 am

Re: Disk Space Plugin is not detecting the drive

Post by Siddharth Hegde »

Thank You scottwilkerson for resolving this issue
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Disk Space Plugin is not detecting the drive

Post by scottwilkerson »

Siddharth Hegde wrote:Thank You scottwilkerson for resolving this issue
Great!
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked