Skip to content
Snippets Groups Projects
Commit 7d909518 authored by jurgenhaas's avatar jurgenhaas
Browse files

Fix purge script

parent 08866011
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ def getIndex():
def purgeSingle(cat, day):
for index in cat:
if index['index'] == args.index:
post_data = {"query":{"bool":{"filter":{"range":{"@timestamp":{"lte":day.strftime('%Y-%m-%d')}}}}}}
post_data = {"query":{"bool":{"filter":{"range":{"syslog_time":{"lte":day.strftime('%d/%b/%Y:%H:%M:%S Z')}}}}}}
postfields = json.dumps(post_data)
print(' Postfields: ' + postfields)
buffer = BytesIO()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment