diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/nrpe/base.pp | 14 |
1 files changed, 13 insertions, 1 deletions
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, |