Skip to content

Instantly share code, notes, and snippets.

@rottenbytes
Created November 12, 2013 19:59
Show Gist options
  • Save rottenbytes/7437600 to your computer and use it in GitHub Desktop.
Save rottenbytes/7437600 to your computer and use it in GitHub Desktop.
Check if the logstash indexing is right on time
curl -s "a.b.c.d:9200/logstash-2013.11.12/_search?pretty" -d '{
"query": {
"match_all": {}
},
"from": 0,
"size": 1,
"fields": [ ],
"sort": {
"@timestamp" : "desc"
}
}'
# gives the timestamp (epoch style) of the latest indexed document. If your want to match against a particular field (source server to check per shipper) turn "match_all" query into a "match" : { "servername": "foobar" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment