parent
b555ab7e22
commit
ab189d5429
17
README.md
17
README.md
|
@ -41,14 +41,27 @@ curl -G 'http://localhost:8086/query' --data-urlencode "q=CREATE DATABASE mydb"
|
|||
### Insert some data
|
||||
```
|
||||
curl -XPOST 'http://localhost:8086/write?db=mydb' \
|
||||
-d 'cpu,host=server01,region=uswest value=1.0 1434055562000000000'
|
||||
-d 'cpu,host=server01,region=uswest load=42 1434055562000000000'
|
||||
|
||||
curl -XPOST 'http://localhost:8086/write?db=mydb' \
|
||||
-d 'cpu,host=server02,region=uswest load=78 1434055562000000000'
|
||||
|
||||
curl -XPOST 'http://localhost:8086/write?db=mydb' \
|
||||
-d 'cpu,host=server03,region=useast load=15.4 1434055562000000000'
|
||||
```
|
||||
|
||||
### Query for the data
|
||||
```JSON
|
||||
curl -G http://localhost:8086/query?pretty=true --data-urlencode "db=mydb" \
|
||||
--data-urlencode "q=SELECT * FROM cpu WHERE host='server01'"
|
||||
--data-urlencode "q=SELECT * FROM cpu WHERE host='server01' AND time < now - 1d"
|
||||
```
|
||||
|
||||
### Analyze the data
|
||||
```JSON
|
||||
curl -G http://localhost:8086/query?pretty=true --data-urlencode "db=mydb" \
|
||||
--data-urlencode "q=SELECT mean(load) FROM cpu WHERE region='uswest'"
|
||||
```
|
||||
|
||||
## Helpful Links
|
||||
|
||||
* Understand the [design goals and motivations of the project](http://influxdb.com/docs/v0.9/introduction/overview.html).
|
||||
|
|
Loading…
Reference in New Issue