added parameter to enable or disable swap checking, as this can now be done better through cd_swap

This commit is contained in:
Arne Teuke
2017-07-31 17:26:23 +01:00
parent d12abd7cd1
commit 2d567bc629
3 changed files with 13 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
|Repo Name| version | Build Status|
|---|---|---|---|
|`cd_nagios`| 0.0.1.5 | [![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=cd_nagios)](https://jenkins.confdroid.com/job/cd_nagios/)|
|`cd_nagios`| 0.0.1.6 | [![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=cd_nagios)](https://jenkins.confdroid.com/job/cd_nagios/)|
### Synopsis
Nagios is a powerful open source software solution for monitoring your IT environments.

View File

@@ -63,6 +63,8 @@ class cd_nagios::client::target (
mode => '0640',
}
if $ng_enable_swap_check == true {
@@nagios_service { "Swap_Usage_${::hostname}":
ensure => $ng_swap_ensure,
check_command => "check_nrpe!check_swap!${ng_swap_warn}!${ng_swap_crit}",
@@ -77,6 +79,7 @@ class cd_nagios::client::target (
group => $ng_user,
mode => '0640',
}
}
@@nagios_service { "Local_Users_${::hostname}":
ensure => $ng_users_ensure,

View File

@@ -644,6 +644,11 @@
# rampup_change - # of jobs to add to jobs_limit when ramping up
# @param [string] ng_nrpe_port the port for NRPE. used by firewall and in
# configuration file.
# @param [boolean] ng_enable_swap_check Whether to enable the declaration of
# the swap check. Disabling thi smakes sense when you use the `cd_swap`
# Puppet module and have enabled the check declaration from there, so the
# Nagios check is properly aligned to the Puppet module controlling the
# particular item.
###############################################################################
class cd_nagios::params (
@@ -896,6 +901,10 @@ $ng_host_down_svc_checks = '0',
$ng_enable_load_ctl_options = false,
$ng_loadctl_options = 'jobs_max=100;backoff_limit=10;rampup_change=5',
# single nagios checks
$ng_enable_swap_check = true,
) {
# installation section