added and linked base contactgroups
This commit is contained in:
@@ -30,6 +30,7 @@ class cd_nagios::nagios::objects::config (
|
||||
require cd_nagios::nagios::objects::template_rules
|
||||
require cd_nagios::nagios::objects::contacts
|
||||
require cd_nagios::nagios::objects::add_contact_rules
|
||||
require cd_nagios::nagios::objects::contactgroups
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
61
manifests/nagios/objects/contactgroups.pp
Normal file
61
manifests/nagios/objects/contactgroups.pp
Normal file
@@ -0,0 +1,61 @@
|
||||
## cd_nagios::nagios::objects::contactgroups.pp
|
||||
# Module name: cd_nagios
|
||||
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
|
||||
# # License:
|
||||
# This file is part of cd_nagios.
|
||||
#
|
||||
# cd_nagios is used for providing automatic configuration of Nagios
|
||||
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
################################################################################
|
||||
class cd_nagios::nagios::objects::contactgroups (
|
||||
|
||||
|
||||
) inherits cd_nagios::params {
|
||||
if $::fqdn == $ng_nagios_server {
|
||||
|
||||
@@nagios_contactgroup { 'admins':
|
||||
ensure => present,
|
||||
alias => 'Nagios Administrators',
|
||||
contactgroup_name => 'admins',
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
register => '1',
|
||||
target => $ng_tgt_contactgroup_base,
|
||||
}
|
||||
|
||||
@@nagios_contactgroup { 'operations':
|
||||
ensure => present,
|
||||
alias => 'Operations Team',
|
||||
contactgroup_name => 'operations',
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
register => '1',
|
||||
target => $ng_tgt_contactgroup_base,
|
||||
}
|
||||
|
||||
@@nagios_contactgroup { 'support':
|
||||
ensure => present,
|
||||
alias => 'Support Team',
|
||||
contactgroup_name => 'support',
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
register => '1',
|
||||
target => $ng_tgt_contactgroup_base,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -975,7 +975,7 @@ $ng_target_base_contact = "${ng_conf_d_dir}/nagios_base_contact.cfg"
|
||||
$ng_target_add_contact = "${ng_conf_d_dir}/nagios_add_contact.cfg"
|
||||
$ng_contacts_head_erb = 'cd_nagios/nagios/contacts_cfg_head.erb'
|
||||
$ng_contacts_rule_erb = 'cd_nagios/nagios/contacts_cfg_rule.erb'
|
||||
$ng_target_contactgroup = "${ng_conf_d_dir}/nagios_contactgroup.cfg"
|
||||
$ng_tgt_contactgroup_base = "${ng_conf_d_dir}/nagios_contactgroup_base.cfg"
|
||||
$ng_target_command = "${ng_conf_d_dir}/nagios_command.cfg"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user