mirror of
https://github.com/FAUSheppy/icinga-webhook-gateway
synced 2025-12-06 07:21:38 +01:00
icinga host checkalive
This commit is contained in:
@@ -49,3 +49,12 @@ Use the [python-script]() as a command to execute, you can pass *protocol*, *hos
|
||||
assign where host.name == "your_host"
|
||||
}
|
||||
|
||||
Icinga won't have a direct line to an actual host. You can define the remote hosts normally but change the alive check from *hostalive* to *http* and check the gateway availability instead. This will also prevent an error flood if the gateway ever becomes unreachable. The gateway has the */alive* for this purpose.
|
||||
|
||||
object Host "laptop_1"{
|
||||
display_name = "Sheppy's Laptop"
|
||||
address = "localhost"
|
||||
check_command = "http"
|
||||
groups = ["gateway-host", "linux-generic"]
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,11 @@ def buildReponseDict(status, service=None):
|
||||
"timestamp" : status.timestamp,
|
||||
"info" : status.info_text }
|
||||
|
||||
@app.route('/alive')
|
||||
def additionalDates():
|
||||
# simple location for icinga alive checks via HTTP #
|
||||
return ("", 204)
|
||||
|
||||
@app.route('/', methods=["GET", "POST"])
|
||||
def additionalDates():
|
||||
if flask.request.method == "GET":
|
||||
|
||||
Reference in New Issue
Block a user