summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-02-24 00:01:45 -0500
committerJesse Luehrs <doy@tozt.net>2019-02-24 00:04:51 -0500
commit367b31fd6e81acc9977a911db056de06879d5cef (patch)
tree9137f0fbefb844fa44986833daf5c6d648a04ac6
parent11b0d552bf2f834e42bbf10eec9538ad363c7402 (diff)
downloadpuppet-tozt-367b31fd6e81acc9977a911db056de06879d5cef.tar.gz
puppet-tozt-367b31fd6e81acc9977a911db056de06879d5cef.zip
add munin configuration for mail
-rw-r--r--modules/mail/files/munin-plugin-conf8
-rw-r--r--modules/mail/manifests/monitoring.pp67
-rw-r--r--modules/munin/files/munin.conf3
3 files changed, 78 insertions, 0 deletions
diff --git a/modules/mail/files/munin-plugin-conf b/modules/mail/files/munin-plugin-conf
new file mode 100644
index 0000000..fa786ba
--- /dev/null
+++ b/modules/mail/files/munin-plugin-conf
@@ -0,0 +1,8 @@
+[fail2ban]
+user root
+
+[tarsnap]
+user root
+
+[tarsnap_last_run]
+user root
diff --git a/modules/mail/manifests/monitoring.pp b/modules/mail/manifests/monitoring.pp
new file mode 100644
index 0000000..6ba485c
--- /dev/null
+++ b/modules/mail/manifests/monitoring.pp
@@ -0,0 +1,67 @@
+class mail::monitoring {
+ include munin::node
+ include munin::duplicati
+ include munin::tarsnap
+
+ file { "/etc/munin/plugin-conf.d/mail":
+ source => "puppet:///modules/mail/munin-plugin-conf",
+ require => Package["munin-node"],
+ notify => Service["munin-node"];
+ }
+
+ munin::plugin {
+ [
+ 'cpu',
+ 'df',
+ 'df_inode',
+ 'forks',
+ 'load',
+ 'memory',
+ 'ntp_offset',
+ 'processes',
+ 'swap',
+ 'threads',
+ 'uptime',
+ 'users',
+ 'vmstat',
+ ]:
+ }
+
+ munin::plugin {
+ [
+ 'fail2ban',
+ ]:
+ }
+
+ munin::plugin {
+ [
+ 'if_algo',
+ 'if_eth0',
+ ]:
+ source => 'if_',
+ }
+
+ munin::plugin {
+ [
+ 'if_err_algo',
+ 'if_err_eth0',
+ ]:
+ source => 'if_err_',
+ }
+
+ munin::plugin {
+ [
+ 'duplicati_duration',
+ 'duplicati_file_count',
+ 'duplicati_file_size',
+ 'duplicati_last_run',
+ ]:
+ }
+
+ munin::plugin {
+ [
+ 'tarsnap',
+ 'tarsnap_last_run',
+ ]:
+ }
+}
diff --git a/modules/munin/files/munin.conf b/modules/munin/files/munin.conf
index 5833b8b..7390326 100644
--- a/modules/munin/files/munin.conf
+++ b/modules/munin/files/munin.conf
@@ -9,3 +9,6 @@ htmldir /srv/http/munin
[hush]
address hush.algo
use_node_name yes
+[mail]
+ address mail.algo
+ use_node_name yes