-
-
Save rasata/0df3c35b59bb419799f0933b2d46fc51 to your computer and use it in GitHub Desktop.
Instantiate TIG stack on Ubuntu 20.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt update ; sudo apt install -y build-essential net-tools curl git software-properties-common | |
| wget https://dl.influxdata.com/telegraf/releases/telegraf_1.19.1-1_amd64.deb | |
| sudo dpkg -i telegraf_1.19.1-1_amd64.deb | |
| sudo systemctl enable --now telegraf | |
| wget https://dl.influxdata.com/influxdb/releases/influxdb_1.8.6_amd64.deb | |
| sudo dpkg -i influxdb_1.8.6_amd64.deb | |
| sudo systemctl enable --now influxdb | |
| influx -execute 'create database telegraf' | |
| influx -execute "create user telegraf with password 'ExAmPl3PA55W0rD'" | |
| influx -execute 'grant all on telegraf to telegraf' | |
| sudo apt install -y adduser libfontconfig1 | |
| wget https://dl.grafana.com/oss/release/grafana_8.0.5_amd64.deb | |
| sudo dpkg -i grafana_8.0.5_amd64.deb | |
| sudo systemctl daemon-reload ; sudo systemctl enable --now grafana-server | |
| sudo mv /etc/telegraf/telegraf.conf{,.old} | |
| sudo -i | |
| telegraf config -input-filter cpu:mem:swap:system:processes:disk -output-filter influxdb > /etc/telegraf/telegraf.conf | |
| sudo cat << EOF >> /etc/telegraf/telegraf.conf | |
| # Configuration for sending metrics to InfluxDB | |
| [[outputs.influxdb]] | |
| urls = ["http://127.0.0.1:8086"] | |
| database = "telegraf" | |
| username = "telegraf" | |
| password = "ExAmPl3PA55W0rD" | |
| EOF | |
| sudo systemctl restart telegraf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment