--- /dev/null
+define profile::monitoring::external_service (
+ Optional[String] $type = undef,
+ Optional[Hash] $master = {},
+) {
+ include profile::monitoring::params
+ $service_description = $title
+
+ nagios_service { $service_description:
+ service_description => $service_description,
+ host_name => $::profile::monitoring::params::service_local["host_name"],
+ use => $::profile::monitoring::params::service_types[$type],
+ target => $::profile::monitoring::params::services_for_master,
+ * => $master,
+ }
+
+}
check_interval => $::profile::monitoring::params::service_local["check_interval"],
retry_interval => $::profile::monitoring::params::service_local["retry_interval"],
host_name => $::profile::monitoring::params::service_local["host_name"],
- use => "external-passive-service",
+ use => $::profile::monitoring::params::service_types["passive"],
notify => [],
}
$t = "master - "
$objects = "/etc/naemon/objects.cfg"
$plugins = "/etc/naemon/monitoring-plugins"
+ $service_types = {
+ "passive" => "external-passive-service",
+ "web" => "external-web-service",
+ }
+
$service_generic = {
active_checks_enabled => "1",
check_freshness => "0",
}
Profile::Monitoring::Local_service <| |>
+ Profile::Monitoring::External_service <| |>
}
proxy_preserve_host => true;
default: * => $::profile::apache::apache_vhost_default;
}
+
+ @profile::monitoring::external_service { "Etherpad service is running on $web_host":
+ type => "web",
+ master => {
+ check_command => "check_https!$web_host!/!<title>Etherpad"
+ }
+ }
+ @profile::monitoring::external_service { "$web_host ssl certificate is up to date":
+ type => "web",
+ master => {
+ check_command => "check_https_certificate!$web_host"
+ }
+ }
}