Join our community of software engineering leaders and aspirational developers. Always
stay in-the-know by getting the most important news and exclusive content delivered
fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter
in the past. Click the button below to open the re-subscribe form
in a new tab. When you're done, simply close that tab and continue
with this form to complete your subscription.
The New Stack does not sell your information or share it with
unaffiliated third parties. By continuing, you agree to our
Terms of Use and
Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!
We’re so glad you’re here. You can expect all the best TNS content to arrive
Monday through Friday to keep you on top of the news and at the top of your game.
What’s next?
Check your inbox for a confirmation email where you can adjust your preferences
and even join additional groups.
Follow TNS on your favorite social media networks.
In today’s data-driven world, time series information flows constantly from countless sources: Internet of Things (IoT) devices, system metrics, financial data streams and user interactions. To harness this temporal data effectively, you need specialized tools designed for the job. Enter the TIG stack: a powerful trio of open source tools – Telegraf, InfluxDB and Grafana – that transforms the way we collect, store, analyze and visualize time-based data.
Why Time Series Matters
Time series data has unique characteristics that traditional databases struggle to handle efficiently. Its sequential nature, high write volumes and need for time-based querying demand purpose-built solutions. That’s what the TIG stack delivers.
Getting Started: Your TIG Stack Setup Guide
This tutorial will walk you through establishing your own time series data pipeline using:
InfluxDB 3 Core or 3 Enterprise for optimized storage and retrieval
Grafana for intuitive visualization and dashboarding
The TIG stack centers on InfluxDB, a purpose-built time series database management system optimized for high-frequency temporal data ingestion, storage and retrieval. The system architecture supports high-cardinality time series ingestion with configurable downsampling and retention mechanisms.
This tutorial will use InfluxDB 3 Core, the newest version that has a redesigned storage layer using Apache Arrow and DataFusion for columnar data processing. The implementation achieves improved write performance through batched write-ahead log (WAL) operations, enhanced query execution via vectorized processing and reduced memory overhead through optimized schema encoding and compression techniques.
Telegraf functions as the primary data collection agent, implementing a plugin-based architecture for metric acquisition from diverse sources, including system resources, network devices, APIs and message queues.
Grafana provides the visualization and alerting layer, connecting to InfluxDB through native data source plugins that support both SQL and InfluxQL query languages. The dashboard framework renders time series data through configurable panels while the alerting engine evaluates query results against defined thresholds.
Prerequisites
Before diving in, make sure you have the following components installed:
Telegraf: The versatile data collection agent
InfluxDB 3 Core: The time series database foundation
Grafana: The visualization platform (For MacOS users: `brew install grafana` followed by `brew services start grafana` will make Grafana available at http://localhost:3000.)
Alternatively, you can use Grafana Cloud for a hosted solution.
Launching InfluxDB 3 Core
After installing InfluxDB 3 Core, initialize your server with:
influxdb3serve--host-id=local01--object-storefile--data-dir~/.influxdb3
Next, create an authentication token:
influxdb3createtoken
You’ll see output similar to:
Token: apiv3_xxx
Hashed Token: zzz
Start the server with `influxdb3 serve --bearer-token zzz`
HTTP requests require the following header: "Authorization: Bearer apiv3_xxx"
The plain token (apiv3_xxx) will be used with Telegraf, while the hashed version provides security when configuring the server. This security model prevents direct exposure of authentication tokens in your configuration files or command history.
Configuring Telegraf for Data Collection
Telegraf serves as your data collection agent, gathering metrics from various sources and forwarding them to InfluxDB. Its plugin-based architecture makes it incredibly versatile.
For this demonstration, we’ll capture system CPU metrics. Create a configuration file (`telegraf.conf`) with the following settings:
# Global configuration
[agent]
interval = "10s" # Collection interval
flush_interval = "10s" # Data flush interval
# Input Plugin: CPU Metrics
[[inputs.cpu]]
percpu = true # Collect per-CPU metrics
totalcpu = true # Collect total CPU metrics
collect_cpu_time = false # Do not collect CPU time metrics
report_active = true # Report active CPU percentage
# Output Plugin: InfluxDB v2
[[outputs.influxdb_v2]]
urls = ["http://127.0.0.1:8181"]
token = "your plain Token apiv3_xxx"
organization = ""
bucket = "cpu"
Important note: With InfluxDB 3 Core, you don’t need to specify an Organization ID.
Launch Telegraf with:
telegraf--configpwd/telegraf.conf--debug
Successful execution will produce log entries showing data collection and transmission:
Now you’re ready to create visualizations! Navigate to Dashboards > Create Dashboard > Add Visualization, select your InfluxDB data source and use the visual query builder or write SQL directly.
Example query:
SELECT "cpu", "usage_user", "time" FROM "cpu"
WHERE "time" >= $__timeFrom AND "time" <= $__timeTo AND "cpu" = 'cpu0'
Next Steps
With your TIG Stack operational, you now have a powerful platform for time series data collection, storage and visualization. Some potential applications include:
Infrastructure or product monitoring
IoT sensor data analysis
Application performance tracking
Predictive analytics
The flexibility of Telegraf’s input plugins, the performance of InfluxDB 3 Core and the visualization capabilities of Grafana provide endless possibilities for time series data applications.
Start exploring your data today!
InfluxData is the creator of InfluxDB, the leading time series platform. More than 1,900 customers use InfluxDB to collect, store, and analyze all time series data at any scale. Developers can query and analyze their time-stamped data to predict, respond, and adapt in real-time.