From 969fc7c21dc7fa85dcc516aedf8e816ee8bc8bd6 Mon Sep 17 00:00:00 2001 From: Stonewall Jackson Date: Mon, 6 Feb 2023 20:31:20 -0500 Subject: set max_retries to UINT32_MAX for asterisk registrations After a brief internet outage, I noticed that asterisk had given up trying to reconnect to my upstream SIP server (looks like the default value of max_retries is 10). Although the asterisk "registration" object was disconnected, the "endpoint" object still reported being up, so the check_asterisk_endpoints nagios plugin did not alert me to the problem. This commit sets max_retries to UNIT32_MAX for asterisk registrations by default. It also adds a new nagios plugin, check_asterisk_registrations. Unfortunately, the ARI does not expose registrations via the REST API, so I had to write a hacky bash script to parse the asterisk CLI output. --- roles/nagios_client/vars/main.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'roles/nagios_client/vars') diff --git a/roles/nagios_client/vars/main.yml b/roles/nagios_client/vars/main.yml index 29fca6d..bbd274d 100644 --- a/roles/nagios_client/vars/main.yml +++ b/roles/nagios_client/vars/main.yml @@ -9,3 +9,4 @@ nagios_sudo_whitelist: - /usr/bin/dnf needs-restarting --reboothint - /usr/bin/dnf needs-restarting --services - /usr/bin/systemctl status -- * + - /usr/sbin/asterisk -rx pjsip show registrations -- cgit