nagios: Add a catchall "other" set.

This commit is contained in:
Alex Vandiver 2022-06-13 17:12:01 -07:00 committed by Alex Vandiver
parent 83c82c8e15
commit 775a084d0f
4 changed files with 17 additions and 1 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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,

View File

@ -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 -%>