Skip to content

Instantly share code, notes, and snippets.

@warmans
Created February 10, 2014 22:24
Show Gist options
  • Save warmans/8925494 to your computer and use it in GitHub Desktop.
Save warmans/8925494 to your computer and use it in GitHub Desktop.
Kairos REST activity
#!/bin/bash
# Current time in milliseconds
metric=test_rest_metric
host=127.0.0.1:8080
for i in {1..10000}
do
now=$(($(date +%s%N)/1000000))
curl -X POST -H "Content-Type: application/json" -d "[{"name": "$metric", "datapoints": [[$now, $i]], "tags": {"hostname": 'foo'}}]" $host/api/v1/datapoints
echo "$now OK"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment