influxdb/tests/tmux
Cory LaNou e972d6c030 generating sample json for metrics 2015-01-26 12:01:50 -07:00
..
3_shards
README.md
sample.json
server01_8086.toml
server02_8087.toml
server03_8088.toml

README.md

Generating Sample JSON

Use http://www.json-generator.com/

[
  '{{repeat(1000,1000)}}',
  {
    "database": "foo", 
    "retentionPolicy": "bar",
    "points": [
      {
        "name": "cpu", 
        "tags": {"host": "server01"},
        "timestamp": "{{date(new Date(2015, 15, 1), new Date(), 'YYYY-MM-ddThh:mm:ss Z')}}",
        "values": {
          "value": '{{integer(1, 1000)}}'
        }
      }
    ]
  }
]

You can curl the data with the following command:

cat sample.json | curl -d @- -H "Content-Type: application/json" http://localhost:8086/write