Convert Figma logo to code with AI

influxdata logoinfluxdb

Scalable datastore for metrics, events, and real-time analytics

29,355
3,576
29,355
2,063

Top Related Projects

67,141

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

The Prometheus monitoring system and time series database.

A time-series database for high-performance real-time analytics packaged as a Postgres extension

VictoriaMetrics: fast, cost-effective monitoring solution and time series database

13,592

Apache Druid: a high performance real-time analytics database.

A scalable, distributed Time Series Database.

Quick Overview

InfluxDB is an open-source time series database designed to handle high write and query loads. It is optimized for storing and analyzing large volumes of timestamped data, making it ideal for monitoring, metrics, and real-time analytics applications.

Pros

  • High performance and scalability for time series data
  • Flexible data model with tags for efficient querying
  • Built-in HTTP API and support for various client libraries
  • Continuous queries and retention policies for automated data management

Cons

  • Steep learning curve for beginners
  • Limited support for complex joins and transactions
  • Resource-intensive for large datasets, requiring careful hardware planning
  • Community edition lacks some enterprise features like clustering

Code Examples

  1. Writing data to InfluxDB:
from influxdb_client import InfluxDBClient, Point
from influxdb_client.client.write_api import SYNCHRONOUS

client = InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org")
write_api = client.write_api(write_options=SYNCHRONOUS)

point = Point("measurement").tag("location", "Prague").field("temperature", 25.3)
write_api.write(bucket="my-bucket", record=point)
  1. Querying data from InfluxDB:
from influxdb_client import InfluxDBClient

client = InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org")
query_api = client.query_api()

query = '''from(bucket:"my-bucket")
    |> range(start: -1h)
    |> filter(fn: (r) => r._measurement == "measurement")
    |> mean()'''
result = query_api.query(query=query)

for table in result:
    for record in table.records:
        print(f"{record.get_value()}")
  1. Creating a retention policy:
CREATE RETENTION POLICY "one_week" ON "my_database" DURATION 1w REPLICATION 1 DEFAULT

Getting Started

  1. Install InfluxDB:

    brew update
    brew install influxdb
    
  2. Start InfluxDB:

    influxd
    
  3. Create a bucket:

    influx bucket create -n my-bucket -o my-org -r 7d
    
  4. Write data using the InfluxDB CLI:

    influx write -b my-bucket -o my-org -p s 'measurement,tag=value field=1.0'
    
  5. Query data:

    influx query 'from(bucket:"my-bucket") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "measurement")'
    

Competitor Comparisons

67,141

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

Pros of Grafana

  • More versatile visualization options and dashboard customization
  • Supports multiple data sources, not limited to time-series databases
  • Larger community and ecosystem with extensive plugin support

Cons of Grafana

  • Steeper learning curve for advanced features and customizations
  • Requires separate data storage solution, adding complexity to setup

Code Comparison

InfluxDB query example:

SELECT mean("value") FROM "measurement" WHERE time >= now() - 1h GROUP BY time(5m)

Grafana query example (using InfluxDB data source):

SELECT mean("value") FROM "measurement" WHERE $timeFilter GROUP BY time($__interval)

Both InfluxDB and Grafana are powerful tools in the data visualization and monitoring space. InfluxDB is primarily a time-series database with built-in visualization capabilities, while Grafana is a dedicated visualization and monitoring platform that can work with various data sources.

InfluxDB excels in time-series data storage and querying, offering a simpler setup for projects focused on time-series data. Grafana, on the other hand, provides more flexibility in data visualization and supports a wider range of data sources, making it suitable for diverse monitoring needs.

The choice between the two depends on specific project requirements, with InfluxDB being ideal for time-series-centric applications and Grafana offering more versatility for complex monitoring scenarios.

The Prometheus monitoring system and time series database.

Pros of Prometheus

  • Built-in alerting system with Alertmanager
  • Powerful query language (PromQL) for data analysis
  • Native support for multi-dimensional data and labels

Cons of Prometheus

  • Limited long-term storage options
  • Pull-based model may not suit all use cases
  • Steeper learning curve for complex setups

Code Comparison

Prometheus query example:

rate(http_requests_total{job="api-server"}[5m])

InfluxDB query example:

SELECT mean("value") FROM "http_requests" WHERE ("job" = 'api-server') AND time >= now() - 5m GROUP BY time(1m)

Key Differences

  • Data Model: Prometheus uses a multi-dimensional data model with labels, while InfluxDB uses a time-series data model with tags and fields.
  • Query Language: Prometheus uses PromQL, InfluxDB uses InfluxQL (SQL-like) or Flux.
  • Data Collection: Prometheus primarily uses a pull model, InfluxDB supports both push and pull.
  • Scalability: InfluxDB offers better horizontal scalability for large deployments.
  • Use Cases: Prometheus is often preferred for monitoring and alerting, while InfluxDB is more versatile for various time-series data applications.

Both Prometheus and InfluxDB are powerful time-series databases with their own strengths. The choice between them depends on specific project requirements, existing infrastructure, and team expertise.

A time-series database for high-performance real-time analytics packaged as a Postgres extension

Pros of TimescaleDB

  • Built on PostgreSQL, offering full SQL support and compatibility with existing tools
  • Optimized for time-series data with automatic partitioning and indexing
  • Supports both relational and time-series data in a single database

Cons of TimescaleDB

  • Steeper learning curve for users not familiar with PostgreSQL
  • May require more manual configuration for optimal performance
  • Limited built-in visualization tools compared to InfluxDB

Code Comparison

TimescaleDB (SQL):

CREATE TABLE sensors (
  time        TIMESTAMPTZ NOT NULL,
  sensor_id   INTEGER,
  temperature DOUBLE PRECISION,
  humidity    DOUBLE PRECISION
);

SELECT time_bucket('1 hour', time) AS hour,
       AVG(temperature) AS avg_temp
FROM sensors
WHERE time > NOW() - INTERVAL '24 hours'
GROUP BY hour
ORDER BY hour;

InfluxDB (InfluxQL):

CREATE DATABASE sensors

INSERT temperature,sensor_id=1 value=25.5
INSERT humidity,sensor_id=1 value=60.0

SELECT MEAN(temperature) AS avg_temp
FROM sensors
WHERE time > NOW() - 24h
GROUP BY time(1h)

Both databases offer powerful time-series data management capabilities, but TimescaleDB provides stronger SQL support and relational data handling, while InfluxDB offers a more streamlined experience for pure time-series workloads.

VictoriaMetrics: fast, cost-effective monitoring solution and time series database

Pros of VictoriaMetrics

  • Higher performance and better resource efficiency
  • Simpler architecture and easier maintenance
  • Native support for multi-tenancy and high cardinality data

Cons of VictoriaMetrics

  • Less mature ecosystem and community support
  • Fewer built-in data visualization tools
  • Limited support for complex queries and analytics

Code Comparison

InfluxDB query example:

SELECT mean("value") FROM "cpu" WHERE "host" = 'server01' AND time >= now() - 1h GROUP BY time(5m)

VictoriaMetrics query example:

SELECT avg(value) FROM cpu WHERE host='server01' AND timestamp >= now() - 1h GROUP BY time(5m)

Both databases use SQL-like query languages, but VictoriaMetrics supports PromQL-style queries as well:

avg_over_time(cpu{host="server01"}[1h])

VictoriaMetrics generally offers simpler syntax for complex queries and better performance for high-cardinality data. However, InfluxDB provides a more comprehensive set of built-in functions and a more mature ecosystem of tools and integrations.

While InfluxDB is often considered the industry standard for time-series databases, VictoriaMetrics is gaining popularity due to its performance advantages and simpler architecture, especially for large-scale deployments and high-cardinality use cases.

13,592

Apache Druid: a high performance real-time analytics database.

Pros of Druid

  • Better suited for high-concurrency, low-latency analytics queries on large datasets
  • Supports real-time ingestion and querying of data simultaneously
  • More flexible data model, allowing for nested data structures

Cons of Druid

  • More complex setup and configuration compared to InfluxDB
  • Higher resource requirements, especially for smaller datasets
  • Steeper learning curve for new users

Code Comparison

InfluxDB query example:

SELECT mean("value") FROM "measurement"
WHERE "tag" = 'example'
AND time >= now() - 1h
GROUP BY time(5m)

Druid query example:

{
  "queryType": "timeseries",
  "dataSource": "measurement",
  "intervals": ["2023-01-01/2023-01-02"],
  "granularity": "five_minute",
  "aggregations": [{"type": "doubleSum", "name": "value", "fieldName": "value"}],
  "filter": {"type": "selector", "dimension": "tag", "value": "example"}
}

Both InfluxDB and Druid are powerful time-series databases, but they have different strengths. InfluxDB is generally easier to set up and use, making it a good choice for simpler time-series data storage and querying. Druid excels in scenarios requiring real-time analytics on large datasets with high concurrency. The choice between the two depends on specific use cases and requirements.

A scalable, distributed Time Series Database.

Pros of OpenTSDB

  • Built on top of HBase, providing excellent scalability for large-scale time series data
  • Supports high cardinality data with efficient storage and retrieval
  • Offers flexible querying capabilities with powerful aggregation functions

Cons of OpenTSDB

  • Steeper learning curve and more complex setup compared to InfluxDB
  • Less active development and community support
  • Limited built-in visualization and dashboarding options

Code Comparison

OpenTSDB query example:

http://example.com/api/query?start=1h-ago&m=sum:cpu.load{host=*}

InfluxDB query example:

SELECT mean("value") FROM "cpu_load" WHERE time >= now() - 1h GROUP BY "host"

OpenTSDB uses a URL-based query format, while InfluxDB employs a SQL-like query language. InfluxDB's syntax is generally more intuitive for users familiar with SQL.

Both databases offer powerful time series data management capabilities, but InfluxDB provides a more user-friendly experience with its built-in tools and active community. OpenTSDB excels in scenarios requiring extreme scalability and high cardinality data handling, leveraging HBase's distributed architecture. The choice between the two depends on specific use cases, existing infrastructure, and team expertise.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

InfluxDB Logo

InfluxDB Core is a database built to collect, process, transform, and store event and time series data. It is ideal for use cases that require real-time ingest and fast query response times to build user interfaces, monitoring, and automation solutions.

Common use cases include:

  • Monitoring sensor data
  • Server monitoring
  • Application performance monitoring
  • Network monitoring
  • Financial market and trading analytics
  • Behavioral analytics

InfluxDB is optimized for scenarios where near real-time data monitoring is essential and queries need to return quickly to support user experiences such as dashboards and interactive user interfaces.

InfluxDB 3 Core’s feature highlights include:

  • Diskless architecture with object storage support (or local disk with no dependencies)
  • Fast query response times (under 10ms for last-value queries, or 30ms for distinct metadata)
  • Embedded Python VM for plugins and triggers
  • Parquet file persistence
  • Compatibility with InfluxDB 1.x and 2.x write APIs
  • Compatability with InfluxDB 1.x query API (InfluxQL)
  • SQL query engine with support for FlightSQL and HTTP query API

Project Status

InfluxDB 3 Core is in public beta and available for testing and feedback, but is not meant for production use. During the beta period we will be adding a couple of security and operational features to Enterprise. Otherwise, we will be focused on testing, robustness, performance, and operational tooling. Both the product and this documentation are works in progress. New builds get created on every merge into main, however we will have weekly beta builds along with a changelog for uses that want to move at a slower pace.

All of the APIs outside of the processing engine can be considered stable. They are what we will GA the 3.0 version with. We will also not be making any changes to file formats that don't also come with an in-place upgrade path. This means that you will be able to keep the data in the database when upgrading beta versions and into the GA. We anticpate the general availability of InfluxDB 3 Core in April 2025.

We welcome and encourage your input about your experience with the beta. Join the InfluxDB3 Discord or the public channels below.

See the InfluxDB 3 beta release announcement here or dig into the InfluxDB 3 getting started guide here.

Learn InfluxDB

Documentation | Community Forum | Community Slack | Blog | InfluxDB University | YouTube

Try InfluxDB Cloud for free and get started fast with no local setup required. Click here to start building your application on InfluxDB Cloud.

Installation

We have nightly and versioned Docker images, Debian packages, RPM packages, and tarballs of InfluxDB available on the InfluxData downloads page. We also provide the InfluxDB command line interface (CLI) client as a separate binary available at the same location.

If you are interested in building from source, see the building from source guide for contributors.

To begin using InfluxDB, visit our Getting Started with InfluxDB documentation.

License

The open source software we build is licensed under the permissive MIT or Apache 2 licenses at the user's choosing. We’ve long held the view that our open source code should be truly open and our commercial code should be separate and closed.

Interested in joining the team building InfluxDB?

Check out current job openings at www.influxdata.com/careers today!