Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

nagios: Add a catchall "other" set.

Alex Vandiver775a084d0f71
diff --git a/puppet/zulip_ops/files/nagios4/conf.d/hostgroups.cfg b/puppet/zulip_ops/files/nagios4/conf.d/hostgroups.cfg
index bea3731813f..d6f3c4ed8d4 100644
--- a/puppet/zulip_ops/files/nagios4/conf.d/hostgroups.cfg
+++ b/puppet/zulip_ops/files/nagios4/conf.d/hostgroups.cfg
@@ -80,3 +80,8 @@ define hostgroup {
hostgroup_name smokescreen
alias Servers that run the Smokescreen HTTP proxy
}
+
+define hostgroup {
+ hostgroup_name other
+ alias Other servers
+}
diff --git a/puppet/zulip_ops/files/nagios4/conf.d/services.cfg b/puppet/zulip_ops/files/nagios4/conf.d/services.cfg
index ef0bd0c0d19..0691c907cb8 100644
--- a/puppet/zulip_ops/files/nagios4/conf.d/services.cfg
+++ b/puppet/zulip_ops/files/nagios4/conf.d/services.cfg
@@ -74,7 +74,7 @@ define service {
define service {
use generic-service
service_description Load
- hostgroup_name fullstack, redis, staging_frontends, smokescreen
+ hostgroup_name fullstack, redis, staging_frontends, smokescreen, other
check_command check_remote_load!22!7.0,6.0,5.0!10.0,8.0,6.0
contact_groups admins
}
diff --git a/puppet/zulip_ops/manifests/profile/nagios.pp b/puppet/zulip_ops/manifests/profile/nagios.pp
index 81389f9b5d0..8cba3ebcce9 100644
--- a/puppet/zulip_ops/manifests/profile/nagios.pp
+++ b/puppet/zulip_ops/manifests/profile/nagios.pp
@@ -30,6 +30,7 @@ class zulip_ops::profile::nagios {
$hosts_redis = split(zulipconf('nagios', 'hosts_redis', undef), ',')
$hosts_fullstack = split(zulipconf('nagios', 'hosts_fullstack', undef), ',')
$hosts_smokescreen = split(zulipconf('nagios', 'hosts_smokescreen', undef), ',')
+ $hosts_other = split(zulipconf('nagios', 'hosts_other', undef), ',')
file { '/etc/nagios4/':
recurse => true,
diff --git a/puppet/zulip_ops/templates/nagios4/hosts.cfg.template.erb b/puppet/zulip_ops/templates/nagios4/hosts.cfg.template.erb
index 54c37f80da9..ba96c5cea29 100644
--- a/puppet/zulip_ops/templates/nagios4/hosts.cfg.template.erb
+++ b/puppet/zulip_ops/templates/nagios4/hosts.cfg.template.erb
@@ -87,3 +87,13 @@ define host{
hostgroups all,aws_host,pageable_servers,smokescreen
}
<% end -%>
+
+<% @hosts_other.each do |host| -%>
+define host{
+ use generic-host
+ host_name <%= host %>
+ alias <%= host %>
+ address <%= host %>.<%= @default_host_domain %>
+ hostgroups all,aws_host,not_pageable_servers,other
+ }
+<% end -%>