From 8bd2bc0082954b059866f697d2b211f85c5adb7c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 7 Jun 2013 15:59:08 -0300 Subject: Setting mysql_ munin plugins on nodo::role::mail --- manifests/role/mail.pp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'manifests/role') 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, + }, } } -- cgit v1.2.3