mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 11:00:41 +01:00
9 lines
228 B
Python
9 lines
228 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"])
|