2020-07-08 22:14:44 +02:00
|
|
|
class zulip_ops::munin_server {
|
|
|
|
include zulip_ops::base
|
2020-07-09 00:24:41 +02:00
|
|
|
include zulip_ops::apache
|
2014-02-10 20:52:05 +01:00
|
|
|
include zulip::supervisor
|
|
|
|
|
2020-07-08 22:14:44 +02:00
|
|
|
$munin_packages = [
|
2018-08-13 21:29:40 +02:00
|
|
|
'munin',
|
|
|
|
'autossh',
|
2018-08-13 21:27:41 +02:00
|
|
|
'libapache2-mod-fcgid',
|
|
|
|
]
|
2018-08-13 21:29:40 +02:00
|
|
|
package { $munin_packages: ensure => 'installed' }
|
2014-02-10 20:52:05 +01:00
|
|
|
|
2020-07-10 04:15:30 +02:00
|
|
|
$default_host_domain = zulipconf('nagios', 'default_host_domain', undef)
|
2020-07-10 04:24:51 +02:00
|
|
|
$hosts = zulipconf_nagios_hosts()
|
2014-02-10 20:52:05 +01:00
|
|
|
|
2020-07-08 22:14:44 +02:00
|
|
|
file { '/etc/munin/apache.conf':
|
|
|
|
require => Package['munin-node'],
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
2020-07-09 00:24:41 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/munin/apache.conf',
|
|
|
|
notify => Service['apache2'],
|
|
|
|
}
|
|
|
|
|
|
|
|
file { '/etc/apache2/conf-available/munin.conf':
|
|
|
|
ensure => link,
|
|
|
|
target => '/etc/munin/apache.conf',
|
|
|
|
require => File['/etc/munin/apache.conf'],
|
|
|
|
}
|
|
|
|
|
|
|
|
apache2conf { 'munin':
|
|
|
|
ensure => present,
|
|
|
|
require => File['/etc/apache2/conf-available/munin.conf'],
|
|
|
|
notify => Service['apache2'],
|
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,
|
2020-07-08 22:14:44 +02:00
|
|
|
require => Package['munin'],
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
2020-07-08 22:14:44 +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'),
|
2020-07-08 22:14:44 +02:00
|
|
|
notify => Service['supervisor'],
|
2014-02-10 20:52:05 +01:00
|
|
|
}
|
|
|
|
}
|