We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57bc909 commit 1d302e8Copy full SHA for 1d302e8
1 file changed
flaskAlert.py
@@ -19,7 +19,8 @@
19
def postAlertmanager():
20
21
content = json.loads(request.get_data())
22
- print(content)
+ with open("Output.txt", "w") as text_file:
23
+ text_file.write("{0}".format(content))
24
try:
25
26
for alert in content['alerts']:
@@ -46,5 +47,5 @@ def postAlertmanager():
46
47
return "Alert nOK", 200
48
49
if __name__ == '__main__':
- logging.basicConfig(filename='flaskAlert.log',level=logging.DEBUG)
50
+ logging.basicConfig(filename='flaskAlert.log',level=logging.INFO)
51
app.run(host='0.0.0.0', port=9119)
0 commit comments