Check_disk alerts

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

Check_disk alerts

Post by Siddharth Hegde »

Hi All,

I have configured 2 Ubuntu servers, one for Nagios and one for nrpe. I want to configure disk space alerts for a partition /dev/xvda1. But I am getting alerts for all partitions.

Requesting help to configure check_disk only to alert /dev/xvda1 and not others.

host.cfg

Code: Select all

define service{
        use                             generic-service
        host_name                      client
        service_description             Disk Spaces
        check_command                   check_nrpe!check_disk
         contact_groups                  Monitoring
        check_interval                  1
        }
nrpe.cfg in client-server

Code: Select all

command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/xvda1
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 15% -A -I '/dev/xvda1'
commands.cfg

Code: Select all

define command{
    command_name    check_disk
    command_line    $USER1$/check_nrpe -H '$HOSTADDRESS$' -t 30 -c check_disk
     }
Alerts I am getting

Code: Select all

***** Nagios *****

Notification Type: PROBLEM

Service: Disk Spaces
Host: client
Address: x.x.x.x
State: CRITICAL

Date/Time: Tue Apr 27 11:05:28 UTC 2021

Additional Info:

DISK CRITICAL - free space: /dev 475 MB (100.00% inode=100%): /dev/shm 489 MB (100.00% inode=100%): /run 97 MB (99.22% inode=100%): /run/lock 5 MB (100.00% inode=100%): /run/user/1002 97 MB (100.00% inode=100%): /sys/fs/cgroup 489 MB (100.00% inode=100%): /snap/core/10908 0 MB (0.00% inode=0%): /snap/core18/1988 0 MB (0.00% inode=0%): /snap/amazon-ssm-agent/2996 0 MB (0.00% inode=0%): /snap/amazon-ssm-agent/3552 0 MB (0.00% inode=0%): /snap/core18/1997 0 MB (0.00% inode=0%): /snap/core/10958 0 MB (0.00% inode=0%): /run/nrpe 97 MB (99.22% inode=100%):
I have uploaded the server disk (df -h) screenshot in the attachment.

Please let me know if any other information is required to further analyze this issue.

Thanks,
SIddarth Hegde
Attachments
df -H
df -H
Locked