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
|
class nodo::role::mail {
class { [ 'nodo::role::vserver', 'mail::system' ]: }
# Config parameters
$delivery = hiera('nodo::subsystem::mail::delivery', 'exim')
$virtual = hiera('mail::virtual', false)
# Graph postfix
munin::plugin { [ 'postfix_mailqueue', 'postfix_mailstats' ]:
config => 'user root',
ensure => $delivery ? {
'postfix' => present,
default => absent,
},
}
# Graph mysql
package { 'libcache-cache-perl': # needed by munin mysql plugin
ensure => present,
}
munin::plugin { [ 'mysql_queries', 'mysql_slowqueries', 'mysql_bytes', 'mysql_threads' ]:
config => "user root\nenv.mysqlopts --defaults-extra-file=/etc/mysql/debian.cnf",
ensure => $virtual ? {
true => present,
default => absent,
},
}
}
|