Skip to content
Snippets Groups Projects

Fix metrics stuff

Merged Jan Hartig requested to merge dev into main
1 file
+ 7
2
Compare changes
  • Side-by-side
  • Inline
+ 7
2
@@ -107,11 +107,16 @@ def main(end):
try:
try:
auth = HTTPBasicAuth(config["METRICS"]["USER"], config["MONITORING"]["PASS"])
auth = HTTPBasicAuth(config["METRICS"]["USER"], config["METRICS"]["PASS"])
except KeyError:
auth = None
requests.post(config["METRICS"]["URL"], json=metrics, auth=auth)
r = requests.post(config["METRICS"]["URL"], json=metrics, auth=auth)
try:
r.raise_for_status()
except requests.HTTPError as e:
print("[MAILSERVICE] Could not send metrics to server: {}".format(e))
except KeyError:
pass
Loading