Merge pull request #2797 from influxdb/otoolep-rp-non-default

Retention policy not created by default
pull/2803/head
Philip O'Toole 2015-06-05 22:24:54 -07:00
commit bf219cad35
1 changed files with 5 additions and 2 deletions

View File

@ -32,10 +32,13 @@ For those adventurous enough, you can
* `service influxdb start` if you have installed InfluxDB using an official Debian or RPM package.
* `$GOPATH/bin/influxd` if you have built InfluxDB from source.
### Creating your first database
### Creating your first database and retention policy
```JSON
curl -G 'http://localhost:8086/query' --data-urlencode "q=CREATE DATABASE mydb"
curl -G 'http://localhost:8086/query' --data-urlencode "q=CREATE RETENTION POLICY mypolicy \
ON mydb DURATION 7d REPLICATION 1 DEFAULT"
```
### Insert some data
@ -43,7 +46,7 @@ curl -G 'http://localhost:8086/query' --data-urlencode "q=CREATE DATABASE mydb"
curl -H "Content-Type: application/json" http://localhost:8086/write -d '
{
"database": "mydb",
"retentionPolicy": "default",
"retentionPolicy": "mypolicy",
"points": [
{
"time": "2014-11-10T23:00:00Z",