aboutsummaryrefslogtreecommitdiff
path: root/manifests/role/mail.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-06-07 15:59:08 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-06-07 15:59:08 -0300
commit8bd2bc0082954b059866f697d2b211f85c5adb7c (patch)
tree5651e1dfd9b7993c3bcdccae1c720632204082f5 /manifests/role/mail.pp
parent1dca54403296894f2fb094b7200f9b665c90b80f (diff)
downloadpuppet-nodo-8bd2bc0082954b059866f697d2b211f85c5adb7c.tar.gz
puppet-nodo-8bd2bc0082954b059866f697d2b211f85c5adb7c.tar.bz2
Setting mysql_ munin plugins on nodo::role::mail
Diffstat (limited to 'manifests/role/mail.pp')
-rw-r--r--manifests/role/mail.pp18
1 files changed, 17 insertions, 1 deletions
diff --git a/manifests/role/mail.pp b/manifests/role/mail.pp
index 717d57f..f486313 100644
--- a/manifests/role/mail.pp
+++ b/manifests/role/mail.pp
@@ -1,8 +1,24 @@
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' ]:
- ensure => present,
+ ensure => $delivery ? {
+ 'postfix' => present,
+ default => absent,
+ },
+ }
+
+ # Graph mysql
+ munin::plugin { [ 'mysql_queries', 'mysql_slowqueries', 'mysql_bytes', 'mysql_threads' ]:
+ config => "user root",
+ ensure => $virtual ? {
+ true => present,
+ default => absent,
+ },
}
}