diff options
-rw-r--r-- | files/nrpe/nrpe_commands.cfg | 1 | ||||
-rw-r--r-- | manifests/nrpe/base.pp | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/files/nrpe/nrpe_commands.cfg b/files/nrpe/nrpe_commands.cfg index 1a26cc3..b725a36 100644 --- a/files/nrpe/nrpe_commands.cfg +++ b/files/nrpe/nrpe_commands.cfg @@ -1,6 +1,5 @@ # default plugins command[check_users]=/usr/lib/nagios/plugins/check_users $ARG1$ -command[check_load]=/usr/lib/nagios/plugins/check_load $ARG1$ command[check_disk]=/usr/lib/nagios/plugins/check_disk $ARG1$ -x "/dev" -x "/dev/shm" -x "/lib/init/rw" command[check_apt]=sudo /usr/lib/nagios/plugins/check_apt -u $ARG1$ command[check_swap]=/usr/lib/nagios/plugins/check_swap $ARG1$ diff --git a/manifests/nrpe/base.pp b/manifests/nrpe/base.pp index 8636760..1d26849 100644 --- a/manifests/nrpe/base.pp +++ b/manifests/nrpe/base.pp @@ -23,9 +23,21 @@ class nagios::nrpe::base { # default commands nagios::nrpe::command { "basic_nrpe": - source => [ "puppet:///modules/site-nagios/configs/nrpe/nrpe_commands.cfg", + source => [ "puppet:///modules/site-nagios/configs/nrpe/nrpe_commands.${fqdn}.cfg", + "puppet:///modules/site-nagios/configs/nrpe/nrpe_commands.cfg", "puppet:///modules/nagios/nrpe/nrpe_commands.cfg" ], } + # the check for load should be customized for each server based on number + # of CPUs and the type of activity. + $warning_1_threshold = 5 * $processorcount + $warning_5_threshold = 4 * $processorcount + $warning_15_threshold = 3 * $processorcount + $critical_1_threshold = 10 * $processorcount + $critical_5_threshold = 9 * $processorcount + $critical_15_threshold = 8 * $processorcount + nagios::nrpe::command { "check_load": + command_line => "/usr/lib/nagios/plugins/check_load -w ${warning_1_threshold},${warning_5_threshold},${warning_15_threshold} -c ${critical_1_threshold},${critical_5_threshold},${critical_15_threshold}", + } service { "nagios-nrpe-server": ensure => running, |