49 lines
1.9 KiB
Puppet
49 lines
1.9 KiB
Puppet
# cd_nagios::nagios::objects::timeperiods.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/>.
|
|
# @summary Class manages all timeperiods for NAGIOS through Puppet exports,
|
|
# and populates /etc/nagios/conf.d/nagios_timeperiods.cfg.
|
|
################################################################################
|
|
class cd_nagios::nagios::objects::timeperiods (
|
|
|
|
) inherits cd_nagios::params {
|
|
|
|
if $::fqdn == $ng_nagios_server {
|
|
|
|
@@nagios_timeperiod { '24x7':
|
|
ensure => present,
|
|
timeperiod_name => '24x7',
|
|
alias => '24 Hours A Day, 7 Days A Week',
|
|
monday => '00:00-24:00',
|
|
tuesday => '00:00-24:00',
|
|
wednesday => '00:00-24:00',
|
|
thursday => '00:00-24:00',
|
|
friday => '00:00-24:00',
|
|
saturday => '00:00-24:00',
|
|
sunday => '00:00-24:00',
|
|
owner => $ng_user,
|
|
group => $ng_user,
|
|
mode => '0640',
|
|
register => '1',
|
|
target => $ng_tgt_timeperiods_base,
|
|
}
|
|
}
|
|
}
|