summaryrefslogtreecommitdiffstats
path: root/tests/es_response_get_msgnum.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/es_response_get_msgnum.py')
-rw-r--r--tests/es_response_get_msgnum.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/es_response_get_msgnum.py b/tests/es_response_get_msgnum.py
new file mode 100644
index 0000000..f8a5ed4
--- /dev/null
+++ b/tests/es_response_get_msgnum.py
@@ -0,0 +1,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"])