OP#436 add nagios contactgroups
This commit is contained in:
30
manifests/nagios/objects/add_contactgroups.pp
Normal file
30
manifests/nagios/objects/add_contactgroups.pp
Normal file
@@ -0,0 +1,30 @@
|
||||
## confdroid_nagios::nagios::objects::add_contactgroups.pp
|
||||
# Module name: confdroid_nagios
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Define populates /etc/nagios/conf.d/nagios_add_contactgroups through
|
||||
# external puppet rules.
|
||||
# @param [string] ng_contactgroup_name Specify the short name of the
|
||||
# contact group.
|
||||
# @param [string] ng_contactgroup_alias Specify the alias (long name) of the
|
||||
# contact group
|
||||
# @param [string] ng_contactgroup_register Specify whether the contact group
|
||||
# should be registered in Nagios.
|
||||
################################################################################
|
||||
define confdroid_nagios::nagios::objects::add_contactgroups (
|
||||
|
||||
Optional[String] $ng_contactgroup_name = undef,
|
||||
Optional[String] $ng_contactgroup_alias = undef,
|
||||
String $ng_contactgroup_register = '1',
|
||||
|
||||
) {
|
||||
$ng_nagios_server = $confdroid_nagios::params::ng_nagios_server
|
||||
$ng_tgt_contactgroup_add = $confdroid_nagios::params::ng_tgt_contactgroup_add
|
||||
$ng_cntctgrps_rule_erb = $confdroid_nagios::params::ng_cntctgrps_rule_erb
|
||||
|
||||
if $ng_nagios_server == $fqdn {
|
||||
concat::fragment { $name:
|
||||
target => $ng_tgt_contactgroup_add,
|
||||
content => template($ng_cntctgrps_rule_erb),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user