nagios: Move server-specific config into hostgroups.

These new hostgroups exist so we can eliminate explicit references to
individual hosts in services.cfg.
This commit is contained in:
Tim Abbott 2017-10-05 19:58:35 -07:00
parent b6ce9583a9
commit 886a8853ac
3 changed files with 30 additions and 10 deletions

View File

@ -25,6 +25,16 @@ define hostgroup {
alias Frontend Web Servers
}
define hostgroup {
hostgroup_name staging_frontends
alias Staging Frontend Web Servers
}
define hostgroup {
hostgroup_name prod_frontends
alias Production Frontend Web Servers
}
define hostgroup {
hostgroup_name redis
alias Redis Servers
@ -36,6 +46,16 @@ define hostgroup {
alias Zephyr Mirror Servers
}
define hostgroup {
hostgroup_name zmirrorp
alias Zephyr Mirror Personals Servers
}
define hostgroup {
hostgroup_name zmirror_main
alias Zephyr Mirror Main Servers
}
define hostgroup {
hostgroup_name postgres
alias PostgreSQL Servers

View File

@ -92,7 +92,7 @@ define service {
use generic-service
service_description zephyr mirror forwarding
check_command check_zephyr_mirror_forwarding!22
host zmirror
hostgroup_name zmirror_main
normal_check_interval 2
# Note: the actual check is run via cron, so retry_check_interval
# should always equal normal_check_interval.
@ -105,13 +105,13 @@ define service {
use generic-service
service_description user zephyr mirror liveness
check_command check_user_zephyr_mirror_liveness!22
host prod0
hostgroup prod_frontends
contact_groups admins
}
define service {
use generic-service
host zmirrorp
hostgroup zmirrorp
service_description Check personal zephyr mirrors
check_command check_personal_zephyr_mirrors!22
contact_groups admins
@ -328,7 +328,7 @@ define service {
use generic-service
service_description zmirror subscriptions syncing
check_command check_sync_public_streams!22
host zmirror
hostgroup zmirror_main
normal_check_interval 2
retry_check_interval 2
max_check_attempts 5
@ -591,7 +591,7 @@ define service {
define service {
use generic-service
host staging
hostgroup_name staging_frontends
service_description Check email deliverer process which is only used on Zulip Voyager
check_command check_email_deliverer_process
contact_groups admins
@ -599,7 +599,7 @@ define service {
define service {
use generic-service
host staging
hostgroup_name staging_frontends
service_description Check email deliverer backlog which is only used on Zulip Voyager
check_command check_email_deliverer_backlog
contact_groups admins

View File

@ -14,7 +14,7 @@ define host{
host_name <%= host %>
alias <%= host %>
address <%= host %>.<%= @hosts_domain %>
hostgroups all,web,frontends,pageable_servers
hostgroups all,web,frontends,prod_frontends,pageable_servers
}
<% end -%>
@ -24,7 +24,7 @@ define host{
host_name <%= host %>
alias <%= host %>
address <%= host %>.<%= @hosts_domain %>
hostgroups all,web,frontends,not_pageable_servers
hostgroups all,web,frontends,staging_frontends,not_pageable_servers
}
<% end -%>
@ -34,7 +34,7 @@ define host{
host_name <%= host %>
alias <%= host %>
address <%= host %>.<%= @hosts_domain %>
hostgroups all,zmirror
hostgroups all,zmirror,zmirror_main
}
<% end -%>
@ -44,7 +44,7 @@ define host{
host_name <%= host %>
alias <%= host %>
address <%= host %>.<%= @hosts_domain %>
hostgroups all,zmirror
hostgroups all,zmirror,zmirrorp
}
<% end -%>