From 456718dd30ec0bafb5fb55942d9a23aa7b6c0b93 Mon Sep 17 00:00:00 2001 From: "Mr. Robot" Date: Thu, 24 Dec 2020 09:38:46 +0100 Subject: [PATCH] add data source for check_ssl_cert --- data/check_ssl_cert.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 data/check_ssl_cert.json diff --git a/data/check_ssl_cert.json b/data/check_ssl_cert.json new file mode 100644 index 0000000..a4f2555 --- /dev/null +++ b/data/check_ssl_cert.json @@ -0,0 +1,17 @@ +{ + "description": "This is the 'check_by_ssh' Nagios plugin, available e.g. in '/usr/lib/nagios/plugins/'.\n", + "functions": { + "command": [ + { + "description": "The host example.net must return a certificate via TLS", + "code": "TF=$(mktemp)\necho \"[command] | tee [file]\" > $TF\nchmod +x $TF\ncheck_ssl_cert --curl-bin $TF -H example.net\ncat [file]\n" + } + ], + "sudo": [ + { + "description": "The host example.net must return a certificate via TLS", + "code": "TF=$(mktemp)\necho \"[command] | tee [file]\" > $TF\nchmod +x $TF\numask 022\ncheck_ssl_cert --curl-bin $TF -H example.net\ncat [file]\n" + } + ] + } +}