Skip to content

Instantly share code, notes, and snippets.

@sko00o
Last active November 18, 2019 09:57
Show Gist options
  • Save sko00o/c68de1441a988dcac474003bcb062e9b to your computer and use it in GitHub Desktop.
Save sko00o/c68de1441a988dcac474003bcb062e9b to your computer and use it in GitHub Desktop.
[Try InfluxDB] Try InfluxDB on Debian10 #Debian #InfluxDB #Docker

Add repository

curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/os-release
echo "deb https://repos.influxdata.com/debian ${VERSION_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

Install and start

sudo apt update && sudo apt install -y influxdb
sudo systemctl unmask influxdb.service
sudo systemctl start influxdb && sudo systemctl status influxdb

Try to use

# connect, set timestamp format in rfc3339
influx -precision=rfc3339

# create a new db
> show databases
name: databases 
name
----
_internal
mytest
> create database mydb
> show databases
name: databases 
name
----
_internal
mytest
mydb

# write & query
> use mydb
Using database mydb 
> insert cpu,host=s1,region=asia_east value=0.35
> select host,region,value from cpu
name: cpu 
time                           host region    value
----                           ---- ------    -----
2019-11-18T07:40:45.353059592Z s1   asia_east 0.35

Ref

Download and check SHA256

wget https://dl.influxdata.com/telegraf/releases/telegraf_1.12.5-1_amd64.deb
sha256sum telegraf_1.12.5-1_amd64.deb
# bfe2b88ecd0680484abbc684d25d1c654aeda2201140908b9470145a19c19175  telegraf_1.12.5-1_amd64.deb

Install and status check

sudo dpkg -i telegraf_1.12.5-1_amd64.deb
systemctl status telegraf

Check by query

Run following command. You will see JSON output if it works fine.

curl http://localhost:8086/query?q=select+*+from+telegraf..cpu

Influxdb default run on 8086 port.

Ref

Download and check SHA256

wget https://dl.influxdata.com/chronograf/releases/chronograf_1.7.14_amd64.deb
sha256sum chronograf_1.7.14_amd64.deb
# f85206bde467efb242ccaf795bdfbf210343926c65ac0c275ad7bca75030eaf5  chronograf_1.7.14_amd64.deb

Install and status check

sudo dpkg -i chronograf_1.7.14_amd64.deb
systemctl status chronograf

Setup

Browser open http://localhost:8888 for next installation setup.

Ref

Download and check SHA256

wget https://dl.grafana.com/oss/release/grafana_6.4.4_amd64.deb
sha256sum grafana_6.4.4_amd64.deb
# 3a5d1a76dd0b07de506a880e241cfd49cfd58b5c2e24e66d828ad59bd85ed200  grafana_6.4.4_amd64.deb

Install and start

sudo dpkg -i grafana_6.4.4_amd64.deb
sudo systemctl daemon-reload
sudo systemctl enable grafana-server
sudo systemctl start grafana-server
systemctl status grafana-server

Setup

Browser open http://localhost:3000 for next installation setup.

Enter default username and password both are admin.

Ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment