From: Alex Dehnert Date: Fri, 9 Jul 2021 00:23:49 +0000 (-0400) Subject: vault: Check that the vault server is responding with good cert X-Git-Url: https://dehnerts.com/gitweb/?a=commitdiff_plain;h=5e10e2774431f904334fff9e347136b4a7a0ddff;p=sysconfig%2Fnagios3.git vault: Check that the vault server is responding with good cert --- diff --git a/conf.d/extra_commands.cfg b/conf.d/extra_commands.cfg index 99716f0..6546f9e 100644 --- a/conf.d/extra_commands.cfg +++ b/conf.d/extra_commands.cfg @@ -4,3 +4,9 @@ define command { command_line /usr/lib/nagios/plugins/check_smtp -H '$HOSTADDRESS$' -S -D 14 } +# 'check_https_port' command definition +define command{ + command_name check_https_port + command_line /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' -C '$_SERVICE_CHECK_CERT_EXPIRY_DAYS$' --port '$_SERVICE_CONNECT_PORT$' '$ARG1$' + } + diff --git a/local.d/virunga.cfg b/local.d/virunga.cfg index d01e8c6..6e91b47 100644 --- a/local.d/virunga.cfg +++ b/local.d/virunga.cfg @@ -10,3 +10,13 @@ define service { service_description RUN-VAULT check_command check_byssh_service!vault.service } + +define service { + name virunga-vault + use adehnert-service + host_name virunga + service_description VAULT-HTTPS + check_command check_https_port + __check_cert_expiry_days 10 + __connect_port 8200 +}