Created
November 12, 2013 19:59
-
-
Save rottenbytes/7437600 to your computer and use it in GitHub Desktop.
Check if the logstash indexing is right on time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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