forked from bortzmeyer/check_expire
Icinga template
This commit is contained in:
parent
ab3feeec4a
commit
5c8a6af546
40
README.md
40
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.
|
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
|
## License
|
||||||
|
|
||||||
GPL. See LICENSE.
|
GPL. See LICENSE.
|
||||||
|
Loading…
Reference in New Issue
Block a user