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
|
2018-08-13 21:29:40 +02:00
|
|
|
'munin',
|
|
|
|
'autossh',
|
2018-08-13 21:27:41 +02:00
|
|
|
# Packages needed for munin website
|
|
|
|
'libapache2-mod-fcgid',
|
|
|
|
]
|
2018-08-13 21:29:40 +02:00
|
|
|
package { $munin_packages: ensure => 'installed' }
|
2014-02-10 20:52:05 +01:00
|
|
|
|
2018-08-13 21:29:40 +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
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/munin':
|
|
|
|
require => Package['munin'],
|
2014-02-10 20:52:05 +01:00
|
|
|
recurse => true,
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
2018-08-13 21:29:40 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/munin'
|
2014-02-10 20:52:05 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/munin/munin.conf':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-08-13 21:29:40 +02:00
|
|
|
require => [ Package['munin'], File['/etc/munin'] ],
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
2018-08-13 21:29:40 +02:00
|
|
|
content => template('zulip_ops/munin/munin.conf.erb')
|
2014-02-10 20:52:05 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/supervisor/conf.d/munin_tunnels.conf':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-08-13 21:29:40 +02:00
|
|
|
require => Package['supervisor', 'autossh'],
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
content => template('zulip_ops/supervisor/conf.d/munin_tunnels.conf.erb'),
|
|
|
|
notify => Service['supervisor']
|
2014-02-10 20:52:05 +01:00
|
|
|
}
|
|
|
|
}
|