TIG Stack is an arconym for the following three open source technologoies that seamless work togther to collect, store, analyze and monitor real time data from almost anything such as servers, APIs, IoT devices or even your smart coffee machine!
- Telegraf to collect system metrics
- InfluxDB 3 Core (alpha release) as database for metrics
- Grafana as data visualization in dashboard
- Docker should be installed on your local machine and make sure it's running.
- Git (optional) to clone this Git Repository
git clone https://github.com/InfluxCommunity/TIG-Stack-using-InfluxDB-3-Core.git
cd TIG-Stack-using-InfluxDB-3-Core
Make sure Docker is up and running by typing docker info
. Once you verify it is then let's build our stack in background which is configured in the docker-compose.yaml
. Feel free to edit it file as per your need.
docker-compose up -d
docker-compose logs telegraf
docker-compose exec influxdb influxdb3 create token
INFLUXDB_TOKEN=your_new_token_here
docker-compose logs influxdb
docker ps
docker exec <container-id> influxdb3 query --database local_system "SHOW TABLES"
- Open localhost:3000 from your browser
- Login with credentials from .env (default: admin/admin)
- Add Data Source : InfluxDB at http://influxdb:8181
- Add Data Visualization : Dashboards > Create Dashboard - Add Visualization > Select Data Source > InfluxDB_3_Core
- In the query 'builder' paste and run the following SQL
SELECT "cpu", "usage_user", "time" FROM "cpu" WHERE "time" >= $__timeFrom AND "time" <= $__timeTo AND "cpu" = 'cpu0'
docker-compose down
docker-compose down -v
- (TIG Stack with InfluxDB Core but without Docker tutorial)(https://www.influxdata.com/blog/tig-stack-guide-influxdb-core/)
- Telegraf
- InfluxDB 3 Core(https://www.influxdata.com/products/influxdb/)
- Grafana