puppet: Add a nagios alert configuration for smokescreen.

This verifies that the proxy is working by accessing a
highly-available website through it.  Since failure of this equates to
failures of Sentry notifications and Android mobile push
notifications, this is a paging service.
This commit is contained in:
Alex Vandiver 2021-03-17 20:04:15 -07:00 committed by Tim Abbott
parent 2b03a74d97
commit 9ea86c861b
5 changed files with 29 additions and 0 deletions

View File

@ -190,3 +190,8 @@ define command{
command_name check_https_status
command_line /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' --expect=200,302,401
}
define command{
command_name check_proxy_status
command_line /usr/lib/nagios/plugins/check_http --ssl -H 'www.google.com' -u 'https://www.google.com/' -j CONNECT -I '$HOSTADDRESS$' -p 4750 --expect=200,302,401 -s Search
}

View File

@ -81,3 +81,8 @@ define hostgroup {
hostgroup_name has_swap
alias Servers that are expected to have swap
}
define hostgroup {
hostgroup_name smokescreen
alias Servers that run the Smokescreen HTTP proxy
}

View File

@ -480,3 +480,11 @@ define service {
check_command check_email_deliverer_backlog
contact_groups admins
}
define service {
use generic-service
service_description Check Smokescreen proxy
check_command check_proxy_status
hostgroup_name smokescreen
contact_groups page_admins
}

View File

@ -29,6 +29,7 @@ class zulip_ops::profile::nagios {
$hosts_redis = split(zulipconf('nagios', 'hosts_redis', undef), ',')
$hosts_stats = split(zulipconf('nagios', 'hosts_stats', undef), ',')
$hosts_fullstack = split(zulipconf('nagios', 'hosts_fullstack', undef), ',')
$hosts_smokescreen = split(zulipconf('nagios', 'hosts_smokescreen', undef), ',')
file { '/etc/nagios3/':
recurse => true,

View File

@ -87,3 +87,13 @@ define host{
hostgroups all,not_pageable_servers, redis
}
<% end -%>
<% @hosts_smokescreen.each do |host| -%>
define host{
use generic-host
host_name <%= host %>
alias <%= host %>
address <%= host %>.<%= @default_host_domain %>
hostgroups all,pageable_servers,smokescreen
}
<% end -%>