Icinga template

This commit is contained in:
Stephane Bortzmeyer 2021-07-05 21:04:34 +02:00
parent ab3feeec4a
commit 5c8a6af546
2 changed files with 40 additions and 3 deletions

View File

@ -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.

3
TODO
View File

@ -1,3 +0,0 @@
Icinga template