Page 1 of 2

DISK CRITIKAL: No such file or directory

Posted: Mon Jun 04, 2012 2:28 am
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

Re: DISK CRITIKAL: No such file or directory

Posted: Mon Jun 04, 2012 11:02 am
by agriffin
Does the nagios user have read permissions on /mnt/db?

Re: DISK CRITIKAL: No such file or directory

Posted: Tue Jun 05, 2012 9:57 am
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.

Re: DISK CRITIKAL: No such file or directory

Posted: Wed Jun 06, 2012 10:18 am
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?

Re: DISK CRITIKAL: No such file or directory

Posted: Fri Jun 22, 2012 7:00 am
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!

Re: DISK CRITIKAL: No such file or directory

Posted: Mon Jun 25, 2012 9:54 am
by agriffin
Okay, glad you got everything working!

Re: DISK CRITIKAL: No such file or directory

Posted: Mon Apr 27, 2015 10:20 am
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

Re: DISK CRITIKAL: No such file or directory

Posted: Tue Apr 28, 2015 4:26 pm
by Box293
Can you please show us the service definition and also the command definition this service uses.

Re: DISK CRITIKAL: No such file or directory

Posted: Wed Apr 29, 2015 8:47 am
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.

Re: DISK CRITIKAL: No such file or directory

Posted: Wed Apr 29, 2015 10:09 am
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.