Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marcusdb/a18632e9dfa41a628ffe16af6808a654 to your computer and use it in GitHub Desktop.
Save marcusdb/a18632e9dfa41a628ffe16af6808a654 to your computer and use it in GitHub Desktop.
delete old filebeat indices from elasticsearch
#!/bin/bash
index=$(date --date='14 days ago' +%Y.%m.%d)
curl -s -XDELETE "http://localhost:9200/filebeat-$index?pretty"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment