From 5e10e2774431f904334fff9e347136b4a7a0ddff Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Thu, 8 Jul 2021 20:23:49 -0400 Subject: [PATCH] vault: Check that the vault server is responding with good cert --- conf.d/extra_commands.cfg | 6 ++++++ local.d/virunga.cfg | 10 ++++++++++ 2 files changed, 16 insertions(+) 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 +} -- 2.34.1