InfluxDB Installation
From r00tedvw.com wiki
Contents |
Ubuntu 14.04 Installation
Add Repo
~$ curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - ~$ source /etc/lsb-release ~$ echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
Install InfluxDB
~$ sudo apt-get update && sudo apt-get install influxdb -y ~$ sudo service influxdb start
Database config
Login and create a DB
~$ influx Connected to http://localhost:8086 version 0.13.0 InfluxDB shell version: 0.13.0 > CREATE DATABASE influxdb > SHOW DATABASES name: databases --------------- name _internal influxdb
Testing DB
~$ influxdb > USE influxdb > INSERT cpu,host=serverA value=0.64 > SELECT * from cpu name: cpu --------- time host value 1467318896821675352 serverA 0.64
Setting up an external write into the database. Open a new shell on the same host.
~$ curl -i -XPOST 'http://localhost:8086/write?db=statsdemo' --data-binary 'cpu,host=serverA value=`cat /proc/loadavg | cut -f1 -d" "`'