Hello,
I am using check_nrpe –H localhost –t 30 –c check_disk –a ‘-w 20% -c10%’
Can I exclude paths like /boot etc while using the above
Thanks,
Anish
check_disk
Re: check_disk
You should be able to use:
From the plugin's usage:
Code: Select all
./check_nrpe –H localhost –t 30 –c check_disk –a ‘-w 20% -c10% -x "/boot"’-x, --exclude_device=PATH <STRING>
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_disk
Code: Select all
[root@SESKLNGCOREPD02 libexec]# ./check_nrpe –H localhost –t 30 –c check_disk –a ‘-w 20% -c10% -x "/boot"’
./check_nrpe: invalid option -- 'x'
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
Usage: check_nrpe -H <host> [ -b <bindaddr> ] [-4] [-6] [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]
Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
<bindaddr> = bind to local address
-4 = user ipv4 only
-6 = user ipv6 only
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.
Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.
[root@SESKLNGCOREPD02 libexec]#
Re: check_disk
Try this syntax:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <host> -t 30 -c check_disk -a '-w 20% -c 10% -x /boot'Code: Select all
[root@localhost libexec]# ./check_nrpe -H 192.168.67.97 -t 30 -c check_disk -a '-w 20% -c 10% -x /boot'
DISK OK - free space: / 15103 MB (84% inode=99%); /dev 1886 MB (100% inode=99%); /dev/shm 1895 MB (100% inode=99%); /run 1708 MB (90% inode=99%); /sys/fs/cgroup 1895 MB (100% inode=99%); /var/www/clients/client0/web1/log 15103 MB (84% inode=99%); /run/user/5001 379 MB (100% inode=99%); /run/user/0 379 MB (100% inode=99%);| /=2774MB;14302;16090;0;17878 /dev=0MB;1508;1697;0;1886 /dev/shm=0MB;1516;1705;0;1895 /run=186MB;1516;1705;0;1895 /sys/fs/cgroup=0MB;1516;1705;0;1895 /var/www/clients/client0/web1/log=2774MB;14302;16090;0;17878 /run/user/5001=0MB;303;341;0;379 /run/user/0=0MB;303;341;0;379Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: check_disk
Many thanks that works.
Can I exclude more than 1?
Can I exclude more than 1?
Re: check_disk
Sure! Running off of the previous example:
Code: Select all
[root@localhost libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.97 -t 30 -c check_disk -a '-w 20% -c 10% -x /boot -x /run -x /sys/fs/cgroup'
DISK OK - free space: / 15101 MB (84% inode=99%); /dev 1886 MB (100% inode=99%); /dev/shm 1895 MB (100% inode=99%); /var/www/clients/client0/web1/log 15101 MB (84% inode=99%); /run/user/5001 379 MB (100% inode=99%); /run/user/0 379 MB (100% inode=99%);| /=2776MB;14302;16090;0;17878 /dev=0MB;1508;1697;0;1886 /dev/shm=0MB;1516;1705;0;1895 /var/www/clients/client0/web1/log=2776MB;14302;16090;0;17878 /run/user/5001=0MB;303;341;0;379 /run/user/0=0MB;303;341;0;379
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: check_disk
Awesome! Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/