From 5c8a6af546861baba88eb0e950a8369d0250a9a9 Mon Sep 17 00:00:00 2001 From: Stephane Bortzmeyer Date: Mon, 5 Jul 2021 21:04:34 +0200 Subject: [PATCH] Icinga template --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ TODO | 3 --- 2 files changed, 40 insertions(+), 3 deletions(-) delete mode 100644 TODO diff --git a/README.md b/README.md index 4f0cba7..3c46605 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,46 @@ You need Python 3 and [Requests](http://python-requests.org/). You can install R Then, copy the script `check_expire` and the file `ianardap.py`to the directory of local plugins. +## Icinga configuration + +If you use Icinga, here is a possible definition of the command: + +``` +object CheckCommand "expiration" { + command = [ PluginContribDir + "/check_expire" ] + + arguments = { + "-H" = "$address$", + "-c" = "$expiration_critical$", + "-w" = "$expiration_warning$", + "-v" = { set_if = "$expiration_verbose$" } + } + +} + +apply Service "expiration" { + import "generic-service" + + check_command = "expiration" + + assign where host.address && host.vars.monitor_expiration +} +``` + +And a possible use: + +``` +object Host "bortzmeyer-org" { + ... + + address = "bortzmeyer.org" + + vars.monitor_expiration = true + vars.expiration_verbose = true + +} +``` + ## License GPL. See LICENSE. diff --git a/TODO b/TODO deleted file mode 100644 index bd515c3..0000000 --- a/TODO +++ /dev/null @@ -1,3 +0,0 @@ -Icinga template - -