blob: 5196f8703b6f21dfb80c61c946977499074310c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# we take rpms from fedora
class dovecot(
$sqlite = false,
$pgsql = false,
$mysql = false,
$nagios_checks = {
'imap-hostname' => 'fqdn',
'pop3-hostname' => 'fqdn',
},
$munin_checks = true,
$manage_shorewall = true
){
case $operatingsystem {
centos: { include dovecot::centos }
default: { include dovecot::base }
}
if $dovecot::sqlite or $dovecot::pgsql or $dovecot::mysql {
include dovecot::sql
}
if $dovecot::manage_shorewall {
include shorewall::rules::pop3
include shorewall::rules::imap
}
if $dovecot::munin_checks {
include dovecot::munin
}
if $dovecot::nagios_checks {
if $dovecot::nagios_checks['imap-hostname'] == 'fqdn' {
$imap_host_to_check = $fqdn
} else {
$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!${imap_host_to_check}!143";
"check_imap_ssl":
check_command => "check_imap_ssl!${imap_host_to_check}!993";
"check_pop3":
check_command => "check_pop3!${pop3_host_to_check}!110";
"check_pop3_ssl":
check_command => "check_pop3_ssl!${pop3_host_to_check}!995";
}
}
}
|