From aa71b9fc31a917244ec5f59b6205ce8a3b81b78d Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Sun, 4 Apr 2021 00:03:14 -0400 Subject: [PATCH] Add some more checks on salt minions Among other things, this fixes sysconfig/salt#16. --- local.d/adehnert-host.cfg | 15 +++++++++++++++ local.d/ssh-commands.cfg | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/local.d/adehnert-host.cfg b/local.d/adehnert-host.cfg index 8d27bc4..b69cb44 100644 --- a/local.d/adehnert-host.cfg +++ b/local.d/adehnert-host.cfg @@ -43,9 +43,24 @@ define service { check_command check_ssh } +define service { + use adehnert-service + hostgroup_name adehnert-minions + service_description SERVICES-ALL + check_command check_byssh_generic!check_services_all +} + define service { use adehnert-service hostgroup_name adehnert-minions service_description SALT check_command check_byssh_service!salt-minion } + +define service { + use adehnert-service + hostgroup_name adehnert-minions + #host_name bots + service_description SIGN-SSH + check_command check_byssh_service_failed!sign-ssh-keys +} diff --git a/local.d/ssh-commands.cfg b/local.d/ssh-commands.cfg index f2f01e2..e34a7bd 100644 --- a/local.d/ssh-commands.cfg +++ b/local.d/ssh-commands.cfg @@ -2,3 +2,13 @@ define command{ command_name check_byssh_service command_line /usr/lib/nagios/plugins/check_by_ssh -l nagios-ssh -H '$HOSTADDRESS$' -C 'check_service $ARG1$' } + +define command{ + command_name check_byssh_service_failed + command_line /usr/lib/nagios/plugins/check_by_ssh -l nagios-ssh -H '$HOSTADDRESS$' -C 'check_service_failed $ARG1$' +} + +define command{ + command_name check_byssh_generic + command_line /usr/lib/nagios/plugins/check_by_ssh -l nagios-ssh -H '$HOSTADDRESS$' -C '$ARG1$' +} -- 2.34.1