2018-04-20 10:06:12 +02:00
|
|
|
## cd_apache::monitoring::target.pp
|
|
|
|
|
# Module name: cd_apache
|
|
|
|
|
# Author: Arne Teuke (arne_teuke@puppetsoft.com)
|
|
|
|
|
# License:
|
|
|
|
|
# This file is part of cd_apache.
|
|
|
|
|
#
|
|
|
|
|
# cd_apache is used for providing automatic configuration of
|
|
|
|
|
# <service / purpose>
|
|
|
|
|
# Copyright (C) 2014 PuppetSoft (copyright@puppetsoft.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 exports for nagios monitoring
|
|
|
|
|
##############################################################################
|
|
|
|
|
class cd_apache::monitoring::target (
|
|
|
|
|
|
|
|
|
|
) inherits cd_apache::params {
|
|
|
|
|
|
|
|
|
|
case $ae_incl_target {
|
|
|
|
|
|
|
|
|
|
false: { notify {'Nagios Service target for check_httpd has been disabled via parameters / ENC override': }
|
|
|
|
|
}
|
|
|
|
|
default: {
|
|
|
|
|
@@nagios_service { "check_http_${::hostname}":
|
|
|
|
|
check_command => 'check_http',
|
|
|
|
|
use => 'generic-service',
|
|
|
|
|
host_name => $::fqdn,
|
|
|
|
|
notification_period => '24x7',
|
|
|
|
|
service_description => "${::hostname}_check_http",
|
|
|
|
|
target => $ae_target_service,
|
|
|
|
|
owner => 'nagios',
|
|
|
|
|
group => 'nagios',
|
2018-04-29 13:27:51 +02:00
|
|
|
mode => '0640',
|
2018-04-20 10:06:12 +02:00
|
|
|
contacts => 'ops',
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|