user double quota instead.
parent
bd61c7ee11
commit
5878e822ea
12
README.md
12
README.md
|
@ -29,30 +29,30 @@ We recommend installing InfluxDB using one of the [pre-built packages](https://i
|
||||||
### Create your first database
|
### Create your first database
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -XPOST 'http://localhost:8086/query' --data-urlencode "q=CREATE DATABASE mydb"
|
curl -XPOST "http://localhost:8086/query" --data-urlencode "q=CREATE DATABASE mydb"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Insert some data
|
### Insert some data
|
||||||
```
|
```
|
||||||
curl -XPOST 'http://localhost:8086/write?db=mydb' \
|
curl -XPOST "http://localhost:8086/write?db=mydb" \
|
||||||
-d 'cpu,host=server01,region=uswest load=42 1434055562000000000'
|
-d 'cpu,host=server01,region=uswest load=42 1434055562000000000'
|
||||||
|
|
||||||
curl -XPOST 'http://localhost:8086/write?db=mydb' \
|
curl -XPOST "http://localhost:8086/write?db=mydb" \
|
||||||
-d 'cpu,host=server02,region=uswest load=78 1434055562000000000'
|
-d 'cpu,host=server02,region=uswest load=78 1434055562000000000'
|
||||||
|
|
||||||
curl -XPOST 'http://localhost:8086/write?db=mydb' \
|
curl -XPOST "http://localhost:8086/write?db=mydb" \
|
||||||
-d 'cpu,host=server03,region=useast load=15.4 1434055562000000000'
|
-d 'cpu,host=server03,region=useast load=15.4 1434055562000000000'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Query for the data
|
### Query for the data
|
||||||
```JSON
|
```JSON
|
||||||
curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=mydb" \
|
curl -G "http://localhost:8086/query?pretty=true" --data-urlencode "db=mydb" \
|
||||||
--data-urlencode "q=SELECT * FROM cpu WHERE host='server01' AND time < now() - 1d"
|
--data-urlencode "q=SELECT * FROM cpu WHERE host='server01' AND time < now() - 1d"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Analyze the data
|
### Analyze the data
|
||||||
```JSON
|
```JSON
|
||||||
curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=mydb" \
|
curl -G "http://localhost:8086/query?pretty=true" --data-urlencode "db=mydb" \
|
||||||
--data-urlencode "q=SELECT mean(load) FROM cpu WHERE region='uswest'"
|
--data-urlencode "q=SELECT mean(load) FROM cpu WHERE region='uswest'"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue