Last active
July 11, 2017 02:29
-
-
Save portante/edb5c785040e116bfd6eb63cf35d40e8 to your computer and use it in GitHub Desktop.
A simple script to emit a timestamped number of the count of documents currently in ES
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
| #!/bin/bash | |
| ES_URL='https://localhost:9200' | |
| curl_get='curl -s -X GET --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key' | |
| # Full Date Stamp Epoch Timestamp Count | |
| # 2017-07-11T02:25:50 1499739950 02:25:50 36208782 | |
| for i in {1..30}; do | |
| echo "$(date +%Y-%m-%dT%H:%M:%S) $($curl_get $ES_URL/_cat/count)" | |
| sleep 10 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment