From 7403139622f9a84b7403be65564cd3cfeb82816e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 13 May 2019 14:36:27 +0200 Subject: [PATCH] Add check command for x509's host check The refererred PR: https://github.com/Icinga/icingaweb2-module-x509/pull/47 --- itl/plugins-contrib.d/icingacli.conf | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf index cc7401845..3086aabec 100644 --- a/itl/plugins-contrib.d/icingacli.conf +++ b/itl/plugins-contrib.d/icingacli.conf @@ -85,3 +85,36 @@ object CheckCommand "icingacli-elasticsearch" { } +object CheckCommand "icingacli-x509" { + import "icingacli" + + command += [ "x509", "check", "host" ] + + arguments = { + "--ip" = { + value = "$icingacli_x509_ip$" + description = "A hosts IP address" + } + "--host" = { + value = "$icingacli_x509_host$" + description = "A hosts name" + } + "--port" = { + value = "$icingacli_x509_port$" + description = "The port to check in particular" + } + "--warning" = { + value = "$icingacli_x509_warning$" + description = "Less remaining time results in state WARNING" + } + "--critical" = { + value = "$icingacli_x509_critical$" + description = "Less remaining time results in state CRITICAL" + } + "--allow-self-signed" = { + set_if = "$icingacli_x509_allow_self_signed$" + description = "Ignore if a certificate or its issuer has been self-signed" + } + } +} + -- 2.50.1