Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
InfluxDB test script
printf "creating database\n"
curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
printf "creating retention policy\n"
curl -G http://localhost:8086/query --data-urlencode "q=CREATE RETENTION POLICY myrp ON mydb DURATION 365d REPLICATION 1 DEFAULT"
printf "inserting data\n"
curl -d '{"database" : "mydb", "retentionPolicy" : "myrp", "points": [{"name":"cpu","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":61}},{"name":"cpu","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":53}},{"name":"cpu","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":80}},{"name":"cpu","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":86}},{"name":"cpu","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":87}},{"name":"cpu","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":10}},{"name":"cpu","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":97}},{"name":"cpu","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":63}},{"name":"cpu","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":96}},{"name":"cpu","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":92}},{"name":"cpu","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":77}},{"name":"cpu","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":98}},{"name":"cpu","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":29}},{"name":"cpu","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":14}},{"name":"cpu","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":84}},{"name":"key_count","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":3}},{"name":"key_count","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":100}},{"name":"key_count","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":18}},{"name":"key_count","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":80}},{"name":"key_count","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":34}},{"name":"key_count","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":99}},{"name":"key_count","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":4}},{"name":"key_count","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":100}},{"name":"key_count","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":38}},{"name":"key_count","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":2}},{"name":"key_count","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":22}},{"name":"key_count","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":36}},{"name":"key_count","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":74}},{"name":"key_count","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":71}},{"name":"key_count","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":89}},{"name":"memory","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":11}},{"name":"memory","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":76}},{"name":"memory","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":25}},{"name":"memory","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":71}},{"name":"memory","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":20}},{"name":"memory","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":18}},{"name":"memory","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":17}},{"name":"memory","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":14}},{"name":"memory","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":69}},{"name":"memory","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":71}},{"name":"memory","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":71}},{"name":"memory","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":52}},{"name":"memory","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":68}},{"name":"memory","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":94}},{"name":"memory","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":99}},{"name":"network_in","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":27}},{"name":"network_in","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":7}},{"name":"network_in","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":70}},{"name":"network_in","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":79}},{"name":"network_in","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":98}},{"name":"network_in","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":33}},{"name":"network_in","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":31}},{"name":"network_in","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":35}},{"name":"network_in","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":1}},{"name":"network_in","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":57}},{"name":"network_in","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":1}},{"name":"network_in","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":40}},{"name":"network_in","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":81}},{"name":"network_in","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":20}},{"name":"network_in","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":32}},{"name":"network_out","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":22}},{"name":"network_out","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":32}},{"name":"network_out","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":64}},{"name":"network_out","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":49}},{"name":"network_out","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":98}},{"name":"network_out","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":76}},{"name":"network_out","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":33}},{"name":"network_out","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":4}},{"name":"network_out","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":45}},{"name":"network_out","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":94}},{"name":"network_out","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":79}},{"name":"network_out","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":53}},{"name":"network_out","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":34}},{"name":"network_out","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":3}},{"name":"network_out","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":5}},{"name":"hd","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":54}},{"name":"hd","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":50}},{"name":"hd","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":92}},{"name":"hd","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":33}},{"name":"hd","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":55}},{"name":"hd","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":93}},{"name":"hd","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":39}},{"name":"hd","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":45}},{"name":"hd","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":32}},{"name":"hd","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":74}},{"name":"hd","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":62}},{"name":"hd","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":58}},{"name":"hd","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":15}},{"name":"hd","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":45}},{"name":"hd","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":29}}]}' -H "Content-Type: application/json" http://localhost:8086/write
printf "sleeping for a second then inserting more data\n"
sleep 1
curl -d '{"database" : "mydb", "retentionPolicy" : "myrp", "points": [{"name":"cpu","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":61}},{"name":"cpu","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":53}},{"name":"cpu","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":80}},{"name":"cpu","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":86}},{"name":"cpu","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":87}},{"name":"cpu","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":10}},{"name":"cpu","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":97}},{"name":"cpu","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":63}},{"name":"cpu","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":96}},{"name":"cpu","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":92}},{"name":"cpu","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":77}},{"name":"cpu","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":98}},{"name":"cpu","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":29}},{"name":"cpu","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":14}},{"name":"cpu","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":84}},{"name":"key_count","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":3}},{"name":"key_count","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":100}},{"name":"key_count","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":18}},{"name":"key_count","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":80}},{"name":"key_count","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":34}},{"name":"key_count","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":99}},{"name":"key_count","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":4}},{"name":"key_count","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":100}},{"name":"key_count","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":38}},{"name":"key_count","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":2}},{"name":"key_count","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":22}},{"name":"key_count","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":36}},{"name":"key_count","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":74}},{"name":"key_count","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":71}},{"name":"key_count","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":89}},{"name":"memory","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":11}},{"name":"memory","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":76}},{"name":"memory","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":25}},{"name":"memory","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":71}},{"name":"memory","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":20}},{"name":"memory","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":18}},{"name":"memory","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":17}},{"name":"memory","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":14}},{"name":"memory","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":69}},{"name":"memory","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":71}},{"name":"memory","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":71}},{"name":"memory","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":52}},{"name":"memory","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":68}},{"name":"memory","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":94}},{"name":"memory","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":99}},{"name":"network_in","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":27}},{"name":"network_in","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":7}},{"name":"network_in","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":70}},{"name":"network_in","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":79}},{"name":"network_in","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":98}},{"name":"network_in","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":33}},{"name":"network_in","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":31}},{"name":"network_in","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":35}},{"name":"network_in","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":1}},{"name":"network_in","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":57}},{"name":"network_in","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":1}},{"name":"network_in","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":40}},{"name":"network_in","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":81}},{"name":"network_in","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":20}},{"name":"network_in","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":32}},{"name":"network_out","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":22}},{"name":"network_out","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":32}},{"name":"network_out","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":64}},{"name":"network_out","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":49}},{"name":"network_out","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":98}},{"name":"network_out","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":76}},{"name":"network_out","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":33}},{"name":"network_out","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":4}},{"name":"network_out","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":45}},{"name":"network_out","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":94}},{"name":"network_out","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":79}},{"name":"network_out","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":53}},{"name":"network_out","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":34}},{"name":"network_out","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":3}},{"name":"network_out","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":5}},{"name":"hd","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":54}},{"name":"hd","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":50}},{"name":"hd","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":92}},{"name":"hd","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":33}},{"name":"hd","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":55}},{"name":"hd","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":93}},{"name":"hd","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":39}},{"name":"hd","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":45}},{"name":"hd","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":32}},{"name":"hd","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":74}},{"name":"hd","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":62}},{"name":"hd","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":58}},{"name":"hd","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":15}},{"name":"hd","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":45}},{"name":"hd","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":29}}]}' -H "Content-Type: application/json" http://localhost:8086/write
printf "sleeping for a second then inserting more data\n"
sleep 1
curl -d '{"database" : "mydb", "retentionPolicy" : "myrp", "points": [{"name":"cpu","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":61}},{"name":"cpu","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":53}},{"name":"cpu","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":80}},{"name":"cpu","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":86}},{"name":"cpu","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":87}},{"name":"cpu","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":10}},{"name":"cpu","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":97}},{"name":"cpu","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":63}},{"name":"cpu","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":96}},{"name":"cpu","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":92}},{"name":"cpu","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":77}},{"name":"cpu","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":98}},{"name":"cpu","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":29}},{"name":"cpu","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":14}},{"name":"cpu","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":84}},{"name":"key_count","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":3}},{"name":"key_count","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":100}},{"name":"key_count","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":18}},{"name":"key_count","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":80}},{"name":"key_count","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":34}},{"name":"key_count","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":99}},{"name":"key_count","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":4}},{"name":"key_count","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":100}},{"name":"key_count","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":38}},{"name":"key_count","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":2}},{"name":"key_count","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":22}},{"name":"key_count","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":36}},{"name":"key_count","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":74}},{"name":"key_count","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":71}},{"name":"key_count","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":89}},{"name":"memory","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":11}},{"name":"memory","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":76}},{"name":"memory","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":25}},{"name":"memory","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":71}},{"name":"memory","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":20}},{"name":"memory","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":18}},{"name":"memory","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":17}},{"name":"memory","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":14}},{"name":"memory","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":69}},{"name":"memory","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":71}},{"name":"memory","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":71}},{"name":"memory","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":52}},{"name":"memory","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":68}},{"name":"memory","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":94}},{"name":"memory","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":99}},{"name":"network_in","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":27}},{"name":"network_in","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":7}},{"name":"network_in","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":70}},{"name":"network_in","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":79}},{"name":"network_in","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":98}},{"name":"network_in","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":33}},{"name":"network_in","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":31}},{"name":"network_in","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":35}},{"name":"network_in","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":1}},{"name":"network_in","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":57}},{"name":"network_in","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":1}},{"name":"network_in","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":40}},{"name":"network_in","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":81}},{"name":"network_in","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":20}},{"name":"network_in","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":32}},{"name":"network_out","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":22}},{"name":"network_out","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":32}},{"name":"network_out","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":64}},{"name":"network_out","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":49}},{"name":"network_out","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":98}},{"name":"network_out","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":76}},{"name":"network_out","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":33}},{"name":"network_out","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":4}},{"name":"network_out","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":45}},{"name":"network_out","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":94}},{"name":"network_out","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":79}},{"name":"network_out","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":53}},{"name":"network_out","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":34}},{"name":"network_out","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":3}},{"name":"network_out","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":5}},{"name":"hd","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":54}},{"name":"hd","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":50}},{"name":"hd","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":92}},{"name":"hd","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":33}},{"name":"hd","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":55}},{"name":"hd","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":93}},{"name":"hd","tags":{"region":"japan","host":"server_7","service":"mysql"},"fields":{"value":39}},{"name":"hd","tags":{"region":"japan","host":"server_8","service":"apache"},"fields":{"value":45}},{"name":"hd","tags":{"region":"japan","host":"server_9","service":"nginx"},"fields":{"value":32}},{"name":"hd","tags":{"region":"japan","host":"server_10","service":"paulapp"},"fields":{"value":74}},{"name":"hd","tags":{"region":"india","host":"server_11","service":"redis"},"fields":{"value":62}},{"name":"hd","tags":{"region":"india","host":"server_12","service":"mysql"},"fields":{"value":58}},{"name":"hd","tags":{"region":"india","host":"server_13","service":"apache"},"fields":{"value":15}},{"name":"hd","tags":{"region":"india","host":"server_14","service":"nginx"},"fields":{"value":45}},{"name":"hd","tags":{"region":"india","host":"server_15","service":"paulapp"},"fields":{"value":29}}]}' -H "Content-Type: application/json" http://localhost:8086/write
printf "\nSHOW MEASUREMENTS\n"
curl -G http://localhost:8086/query --data-urlencode "db=mydb" --data-urlencode "q=SHOW MEASUREMENTS" --data-urlencode "pretty=true"
printf "\nSHOW SERIES\n"
curl -G http://localhost:8086/query --data-urlencode "db=mydb" --data-urlencode "q=SHOW SERIES" --data-urlencode "pretty=true"
printf "\nSHOW TAG VALUES WITH KEY = service\n"
curl -G http://localhost:8086/query --data-urlencode "db=mydb" --data-urlencode "q=SHOW TAG VALUES WITH KEY = service" --data-urlencode "pretty=true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment