]> granicus.if.org Git - icinga2/commitdiff
Add check command for x509's host check
authorJohannes Meyer <johannes.meyer@netways.de>
Mon, 13 May 2019 12:36:27 +0000 (14:36 +0200)
committerGitHub <noreply@github.com>
Mon, 13 May 2019 12:36:27 +0000 (14:36 +0200)
The refererred PR: https://github.com/Icinga/icingaweb2-module-x509/pull/47

itl/plugins-contrib.d/icingacli.conf

index cc7401845d0183910fb51618b0fc43723fd5e058..3086aabece959493d0be378e45fc7a035c40c9e7 100644 (file)
@@ -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"
+                }
+        }
+}
+