summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-12-12 17:52:57 +0100
committermh <mh@immerda.ch>2010-12-12 17:52:57 +0100
commit98019aa7083ccdd2a2451be74f1a6c61ed14ee89 (patch)
tree003d598869d5980f6ef6cab72fc5ee0d3ea6b128
parent1d27836dbc7f42fee26d88bd1ef2455ff59aa157 (diff)
adjust nagios checks to tune hostnames to check
-rw-r--r--manifests/init.pp22
1 files changed, 14 insertions, 8 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index aebe102..5196f87 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -4,7 +4,8 @@ class dovecot(
$pgsql = false,
$mysql = false,
$nagios_checks = {
- 'hostname' => 'fqdn',
+ 'imap-hostname' => 'fqdn',
+ 'pop3-hostname' => 'fqdn',
},
$munin_checks = true,
$manage_shorewall = true
@@ -28,20 +29,25 @@ class dovecot(
}
if $dovecot::nagios_checks {
- if $dovecot::nagios_checks['hostname'] == 'fqdn' {
- $host_to_check = $fqdn
+ if $dovecot::nagios_checks['imap-hostname'] == 'fqdn' {
+ $imap_host_to_check = $fqdn
} else {
- $host_to_check = $dovecot::nagios_checks['hostname']
+ $imap_host_to_check = $dovecot::nagios_checks['imap-hostname']
+ }
+ if $dovecot::nagios_checks['pop3-hostname'] == 'fqdn' {
+ $pop3_host_to_check = $fqdn
+ } else {
+ $pop3_host_to_check = $dovecot::nagios_checks['pop3-hostname']
}
nagios::service{
"check_imap":
- check_command => "check_imap!${host_to_check}!143";
+ check_command => "check_imap!${imap_host_to_check}!143";
"check_imap_ssl":
- check_command => "check_imap_ssl!${host_to_check}!993";
+ check_command => "check_imap_ssl!${imap_host_to_check}!993";
"check_pop3":
- check_command => "check_pop3!${host_to_check}!110";
+ check_command => "check_pop3!${pop3_host_to_check}!110";
"check_pop3_ssl":
- check_command => "check_pop3_ssl!${host_to_check}!995";
+ check_command => "check_pop3_ssl!${pop3_host_to_check}!995";
}
}
}