mirror of
https://github.com/FAUSheppy/icinga-webhook-gateway
synced 2025-12-06 07:21:38 +01:00
reply with correct service name
Reply with the correct service name if the service is configured but has never reported in as the icinga command expects it.
This commit is contained in:
@@ -72,7 +72,8 @@ def default():
|
||||
sqlalchemy.desc(Status.timestamp)).first()
|
||||
|
||||
if not lastSuccess and not lastFail:
|
||||
return flask.jsonify(buildReponseDict(None))
|
||||
# service has never reported in #
|
||||
return flask.jsonify(buildReponseDict(None, service=service))
|
||||
elif not lastSuccess and lastFail:
|
||||
return flask.jsonify(buildReponseDict(lastFail))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user