blob: f8a5ed45287d5b627e920064618d1d8b742bf9fc (
plain)
1
2
3
4
5
6
7
8
|
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"])
|