Overview
This template provides a production‑ready TIG (Telegraf, InfluxDB, Grafana) monitoring stack as Monk runnables. You can:- Run it directly to get a complete time-series monitoring solution
- Inherit it in your own infrastructure to collect, store, and visualize metrics
What this template manages
- Telegraf agents for metrics collection
- InfluxDB for time-series data storage
- Grafana for visualization and dashboards
- Pre-configured data sources and inputs
- Persistent storage for time-series data
Quick start (run directly)
- Load templates
- Run the TIG stack
- Customize credentials (recommended via inheritance)
variables. Secrets added with monk secrets add will not affect this runnable unless you inherit it and reference those secrets.
- Preferred: inherit and replace variables with
secret("...")as shown below. - Alternative: fork/clone and edit the
variablesin the manifest, thenmonk load MANIFESTand run.
- InfluxDB UI:
http://localhost:8086 - Grafana UI:
http://localhost:3000(default: admin/admin)
Configuration
Key variables you can customize in this template:${monk-volume-path}/influxdb, ${monk-volume-path}/grafana, and ${monk-volume-path}/telegraf on the host.
Use by inheritance (recommended for monitoring)
Inherit the TIG stack to monitor your infrastructure and declare connections. Example:Ports and connectivity
- Service:
influxdbon TCP port8086(HTTP API) - Service:
grafanaon TCP port3000 - Telegraf communicates with InfluxDB internally
- From other runnables in the same process group, use
connection-hostname("\<connection-name>")to resolve service hosts.
Persistence and configuration
- InfluxDB data path:
${monk-volume-path}/influxdb:/var/lib/influxdb2 - Grafana data path:
${monk-volume-path}/grafana:/var/lib/grafana - Telegraf config path:
${monk-volume-path}/telegraf:/etc/telegraf - You can customize Telegraf inputs and outputs by modifying the configuration files in the Telegraf config path.
Features
Telegraf
- 200+ input plugins (system, Docker, databases, APIs)
- Multiple output plugins
- Data transformation and aggregation
- Lightweight and efficient
InfluxDB
- Purpose-built time-series database
- High write and query performance
- Flux query language
- Automatic data downsampling
- Retention policies
- Clustering and HA support
Grafana
- Beautiful dashboards
- InfluxDB native integration
- Alerting and notifications
- Templating and variables
Telegraf Configuration
Example Telegraf inputs:InfluxDB Query Example
Using Flux:Use cases
The TIG stack excels at:- Infrastructure monitoring (CPU, memory, disk, network)
- Container and Kubernetes monitoring
- IoT sensor data collection
- Application performance monitoring
- Custom metrics collection
- Real-time dashboards
Related templates
- Use
prometheus/for alternative metrics collection and storage - Combine with
loki/for log aggregation alongside metrics - Integrate with
alertmanager/for advanced alerting capabilities
Troubleshooting
- If you changed
influxdb-admin-tokenorgrafana-admin-passwordbut the containers have existing data, authentication may fail. Either reset the data volumes or update the credentials inside the respective services to match. - Ensure the host volumes are writable by the container users.
- Access InfluxDB UI at
http://localhost:8086 - Check Telegraf is collecting:
- Query InfluxDB:
- Check logs:
- For missing metrics:
- Verify Telegraf configuration
- Check InfluxDB token permissions
- Ensure network connectivity between components
- For Grafana issues, verify InfluxDB data source configuration with correct org, bucket, and token