Check_disk issue

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 issue

Post 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
User avatar
Rfferrao13
Posts: 12
Joined: Tue Aug 09, 2016 3:56 pm

Re: Check_disk issue

Post 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)?
Siddharth Hegde
Posts: 70
Joined: Mon Aug 07, 2017 4:19 am

Re: Check_disk issue

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

Re: Check_disk issue

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked