Page 1 of 2
how can exclude filesystem for chking
Posted: Tue Aug 23, 2016 4:12 pm
by baber
dear all
hi
i am using check_disk.pl and my .cfg line this is
Code: Select all
define service{
use generic-service
host_name npmbweb
service_description Disk Space
check_command check_nrpe!check_disk!' -w 20% -c 10% -W 20% -K 10% -e -A -i /mnt/cdrom'
}
and in nrpe.cfg this line add
Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk.pl $ARG1$
now my problem is i don't want chk this path /media/cdrom or /media/* i change .cfg to this
Code: Select all
define service{
use generic-service
host_name npmbweb
service_description Disk Space
check_command check_nrpe!check_disk!' -w 20% -c 10% -W 20% -K 10% -e -A -i /media/cdrom'
}
this don't work and on my monitoring show /media/cdrom critical i don't want plugin chk this path /media/cdrom
how can sole that ?
BR
Re: how can exclude filesystem for chking
Posted: Tue Aug 23, 2016 4:47 pm
by ssax
Please attach the check_disk.pl file that you are referring to so that we can review it (grab it from the remote host to make sure it's the exact one being run), the one that I found doesn't have the options that you're specifying.
Thank you
Re: how can exclude filesystem for chking
Posted: Tue Aug 23, 2016 11:22 pm
by baber
ssax wrote:Please attach the check_disk.pl file that you are referring to so that we can review it (grab it from the remote host to make sure it's the exact one being run), the one that I found doesn't have the options that you're specifying.
Thank you
the plugin has been attached
Re: how can exclude filesystem for chking
Posted: Wed Aug 24, 2016 12:22 pm
by ssax
Ok, yours doesn't have these options either:
-W 20% -K 10% -e -A.
Please change your service to:
Code: Select all
define service{
use generic-service
host_name npmbweb
service_description Disk Space
check_command check_nrpe!check_disk!' -w 20% -c 10% -i /mnt/cdrom'
}
Let us know if that works for you.
If it's still not working, please attach these files from the remote machine:
Code: Select all
/usr/local/nagios/etc/nrpe/common.cfg
/usr/local/nagios/etc/nrpe.cfg
Thank you
Re: how can exclude filesystem for chking
Posted: Wed Aug 24, 2016 2:42 pm
by baber
ssax wrote:Ok, yours doesn't have these options either:
-W 20% -K 10% -e -A.
Please change your service to:
Code: Select all
define service{
use generic-service
host_name npmbweb
service_description Disk Space
check_command check_nrpe!check_disk!' -w 20% -c 10% -i /mnt/cdrom'
}
Let us know if that works for you.
If it's still not working, please attach these files from the remote machine:
Code: Select all
/usr/local/nagios/etc/nrpe/common.cfg
/usr/local/nagios/etc/nrpe.cfg
Thank you
my problem not solved i have attached rpe.cfg from remote machine
Re: how can exclude filesystem for chking
Posted: Wed Aug 24, 2016 2:51 pm
by ssax
You need to set
dont_blame_nrpe=1 in your nrpe.cfg because you're passing arguments.
Do you have this file?
Code: Select all
/usr/local/nagios/etc/nrpe/common.cfg
Re: how can exclude filesystem for chking
Posted: Wed Aug 24, 2016 3:27 pm
by baber
ssax wrote:You need to set
dont_blame_nrpe=1 in your nrpe.cfg because you're passing arguments.
Do you have this file?
Code: Select all
/usr/local/nagios/etc/nrpe/common.cfg
no i don\t have common.cfg on my mahine
i use this
Code: Select all
define service{
use generic-service
host_name npmbpndb
service_description Disk Space
check_command check_nrpe!check_disk!' -w 20% -c 10% -i /media/cdrom'
}
and change dont_blame_nrpe=0
to
dont_blame_nrpe=1
but problem not work
what do i have to do ?
Re: how can exclude filesystem for chking
Posted: Wed Aug 24, 2016 3:46 pm
by ssax
On the remote machine, please run these commands and send us the entire output:
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_disk.pl -w 20% -c 10% -i /mnt/cdrom
Re: how can exclude filesystem for chking
Posted: Wed Aug 24, 2016 10:15 pm
by baber
ssax wrote:On the remote machine, please run these commands and send us the entire output:
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_disk.pl -w 20% -c 10% -i /mnt/cdrom
on remote machine when i installed nrpe agent created nagios user with nologin permission
nagios

503:504::/home/nagios:/sbin/nologin
Code: Select all
[root@baber ~]# su - nagios
This account is currently not available.
on all of my machine is on this mode and is ok
i run this command with root user
Code: Select all
[root@baber ~]# /usr/local/nagios/libexec/check_disk.pl -w 20% -c 10% -i /media/cdrom
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
Erreur : unite inconnue (%)
DISK OK
Re: how can exclude filesystem for chking
Posted: Thu Aug 25, 2016 11:52 am
by lmiltchev
Try running the following command instead:
Code: Select all
/usr/local/nagios/libexec/check_disk.pl -w 20 -c 10 -i /media/cdrom
Are the errors gone?