DISK CRITIKAL: No such file or directory

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.
stbender
Posts: 5
Joined: Fri Jun 01, 2012 5:20 am

DISK CRITIKAL: No such file or directory

Post by stbender »

Hello,

I want to monitor an ubuntu server 12.04 installation with 3 disks.
Here's the disk configuration from "df":

Code: Select all

/dev/md1         78G    4,1G   70G    6% /
...
/dev/sdc1        19T     84G   18T    1% /mnt/images
/dev/sdc2       2,0T     30G  1,8T    2% /mnt/db
I set up theses Nagios services:

Code: Select all

define service{
        use                             generic-service
        host_name                       server
        service_description             Disk Space /
        check_command                   check_disk!20%!10%!/
        }

define service{
        use                             generic-service 
        host_name                       server
        service_description             Disk Space Images
        check_command                   check_disk!20%!10%!/mnt/images
        }

define service{
        use                             generic-service
        host_name                       server
        service_description             Disk Space DB
        check_command                   check_disk!20%!10%!/mnt/db
        }
The first service for "/" gives a correct status.
The other two services give me an error: "DISK CRITICAL - /mnt/db is not accessible: No such file or directory "

Am I doing something wrong?

Thank you!

Best regards,

Stephan
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: DISK CRITIKAL: No such file or directory

Post by agriffin »

Does the nagios user have read permissions on /mnt/db?
stbender
Posts: 5
Joined: Fri Jun 01, 2012 5:20 am

Re: DISK CRITIKAL: No such file or directory

Post by stbender »

Hi,

well, I guess he does.

doing ls -la /mnt/ I get:

Code: Select all

drwxr-xr-x  4 root root 4096 Jun  1 16:47 db
drwxr-xr-x  4 pacs root 4096 Mai 31 16:44 images
So from "drwxr-xr-x" I assume every user has at least the read permission.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: DISK CRITIKAL: No such file or directory

Post by agriffin »

How about read access to /mnt? Are you running anything like SELinux that might add additional restrictions on top of regular file permissions?
stbender
Posts: 5
Joined: Fri Jun 01, 2012 5:20 am

Re: DISK CRITIKAL: No such file or directory

Post by stbender »

ok, there was a problem with the communication between nagios server and the nagios process on the side of the monitored system.

Thank you!
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: DISK CRITIKAL: No such file or directory

Post by agriffin »

Okay, glad you got everything working!
matt_h2
Posts: 5
Joined: Mon Apr 27, 2015 10:12 am

Re: DISK CRITIKAL: No such file or directory

Post by matt_h2 »

Hi all.

I have a similar issue to stbender above where all but one filesystem reports back fine. The one that doesn't reports the message:
DISK CRITICAL - XXXXX is not accessible: No such file or directory

I've checked to make sure the filesystem and directories are readable by everyone and I'm not running selinux.

I can run the following command locally on the monitoring server which reports back successfully:
/usr/local/nagios/libexec/check_nrpe -H NN.NN.NN.NN -c check_disk -a w20 c10 XXXXX
DISK OK - free space: XXXXX 23710 MB (99% inode=99%);| XXXXX=206MB;25197;25197;0;25197

Can anyone help and/or give me some ideas of things to check please?

Regards

Matt
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: DISK CRITIKAL: No such file or directory

Post by Box293 »

Can you please show us the service definition and also the command definition this service uses.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
matt_h2
Posts: 5
Joined: Mon Apr 27, 2015 10:12 am

Re: DISK CRITIKAL: No such file or directory

Post by matt_h2 »

Service definition:
define service{
use generic-service
host_name HHHHH
service_description Partition PPPPP
check_command check_nrpe_disk!20%!10%!PPPPP
}

Command definition:
define command{
command_name check_nrpe_disk
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p5666 -c check_disk -a $ARG1$ $ARG2$ $ARG3$
}

Obviously where: HHHHH is our hostname and PPPPP is the mount point.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: DISK CRITIKAL: No such file or directory

Post by Box293 »

On your remote system, when you execute this locally what output does it produce?

Code: Select all

su nagios
/usr/local/nagios/libexec/check_disk -w w20% -c c10% PPPPP
Make sure this is executed as the user nagios.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked