m3db /m3
M3 monorepo - Distributed TSDB, Aggregator and Query Engine, Prometheus Sidecar, Graphite Compatible, Metrics Platform
★ 4,909⑂ 463👁 105⑃ 3,794● 651▤ 88
+1
日增长
4,909
stars
463
forks
105
watchers
3,794
prs
651
issues
88
releases
README
M3
[![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![FOSSA Status][fossa-img]][fossa]
Distributed TSDB and Query Engine, Prometheus Sidecar, Metrics Aggregator, and more such as Graphite storage and query engine.
Table of Contents
- More Information
- Install
- Dependencies
- Usage
- Contributing
More Information
- Documentation
- Contributing
- Slack
- Forum (Google Group)
Community Meetings
You can find recordings of past meetups here: .
Install
Dependencies
The simplest and quickest way to try M3 is to use Docker, read the M3 quickstart section for other options.
This example uses jq to format the output of API calls. It is not essential for using M3DB.
Usage
The below is a simplified version of the M3 quickstart guide, and we suggest you read that for more details.
1. Start a Container
shell
docker run -p 7201:7201 -p 7203:7203 --name m3db -v $(pwd)/m3db_data:/var/lib/m3db quay.io/m3db/m3dbnode:v1.0.0
2. Create a Placement and Namespace
shell
!/bin/bash
curl -X POST http://localhost:7201/api/v1/database/create -d '{
"type": "local",
"namespaceName": "default",
"retentionTime": "12h"
}' | jq .
3. Ready a Namespace
shell
curl -X POST http://localhost:7201/api/v1/services/m3db/namespace/ready -d '{
"name": "default"
}' | jq .
4. Write Metrics
shell
!/bin/bash
curl -X POST http://localhost:7201/api/v1/json/write -d '{
"tags":
{
"__name__": "third_avenue",
"city": "new_york",
"checkout": "1"
},
"timestamp": '\"$(date "+%s")\"',
"value": 3347.26
}'
5. Query Results
Linux
shell
curl -X "POST" -G "http://localhost:7201/api/v1/query_range" \
-d "query=third_avenue" \
-d "start=$(date "+%s" -d "45 seconds ago")" \
-d "end=$( date +%s )" \
-d "step=5s" | jq .
macOS/BSD
shell
curl -X "POST" -G "http://localhost:7201/api/v1/query_range" \
-d "query=third_avenue 6000" \
-d "start=$(date -v -45S "+%s")" \
-d "end=$( date +%s )" \
-d "step=5s" | jq .
Contributing
You can ask questions and give feedback in the following ways:
- Create a GitHub issue
- In the public M3 Slack
- In the M3 forum (Google Group)
M3 welcomes pull requests, read contributing guide to help you get setup for building and contributing to M3.
This project is released under the Apache License, Version 2.0.
[doc-img]: https://godoc.org/github.com/m3db/m3?status.svg
[doc]: https://godoc.org/github.com/m3db/m3
[ci-img]: https://badge.buildkite.com/8e65c098f9619dd46b99813c7cca0d1f0de591d943c3bf7ef2.svg?branch=master
[ci]: https://buildkite.com/uberopensource/m3-monorepo-ci-uber-oss
[cov-img]: https://codecov.io/gh/m3db/m3/branch/master/graph/badge.svg
[cov]: https://codecov.io/gh/m3db/m3
[fossa-img]: https://app.fossa.io/api/projects/custom%2B4529%2Fgithub.com%2Fm3db%2Fm3.svg?type=shield
[fossa]: https://app.fossa.io/projects/custom%2B4529%2Fgithub.com%2Fm3db%2Fm3?ref=badge_shieldTop issues
#949m3coordinator network usage disparity22 comments · 2018-09-26#1789Failed to scale m3aggregator14 comments · 2019-07-03#3650write metrics using http json API only once,But m3coordinator/m3query can look up five minutes of metrics。9 comments · 2021-08-06#4260Cluster Unavailability During Node Removal8 comments · 2023-11-17#2445m3aggregator placement shards stuck in INITIALIZING8 comments · 2020-07-06#2057Using m3query to query data that is not currently written to disk, the results are randomly missing some series8 comments · 2019-12-04#3894[BUG]Wrong result(Sudden peak ) when use irate/rate/increase to smooth original points7 comments · 2021-11-02#3690Unable to connect to M3DB with M3Query7 comments · 2021-08-25
Discussions
#4369Ya1 comments · 2025-07-16#4215Prometheus counter metric aggregation in rollup rules0 comments · 2023-03-30#4164Can we expect M3 Collector to be rolled out in the near future?1 comments · 2022-11-03#4159OTEL Prometheus Remote Write Exporter Metrics with Empty Labels1 comments · 2022-10-10#4152EKS Version Support0 comments · 2022-09-08
Latest release
v1.6.0 v1.6.0 2026-09-25Backwards Incompatible Changes These affect users who import M3 as a Go library. Deployed binaries, on-disk formats and wire formats are unchanged. - All: Metrics scopes now use github.com/uber-go/tally/v4; the github.com/m3db/prometheus_ forks are no longer used and the instrument package exposes a single upstream prometheus/client_golang registry type ([4423]) - All: github.com/m3db/stackmurmur3 is replaced by github.com/twmb/murmur3 (bit-identical output, verified by a parity test) ([4420], [4422]) - All: Minimum Go version is now 1.26 ([4410], [4416], [4425]) - All: etcd dependency moved