2016-10-17 04:05:49 +02:00
|
|
|
class zulip_ops::munin {
|
2014-02-10 20:52:05 +01:00
|
|
|
include zulip::supervisor
|
|
|
|
|
|
|
|
$munin_packages = [# Packages needed for munin
|
|
|
|
"munin",
|
|
|
|
"autossh",
|
2016-08-06 09:06:39 +02:00
|
|
|
# Packages needed for munin website
|
|
|
|
'libapache2-mod-fcgid',
|
2014-02-10 20:52:05 +01:00
|
|
|
]
|
|
|
|
package { $munin_packages: ensure => "installed" }
|
|
|
|
|
2016-08-03 22:09:14 +02:00
|
|
|
$hosts_domain = zulipconf("nagios", "hosts_domain", undef)
|
2016-08-03 21:53:03 +02:00
|
|
|
$hosts = $zulip_ops::base::hosts
|
2014-02-10 20:52:05 +01:00
|
|
|
|
|
|
|
file { "/etc/munin":
|
|
|
|
require => Package["munin"],
|
|
|
|
recurse => true,
|
2018-08-13 21:20:34 +02:00
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => '0644',
|
|
|
|
source => "puppet:///modules/zulip_ops/munin"
|
2014-02-10 20:52:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/munin/munin.conf":
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-04-23 08:41:28 +02:00
|
|
|
require => [ Package["munin"], File["/etc/munin"] ],
|
2018-08-13 21:20:34 +02:00
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => '0644',
|
2016-10-17 04:05:49 +02:00
|
|
|
content => template("zulip_ops/munin/munin.conf.erb")
|
2014-02-10 20:52:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/supervisor/conf.d/munin_tunnels.conf":
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-04-23 08:41:28 +02:00
|
|
|
require => Package["supervisor", "autossh"],
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
2016-10-17 04:05:49 +02:00
|
|
|
content => template("zulip_ops/supervisor/conf.d/munin_tunnels.conf.erb"),
|
2018-08-13 21:20:34 +02:00
|
|
|
notify => Service["supervisor"]
|
2014-02-10 20:52:05 +01:00
|
|
|
}
|
|
|
|
}
|