mirror of https://github.com/zulip/zulip.git
puppet: Automate autossh process monitoring maintenance.
Previously, the Zulip Nagios configuration effectively hardcoded the count for how many system should have autossh connections.
This commit is contained in:
parent
6bdb10b71b
commit
4fbe201187
|
@ -35,15 +35,6 @@ define service{
|
|||
check_command check_load!7.0!6.0!5.0!10.0!8.0!6.0
|
||||
}
|
||||
|
||||
define service{
|
||||
use generic-service
|
||||
host_name nagios
|
||||
service_description Number of autossh processes
|
||||
# If you change the number of munin autossh processes, change
|
||||
# the second and third arguments, below.
|
||||
check_command check_named_procs!autossh!10:10!10:17
|
||||
}
|
||||
|
||||
define service{
|
||||
use generic-service
|
||||
host_name nagios
|
||||
|
|
|
@ -34,6 +34,9 @@ class zulip_ops::base {
|
|||
# Add system users here
|
||||
$users = []
|
||||
|
||||
# Add hosts to monitor here
|
||||
$hosts = []
|
||||
|
||||
file { '/etc/apt/apt.conf.d/02periodic':
|
||||
ensure => file,
|
||||
mode => 644,
|
||||
|
|
|
@ -7,20 +7,7 @@ class zulip_ops::munin {
|
|||
]
|
||||
package { $munin_packages: ensure => "installed" }
|
||||
|
||||
# If you add a new Munin node, change the number of autossh processes that we
|
||||
# check for with Nagios.
|
||||
|
||||
$hosts = ["trac",
|
||||
"zmirror",
|
||||
"staging",
|
||||
"git",
|
||||
"bots",
|
||||
"prod0",
|
||||
"stats",
|
||||
"postgres1",
|
||||
"postgres3",
|
||||
"redis0",
|
||||
]
|
||||
$hosts = $zulip_ops::base::hosts
|
||||
|
||||
file { "/etc/munin":
|
||||
require => Package["munin"],
|
||||
|
|
|
@ -55,6 +55,15 @@ class zulip_ops::nagios {
|
|||
group => "root",
|
||||
source => '/root/zulip/api/integrations/nagios/zulip_nagios.cfg',
|
||||
}
|
||||
|
||||
$hosts = $zulip_ops::base::hosts
|
||||
file { '/etc/nagios3/conf.d/zulip_autossh.cfg':
|
||||
ensure => file,
|
||||
mode => 644,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
content => template('zulip_ops/nagios_autossh.template.erb'),
|
||||
}
|
||||
file { '/etc/nagios3/zuliprc':
|
||||
ensure => file,
|
||||
mode => 644,
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
define service{
|
||||
use generic-service
|
||||
host_name nagios
|
||||
service_description Number of autossh processes
|
||||
check_command check_named_procs!autossh!<%= @hosts.length %>:<%= @hosts.length %>!<%= @hosts.length %>:<%= @hosts.length + 2 %>
|
||||
}
|
Loading…
Reference in New Issue