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.