Skip to content

Instantly share code, notes, and snippets.

@clupprich
Created December 19, 2014 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clupprich/8c1d85c1c3ce79767875 to your computer and use it in GitHub Desktop.
Save clupprich/8c1d85c1c3ce79767875 to your computer and use it in GitHub Desktop.
Write CouchDB stats into DB with current timestamp
curl -s -X GET http://localhost:5984/_stats | echo "[$(cat -), { \"datetime\": \"$(date -u +"%Y-%m-%dT%H:%M:%SZ")\" }]" | jq '.[0] + .[1]' | curl -X POST -H "Content-Type: application/json" -d @- http://localhost:5984/stats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment