Page 1 of 1

Check_disk issue

Posted: Fri Aug 02, 2019 2:06 am
by Siddharth Hegde
Hi,

I'm getting this error in one of the servers I'm monitoring.

Code: Select all

DISK CRITICAL - /sys/kernel/debug/tracing is not accessible: Permission denied
host.cfg

Code: Select all

define service{
        use                                     generic-service
        host_name                          server
        service_description             Disk Spaces
        check_command                 check_nrpe!check_disk
        contact_groups                   server-monitoring
        }
client.cfg

Code: Select all

command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 5% -c 3% -A -I '/storagedisk/
command[check_mnt]=/usr/local/nagios/libexec/check_disk -w 5% -c 3% -p /mnt
commands.cfg

Code: Select all

define command{
    command_name    check_disk
    command_line    $USER1$/check_nrpe -H '$HOSTADDRESS$' -t 30 -c check_disk
     }
Please help me in resolving this issue

Regards,
Siddarth Hegde

Re: Check_disk issue

Posted: Sun Aug 04, 2019 9:10 am
by Rfferrao13
Hello,

Is SELinux active on the monitored server? Which user is running the NRPE service? Can you test that command logged in with that user and attest if the results are the same as in executing remotely (from Nagios)?

Re: Check_disk issue

Posted: Mon Aug 05, 2019 6:45 am
by Siddharth Hegde
Hi @Rfferrao13,

I'm getting this

Nagios Server

Code: Select all

user@nagios:/usr/local/nagios/libexec# ./check_nrpe -H x.x.x.x -c check_disk
DISK CRITICAL - /sys/kernel/debug/tracing is not accessible: Permission denied
Client Server

Code: Select all

user@clientserver:/etc/selinux# sestatus
SELinux status:                 disabled

Code: Select all

user@clientserver:/usr/local/nagios/libexec# ./check_nrpe -H 127.0.0.1 -c check_disk
DISK CRITICAL - /sys/kernel/debug/tracing is not accessible: Permission denied
Regards,
Siddarth Hegde

Re: Check_disk issue

Posted: Mon Aug 05, 2019 7:54 am
by scottwilkerson
From your example the check_disk command has a non-closed quote

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk -w 5% -c 3% -A -I '/storagedisk/
Also, you may need to add the path that is not accessible to the I flag

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk -w 5% -c 3% -A -I '/storagedisk/' -I '/sys/kernel/debug/tracing'
then restart NRPE