how can exclude filesystem for chking

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.
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

how can exclude filesystem for chking

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: how can exclude filesystem for chking

Post 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
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: how can exclude filesystem for chking

Post 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
Attachments
check_disk.pl
(13.09 KiB) Downloaded 611 times
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: how can exclude filesystem for chking

Post 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
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: how can exclude filesystem for chking

Post 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
Attachments
nrpe.cfg
(8.86 KiB) Downloaded 532 times
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: how can exclude filesystem for chking

Post 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
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: how can exclude filesystem for chking

Post 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 ?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: how can exclude filesystem for chking

Post 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
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: how can exclude filesystem for chking

Post 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:x: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


User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: how can exclude filesystem for chking

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked