From 6ee74b3433bee59fe63ea141e87d5805916969fa Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Tue, 23 Mar 2021 19:27:42 -0700 Subject: [PATCH] puppet: Check health of APT repository. --- puppet/zulip_ops/files/nagios3/commands.cfg | 5 +++++ puppet/zulip_ops/files/nagios3/conf.d/services.cfg | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/puppet/zulip_ops/files/nagios3/commands.cfg b/puppet/zulip_ops/files/nagios3/commands.cfg index 8ba7b7330e..464cabb601 100644 --- a/puppet/zulip_ops/files/nagios3/commands.cfg +++ b/puppet/zulip_ops/files/nagios3/commands.cfg @@ -200,3 +200,8 @@ 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 } + +define command{ + command_name check_apt_repo_status + command_line /usr/lib/nagios/plugins/check_http --sni --ssl -H '$ARG1$' -u 'https://$ARG1$$ARG2$/dists/stable/Release' --expect=200 -s Contents-amd64 +} diff --git a/puppet/zulip_ops/files/nagios3/conf.d/services.cfg b/puppet/zulip_ops/files/nagios3/conf.d/services.cfg index 0ad19a3ca3..8eef0b8bcd 100644 --- a/puppet/zulip_ops/files/nagios3/conf.d/services.cfg +++ b/puppet/zulip_ops/files/nagios3/conf.d/services.cfg @@ -488,6 +488,15 @@ define service { hostgroup_name smokescreen contact_groups page_admins } + +define service { + use generic-service + service_description Check desktop APT repository + host_name nagios + check_command check_apt_repo_status!download.zulip.com!/desktop/apt + contact_groups admins +} + define service { use generic-service service_description Check chat.fhir.org cert