From e1a1b722f4b60dd7842732f4dda6c6cc9bac09f9 Mon Sep 17 00:00:00 2001 From: Idriss Neumann Date: Wed, 11 Sep 2024 18:07:27 +0100 Subject: [PATCH] Improve monitor --- VERSION | 2 +- src/utils/monitor.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 4d54dad..c4e41f9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.0.2 +4.0.3 diff --git a/src/utils/monitor.py b/src/utils/monitor.py index bb24570..6900ed1 100644 --- a/src/utils/monitor.py +++ b/src/utils/monitor.py @@ -69,7 +69,7 @@ def check_http_monitor(monitor, gauges): "status": "ko", "type": "monitor", "time": vdate.isoformat(), - "message": "Not supported http method", + "message": "Not supported http method: actual = {}".format(method), "monitor": monitor }) set_gauge(gauges['result'], 0) @@ -81,7 +81,7 @@ def check_http_monitor(monitor, gauges): "type": "monitor", "time": vdate.isoformat(), "duration": duration, - "message": "Not supported http method", + "message": "Not expected status code: expected = {}, actual = {}".format(expected_http_code, response.status_code), "monitor": monitor }) set_gauge(gauges['result'], 0) @@ -93,7 +93,7 @@ def check_http_monitor(monitor, gauges): "type": "monitor", "time": vdate.isoformat(), "duration": duration, - "message": "Response not contain {}".format(expected_contain), + "message": "Response not valid: expected = {}, actual = {}".format(expected_contain, response.text), "monitor": monitor }) set_gauge(gauges['result'], 0)