Skip to content

Instantly share code, notes, and snippets.

View beckettsean's full-sized avatar

Sean Beckett beckettsean

View GitHub Profile
fieldlong value="this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in length this string is exactly a power of two digits in
@beckettsean
beckettsean / InfluxDB JSON write protocol
Created October 28, 2015 00:04
resurfacing old docs made private
## Writing data using the HTTP API
The HTTP API is the primary means of getting data into InfluxDB. To write data simply send a `POST` to the endpoint `/write`. The body of the POST contains the destination database, retention policy, and time-series data you wish to store. An example request sent to InfluxDB running on localhost, which writes a single point, is shown below.
```
# Create your new database, this only needs to be done once.
curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
# Write your data to your new database.
curl -XPOST 'http://localhost:8086/write' -d '
{
sean@catalyst-sean:~/.influxdb/data$ ll -R *
_internal:
total 0
drwx------ 5 sean staff 170 Feb 23 16:00 monitor
_internal/monitor:
total 65664
-rw-r--r-- 1 sean staff 16777216 Feb 23 16:37 1263
-rw-r--r-- 1 sean staff 16777216 Feb 23 16:37 1264
-rw-r--r-- 1 sean staff 65536 Feb 23 16:37 1265