Skip to content

Example InfluxDB & Grafana Server Setup

Jacob Duffy edited this page May 26, 2017 · 4 revisions

Fresh Ubuntu 16.04 Server w/ SSH only

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install linux-virtual-lts-xenial apt-transport-https bash-completion nano

INFLUX DB

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
sudo apt-get update && sudo apt-get install influxdb
sudo systemctl start influxdb

Grafana

curl https://packagecloud.io/gpg.key | sudo apt-key add -
echo "deb https://packagecloud.io/grafana/stable/debian/ jessie main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update && sudo apt-get install grafana
sudo systemctl daemon-reload && sudo systemctl start grafana-server
sudo systemctl enable grafana-server.service

Reboot & Access Grafana on http port 3000

Default: admin / admin

Add Datasource:

Field Value
Name: InfluxDB
Type: InfluxDB
Url: http://localhost:8086
Access: proxy
Database: rb2db

CLIENTS

Install: Non-RVM

sudo apt-get install ruby2.3
sudo gem install rb2db

Install: RVM

gem install rb2db

Run

Note: Daemon verifies it's not already running, safe to add to cron if desired.

INFLUX_HOST='hostname_or_ip' rb2db