InfluxDB — Scalable Time Series Datastore for Metrics & Events
InfluxDB is a scalable time series database for metrics, events, and real-time analytics. InfluxDB 3.0 is a complete rewrite in Rust with columnar Apache Arrow storage, SQL and InfluxQL queries, and unlimited cardinality.
Staging seguro para este activo
Este activo primero queda en staging. El prompt copiado pide inspeccionar los archivos staged antes de activar scripts, config MCP o config global.
npx -y tokrepo@latest install 90136b66-35f6-11f1-9bc6-00163e2b0d79 --target codexPrimero deja archivos en staging; la activación requiere revisar el README y el plan staged.
What it is
InfluxDB is a scalable time series database optimized for metrics, events, and real-time analytics. Version 3.0 is a complete rewrite in Rust built on Apache Arrow columnar storage (via DataFusion), providing SQL query support, unlimited cardinality, and significantly improved analytics performance compared to earlier versions.
InfluxDB targets DevOps teams, IoT developers, and anyone who needs to store, query, and visualize time-stamped data at high volume.
How it saves time or tokens
InfluxDB eliminates the need to adapt a general-purpose database for time-series workloads. Its line protocol allows ingesting millions of data points per second with a single HTTP POST. Built-in retention policies automatically delete old data, and continuous queries downsample high-resolution metrics into aggregated summaries. The SQL support in v3 means existing SQL knowledge transfers directly, removing the learning curve of custom query languages.
How to use
- Run InfluxDB with Docker:
docker run -d --name influxdb -p 8086:8086 influxdb:3
- Create a database and token:
influxdb3 create token --permission '*'
influxdb3 create database metrics
- Write data using the line protocol:
curl -XPOST 'http://localhost:8086/write?db=metrics' \
-H 'Authorization: Token $INFLUXDB_TOKEN' \
--data-raw 'cpu,host=server01,region=us-west usage_user=23.5 1609459200000000000'
- Query with SQL (v3):
SELECT host, mean(usage_user) as avg_cpu
FROM cpu
WHERE time >= now() - INTERVAL '1 hour'
GROUP BY host
ORDER BY avg_cpu DESC;
Example
A monitoring setup writing CPU and memory metrics:
# Write multiple metrics in one request
curl -XPOST 'http://localhost:8086/write?db=metrics' \
--data-raw '
cpu,host=web01 usage_user=45.2,usage_system=12.1
cpu,host=web02 usage_user=38.7,usage_system=9.3
mem,host=web01 used_percent=72.5
mem,host=web02 used_percent=61.3
'
-- Find hosts with high CPU in the last hour
SELECT host, max(usage_user) as peak_cpu
FROM cpu
WHERE time >= now() - INTERVAL '1 hour'
GROUP BY host
HAVING max(usage_user) > 80
ORDER BY peak_cpu DESC;
Related on TokRepo
- Database tools — database management and query tools
- Monitoring tools — infrastructure monitoring solutions
Common pitfalls
- InfluxDB v1, v2, and v3 have different APIs and query languages; ensure your client library matches your server version
- High-cardinality tag values (like user IDs) can degrade query performance; use fields for high-cardinality data, tags for low-cardinality dimensions
- The line protocol timestamp precision defaults to nanoseconds; sending millisecond timestamps without specifying precision causes incorrect time values
Preguntas frecuentes
InfluxDB v3 is a complete rewrite in Rust using Apache Arrow columnar storage. It adds SQL query support, removes the cardinality limit that constrained v2, and provides much better analytics query performance. v2 uses its own storage engine and the Flux query language.
InfluxDB and Prometheus serve overlapping but different use cases. Prometheus uses a pull-based model and is tightly integrated with Kubernetes. InfluxDB uses a push-based model and supports broader use cases beyond infrastructure monitoring, including IoT and business analytics.
Retention policies define how long data is kept before automatic deletion. You create policies with a specific duration (e.g., 30 days) and assign them to databases. Data older than the retention period is automatically removed by a background process.
InfluxDB provides official client libraries for Python, Go, Java, JavaScript/Node.js, C#, PHP, and Ruby. The v3 API is also compatible with standard PostgreSQL wire protocol clients, so tools like psql and database BI platforms can connect directly.
InfluxDB OSS is free and open source under the Apache 2.0 license. InfluxData also offers InfluxDB Cloud, a managed service with a free tier for low-volume usage and paid tiers for production workloads with higher write and query limits.
Referencias (3)
- InfluxDB GitHub— InfluxDB is a scalable time series database rewritten in Rust
- InfluxData Blog— InfluxDB 3.0 uses Apache Arrow columnar storage
- InfluxDB Docs— Line protocol for high-throughput data ingestion
Relacionados en TokRepo
Discusión
Activos relacionados
GreptimeDB — Unified Time-Series Database in Rust
GreptimeDB is an open-source, cloud-native time-series database built in Rust that handles metrics, logs, and events in a single platform. It uses a distributed architecture with SQL and PromQL support for querying time-series data at scale.
Graphite — Scalable Real-Time Graphing and Metrics Platform
Graphite is a time-series monitoring platform that stores numeric data and renders graphs on demand, providing a flexible API for querying, transforming, and visualizing operational metrics.
QuestDB — High-Performance Time-Series Database with SQL
QuestDB is a fast open-source time-series database built in Java/C++. It ingests millions of rows per second via InfluxDB line protocol and lets you query with standard SQL plus powerful time-series extensions.
TimescaleDB — Time-Series Database Built on PostgreSQL
TimescaleDB is a PostgreSQL extension that turns Postgres into a purpose-built time-series database. You get hyper-fast ingestion, automatic partitioning via hypertables, continuous aggregates, and full SQL — without leaving the Postgres ecosystem.