Skip to content

Instantly share code, notes, and snippets.

@stuart-warren
Last active December 16, 2015 12:39
Show Gist options
  • Select an option

  • Save stuart-warren/5435760 to your computer and use it in GitHub Desktop.

Select an option

Save stuart-warren/5435760 to your computer and use it in GitHub Desktop.
CQL:
DESCRIBE KEYSPACE kairosdb ;
ALTER KEYSPACE kairosdb WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 2, 'dc2': 2 };
Get metrics:
curl -XPOST 'http://localhost:8080/api/v1/datapoints/query' -d '
{
"metrics": [
{
"tags": {
"host": "dc1-1"
},
"name": "proc.loadavg.1min"
},
{
"tags": {
"host": "dc1-2"
},
"name": "proc.loadavg.1min"
},
{
"tags": {
"host": "dc1-3"
},
"name": "proc.loadavg.1min"
}
],
"cache_time": 0,
"start_relative": {
"value": "1",
"unit": "days"
}
}
'
curl -XGET 'http://localhost:8080/api/v1/metricnames'
curl -XGET 'http://localhost:8080/api/v1/tagnames'
curl -XGET 'http://localhost:8080/api/v1/tagvalues'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment