Install InfluxDB and Grafana on Debian

Install InfluxDB

Go to the following link and check the latest version:

https://portal.influxdata.com/downloads

Download InfluxDB:

# wget https://dl.influxdata.com/influxdb/releases/influxdb_1.2.4_amd64.deb

Install the package:

# dpkg -i influxdb_1.2.4_amd64.deb

Start InfluxDB:

# service influxdb start

Create a database

# curl -i -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE grafana"

Install Grafana

Download the latest Grafana version:

https://grafana.com/grafana/download

# wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.4.1_amd64.deb

# dpkg -i grafana_4.4.1_amd64.deb

# /bin/systemctl daemon-reload

# /bin/systemctl enable grafana-server

# sudo service grafana-server start

Configure Grafana

Go to the Grafana web portal and login as admin (with default password admin):

http://yourserver:3000

Change your password!

Add the InfluxDB as datasource to Grafana:

Click on safe and test.

Now you are ready to insert some data into the database and create the most awesome graphs ever! 😉

Insert data into database and create a graph

example:

# curl -i -XPOST 'http://localhost:8086/write?db=grafana' --data-binary 'blocks,host=server01,region=us-west value=19620732 1499355222'

Create graph in Grafana:

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *