Re: NRPE Customize configure
Posted: Fri May 12, 2017 9:59 am
Lets use this plugin as an example.
https://exchange.nagios.org/directory/P ... 29/details
You would download the check_folder_size.sh script to the remote system and put it in the /usr/local/nagios/libexec folder.
Then set the owner and permissions of it so it can be executed. Run this as root on the remote server.
Then you would edit the nrpe.cfg file and create a command line the example below
Save the file and restart the NRPE Agent
Then on the Nagios Server you would edit the Tmp folder command and change $ARG1$ to
and $ARG2$ to the following
That will check the /tmp folder and return the output in Gigabytes with a warning level of 1.5 Gigabytes and critical over 2.0 Gigabytes
You can adjust the thresholds, etc. using the options below.
-s k (Kilobytes) m (megabytes) g (gigabytes)
-w Warning level
-c Critical level
Any questions, let us know.
https://exchange.nagios.org/directory/P ... 29/details
You would download the check_folder_size.sh script to the remote system and put it in the /usr/local/nagios/libexec folder.
Then set the owner and permissions of it so it can be executed. Run this as root on the remote server.
Code: Select all
chown nagios.nagios /usr/local/nagios/libexec/check_folder_size.sh
chmod 777 /usr/local/nagios/libexec/check_folder_size.shCode: Select all
command[check_folder_size]=/usr/local/nagios/libexec/check_folder_size.sh -f $ARG1$Then on the Nagios Server you would edit the Tmp folder command and change $ARG1$ to
Code: Select all
check_folder_sizeCode: Select all
-a '/tmp -s g -w 15 -c 20'You can adjust the thresholds, etc. using the options below.
-s k (Kilobytes) m (megabytes) g (gigabytes)
-w Warning level
-c Critical level
Any questions, let us know.