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,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 644,
|
2016-10-17 04:05:49 +02:00
|
|
|
source => "puppet:///modules/zulip_ops/munin"
|
2014-02-10 20:52:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/munin/munin.conf":
|
|
|
|
require => [ Package["munin"], File["/etc/munin"] ],
|
|
|
|
ensure => file,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 644,
|
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":
|
|
|
|
require => Package["supervisor", "autossh"],
|
|
|
|
ensure => file,
|
|
|
|
mode => 644,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
2016-10-17 04:05:49 +02:00
|
|
|
content => template("zulip_ops/supervisor/conf.d/munin_tunnels.conf.erb"),
|
2014-02-10 20:52:05 +01:00
|
|
|
notify => Service["supervisor"]
|
|
|
|
}
|
|
|
|
}
|