MCPcopy Index your code
hub / github.com/chengshiwen/influxdb-cluster

github.com/chengshiwen/influxdb-cluster @v1.8.11-c1.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.8.11-c1.2.0 ↗ · + Follow
15,119 symbols 60,180 edges 740 files 6,111 documented · 40% updated 21mo agov1.8.11-c1.2.0 · 2024-09-08★ 8286 open issues

Browse by type

Functions 12,982 Types & classes 2,137
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

InfluxDB Cluster

CN doc EN doc LICENSE Releases GitHub stars Docker pulls

InfluxDB Cluster - An Open-Source Distributed Time Series Database, Open Source Alternative to InfluxDB Enterprise

An Open-Source, Distributed, Time Series Database

InfluxDB Cluster is an open source time series database with no external dependencies. It's useful for recording metrics, events, and performing analytics.

InfluxDB Cluster is inspired by InfluxDB Enterprise, InfluxDB v1.8.10 and InfluxDB v0.11.1, aiming to replace InfluxDB Enterprise.

InfluxDB Cluster is easy to maintain, and can be updated in real time with upstream InfluxDB 1.x.

Features

  • Built-in HTTP API so you don't have to write any server side code to get up and running.
  • Data can be tagged, allowing very flexible querying.
  • SQL-like query language.
  • Clustering is supported out of the box, so that you can scale horizontally to handle your data. Clustering is currently in production state.
  • Simple to install and manage, and fast to get data in and out.
  • It aims to answer queries in real-time. That means every data point is indexed as it comes in and is immediately available in queries that should return in < 100ms.

Clustering

Note: The clustering of InfluxDB Cluster is exactly the same as that of InfluxDB Enterprise.

Please see: Clustering in InfluxDB Enterprise

Architectural overview:

architecture.png

Network overview:

network-architecture

Installation

We recommend installing InfluxDB Cluster using one of the pre-built releases.

Complete the following steps to install an InfluxDB Cluster in your own environment:

  1. Install InfluxDB Cluster meta nodes
  2. Install InfluxDB Cluster data nodes

Note: The installation of InfluxDB Cluster is exactly the same as that of InfluxDB Enterprise.

Docker Quickstart

Download docker-compose.yml, then start 3 meta nodes and 2 data nodes by docker compose:

docker compose up -d
docker exec -it influxdb-meta-01 bash
influxd-ctl add-meta influxdb-meta-01:8091
influxd-ctl add-meta influxdb-meta-02:8091
influxd-ctl add-meta influxdb-meta-03:8091
influxd-ctl add-data influxdb-data-01:8088
influxd-ctl add-data influxdb-data-02:8088
influxd-ctl show

Stop and remove them when they are no longer in use:

docker compose down -v

Getting Started

Create your first database

curl -XPOST "http://influxdb-data-01:8086/query" --data-urlencode "q=CREATE DATABASE mydb WITH REPLICATION 2"

Insert some data

curl -XPOST "http://influxdb-data-01:8086/write?db=mydb" \
-d 'cpu,host=server01,region=uswest load=42 1434055562000000000'

curl -XPOST "http://influxdb-data-02:8086/write?db=mydb&consistency=all" \
-d 'cpu,host=server02,region=uswest load=78 1434055562000000000'

curl -XPOST "http://influxdb-data-02:8086/write?db=mydb&consistency=quorum" \
-d 'cpu,host=server03,region=useast load=15.4 1434055562000000000'

Note: consistency=[any,one,quorum,all] sets the write consistency for the point. consistency is one if you do not specify consistency. See the Insert some data / Write consistency for detailed descriptions of each consistency option.

Query for the data

curl -G "http://influxdb-data-02:8086/query?pretty=true" --data-urlencode "db=mydb" \
--data-urlencode "q=SELECT * FROM cpu WHERE host='server01' AND time < now() - 1d"

Analyze the data

curl -G "http://influxdb-data-02:8086/query?pretty=true" --data-urlencode "db=mydb" \
--data-urlencode "q=SELECT mean(load) FROM cpu WHERE region='uswest'"

Documentation

Contributing

If you're feeling adventurous and want to contribute to InfluxDB Cluster, see our CONTRIBUTING.md for info on how to make feature requests, build from source, and run tests.

Licensing

See LICENSE and DEPENDENCIES.md.

Looking for Support?

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 9,062
Function 3,920
Struct 1,623
Interface 216
TypeAlias 214
FuncType 82
Class 2

Languages

Go100%
Python1%
Ruby1%

Modules by API surface

query/iterator.gen.go845 symbols
services/meta/internal/meta.pb.go605 symbols
coordinator/internal/data.pb.go548 symbols
storage/reads/datatypes/storage_common.pb.go401 symbols
query/functions.gen.go370 symbols
tsdb/index.go225 symbols
tsdb/engine/tsm1/iterator.gen.go212 symbols
query/functions.go186 symbols
query/point.gen.go185 symbols
services/meta/data.go164 symbols
cmd/influx_tools/internal/format/binary/binary.pb.go161 symbols
prometheus/remote/remote.pb.go159 symbols

Datastores touched

asdfDatabase · 1 repos
barDatabase · 1 repos
dbDatabase · 1 repos
db0Database · 1 repos
fooDatabase · 1 repos

For agents

$ claude mcp add influxdb-cluster \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page