A distributed time series database using M3TSZ float64 compression
Go Makefile Shell HTML Thrift CSS
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
.ci @ c718f97 Make cmd `metalint-` and `test-ci-integration-`-able (#750) Jun 6, 2018
docker Add m3coordinator Dockerfile and update Prometheus test to use standa… Jul 12, 2018
docs Fix documentation for single node walkthrough (#795) Jul 16, 2018
kube [k8s] Initial Kube manifests + docs (#733) May 30, 2018
m3metrics.io Add logo assets (#780) Jul 3, 2018
scripts Add m3coordinator Dockerfile and update Prometheus test to use standa… Jul 12, 2018
src Fix documentation for single node walkthrough (#795) Jul 16, 2018
.codecov.yml Fix m3ninx merge issues Jun 21, 2018
.excludecoverage Update m3x and use code generated maps instead of ident.Hash based ma… Apr 17, 2018
.excludefmt Update m3x and use code generated maps instead of ident.Hash based ma… Apr 17, 2018
.excludelint Update m3x and use code generated maps instead of ident.Hash based ma… Apr 17, 2018
.gitattributes [k8s] Initial Kube manifests + docs (#733) May 30, 2018
.gitignore Use retool & docker for codegen (#760) Jun 18, 2018
.gitmodules Start using the ci-scripts submodule (#232) Jan 25, 2017
.goreleaser.yml Build m3coordinator with goreleaser (#722) May 26, 2018
CHANGELOG.md Clean up files after monorepo merge (#734) May 30, 2018
CONTRIBUTING.md Clean up files after monorepo merge (#734) May 30, 2018
DEVELOPER.md Dev notes on website (#753) Jun 11, 2018
LICENSE Update license to Apache 2 (#664) May 18, 2018
Makefile Fix m3ninx merge issues Jun 21, 2018
README.md [readme] Add Gitter badge (#739) May 31, 2018
TESTING.md Clean up files after monorepo merge (#734) May 30, 2018
docker-compose.yml Add m3coordinator Dockerfile and update Prometheus test to use standa… Jul 12, 2018
glide.lock Add rudimentary multi-cluster support for m3coordinator (#785) Jul 11, 2018
glide.yaml Add rudimentary multi-cluster support for m3coordinator (#785) Jul 11, 2018
mkdocs.yml Update docs (#747) Jun 5, 2018
tools.json Use non-nodejs license tool (#765) Jun 18, 2018

README.md

WARNING: This is pre-release software, and is not intended for use until a stable release.

M3DB GoDoc Build Status FOSSA Status Coverage Status Gitter chat

A time series database.

Documentation: https://m3db.github.io/m3db/

Notes for developers

Test it out

(For a fully comprehsensive getting started guide, see our single node how-to).

Starting a node

# to build a local m3dbnode process
make m3dbnode

# run it with the sample configuration
./bin/m3dbnode -f ./src/dbnode/config/m3dbnode-local.yml

To cross-compile and build for Linux AMD64 build with make m3dbnode-linux-amd64.

Test RPC

To test out some of the functionality of M3DB there are some user friendly HTTP JSON APIs that you can use. These use the DB node cluster service endpoints.

Note: performance sensitive users are expected to use the more performant endpoints via either the Go src/dbnode/client/Session API, or the GRPC endpoints exposed via src/coordinator.

Write a datapoint

curl http://localhost:9003/writetagged -s -X POST -d '{
  "namespace": "default",
  "id": "foo",
  "tags": [
    {
      "name": "city",
      "value": "new_york"
    },
    {
      "name": "endpoint",
      "value": "/request"
    }
  ],
  "datapoint": {
    "timestamp":'"$(date +"%s")"',
    "value": 42.123456789
  }
}'

Query for reverse indexed time series data

curl http://localhost:9003/query -s -X POST -d '{
  "namespace": "default",
  "query": {
    "regexp": {
      "field": "city",
      "regexp": ".*"
    }
  },
  "rangeStart": 0,
  "rangeEnd":'"$(date +"%s")"'
}' | jq .

Building with Docker

A Dockerfile is included for both development and production deployment purposes. It uses a multi-stage build in order to produce a lightweight production image from a single Dockerfile. Accordingly, it requires Docker 17.05 or later to build.

docker build -t m3dbnode:$(git rev-parse head) .
docker run --name m3dbnode m3dbnode:$(git rev-parse head)

If you wish to build an image with the source code included you can stop the build after the builder stage:

docker build -t m3dbnode:$(git rev-parse head) --target builder .

Configuration

The default Docker image will start a single m3dbnode process with an embedded etcd instance to mimic a production environment. If you would like to further customize the configuration, you must provide your own and mount it into the container:

docker run --name m3dbnode -v /host/config.yml:/etc/m3dbnode/myconfig.yml m3dbnode:tag -f /etc/m3dbnode/myconfig.yml

Building the Docs

The docs folder contains our documentation in Markdown files. These Markdown files are built into a static site using mkdocs with the mkdocs-material theme. Building the docs using our predefined make targets requires a working Docker installation:

# generate the docs in the `site/` directory
make docs-build

# build docs and serve on localhost:8000 (with live reload)
make docs-serve

# build the docs and auto-push to the `gh-pages` branch
make docs-deploy

This project is released under the Apache License, Version 2.0.