mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-15 10:30:40 +01:00
python3 does not like mixing spaces and tabs for indentation, so we get rid of the tab before print().
9 lines
235 B
Python
9 lines
235 B
Python
import json
|
|
import os
|
|
|
|
with open(os.environ['RSYSLOG_DYNNAME'] + ".work") as json_file:
|
|
json_data = json.load(json_file)
|
|
json_data = json_data["hits"]
|
|
for item in json_data["hits"]:
|
|
print(item["_source"]["msgnum"])
|