Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yosukehara/8bbc1d2b43c8564a5e71 to your computer and use it in GitHub Desktop.
Save yosukehara/8bbc1d2b43c8564a5e71 to your computer and use it in GitHub Desktop.

Set up InfluxDB, Grafana and Telegraf for LeoFS's Storage (Ubuntu)

Install influxdb

$ wget https://s3.amazonaws.com/influxdb/influxdb_nightly_amd64.deb
$ sudo dpkg -i influxdb_nightly_amd64.deb
$ sudo service influxdb start

Install Grafana

$ wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.1.3_amd64.deb
$ sudo dpkg -i ./grafana_2.1.3_amd64.deb
$ sudo service grafana-server start

Set environment variables

# influxdb
export INFLUXDB_HOME=/opt/influxdb
# influxdb/telegraf
export TELEGRAF_HOME=/opt/telegraf
export PATH=$PATH:$TELEGRAF_HOME:$INFLUXDB_HOME

Create a database for LeoFS monitor w/the influx command

Create leofs database

$ influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 0.9.5-nightly-2fe5e6b
InfluxDB shell 0.9.5-nightly-2fe5e6b
> CREATE DATABASE leofs

Confirm databases into your influxdb

$ influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 0.9.5-nightly-2fe5e6b
InfluxDB shell 0.9.5-nightly-2fe5e6b
>  SHOW DATABASES
name: databases
---------------
name
_internal
leofs

Install Telegraf

$ wget http://get.influxdb.org/telegraf/telegraf_0.1.9_amd64.deb
$ sudo dpkg -i telegraf_0.1.9_amd64.deb

Setup data-source on Grafana

General

  • Name: {leo-storage-node}
  • Type: InfluxDB 0.9.x

Http settings

  • URL: http://{influxdb’s IP}:8086/
  • Access: proxy
  • Basic Auth: false

InfluxDB Details:

  • Database: leofs
  • user: {user} - default:root
  • password: {password} - default:root

Run telegraf-agent for monitoring Leo’s Storage after a monitoring target was started

TEST

$ telegraf -config leofs-storage.telegraf -test

Run

$ telegraf -config leofs-storage.telegraf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment