Cassandra-backed, metrics2.0 based, multi-tenant timeseries database for Graphite and friends
Go Shell Other
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci update to go 1.10.3 Aug 13, 2018
api Merge pull request #987 from bloomberg/fixHttp4608 Aug 15, 2018
batch dual-license batch and consolidation package as apache2 Mar 22, 2018
cassandra rebrand: raintank -> GrafanaLabs Sep 29, 2017
clock copy clock code so we don't have to pull in carbon-relay-ng Dec 1, 2017
cluster slightly better error message. Aug 15, 2018
cmd fix logger again Aug 13, 2018
conf support adding arbitrary extra tags in jaeger traces May 3, 2018
consolidation changed comments Aug 13, 2018
devdocs add devdocs about how we handle render requests May 8, 2018
docker Merge pull request #956 from bloomberg/speculativeQueries Jul 25, 2018
docs Merge pull request #995 from bloomberg/keepLastValue1 Aug 15, 2018
errors cleaner way to work with errors in non-http related code Jan 22, 2018
expr Merge pull request #995 from bloomberg/keepLastValue1 Aug 15, 2018
idx fix memory-idx log prefixes Aug 13, 2018
input endpoint for analyzing priority calculation Jun 6, 2018
kafka typo's Mar 6, 2017
mdata update tests Aug 14, 2018
scripts fix invocations Aug 15, 2018
stacktest Remove broken test line (ala #949) Jul 20, 2018
stats Merge pull request #918 from grafana/stats_conn_timeout May 28, 2018
store optimize allocations and loop in SearchTable Jun 14, 2018
test fix bogus panic and make test work May 18, 2018
tracing better way to report errors Aug 24, 2017
util simpler May 2, 2018
vendor update schema.v1 Aug 1, 2018
.gitignore move metrictank.go to cmd directory Jun 7, 2018
Gopkg.lock set jaeger-client-go source path and updates vendor Jun 7, 2018
Gopkg.toml set jaeger-client-go source path and updates vendor Jun 7, 2018
LICENSE switch to a license that may make more sense Aug 8, 2016
Makefile properly exclude stacktests in make test Jun 18, 2018
NOTICE update copyright years Jan 2, 2018
README.md update wording in readme, conveying no longer an alpha project May 30, 2018
dashboard.json remove pressure metrics. May 15, 2018
metrictank-sample.ini Merge pull request #956 from bloomberg/speculativeQueries Jul 25, 2018

README.md

Metrictank

Circle CI Go Report Card GoDoc

Introduction

Metrictank is a multi-tenant timeseries engine for Graphite and friends. It provides long term storage, high availability, efficient storage, retrieval and processing for large scale environments.

GrafanaLabs has been running metrictank in production since December 2015. It currently requires an external datastore like Cassandra, and we highly recommend using Kafka to support clustering, as well as a clustering manager like Kubernetes. This makes it non-trivial to operate, though GrafanaLabs has an on-premise product that makes this process much easier.

Features

  • 100% open source
  • Inspired by the Facebook gorilla paper. Most notably, the heavily compressed chunks dramatically lower cpu, memory and storage requirements.
  • Writeback RAM cache, serving most data out of memory.
  • Graphite is a first class citizen. As of graphite-1.0.1, metrictank can be used as a graphite CLUSTER_SERVER.
  • Can also act as a Graphite server itself, though the functions processing library is only partially implemented, metrictank proxies requests to Graphite if it can't handle the required processing (for those requests it will degrade to just being the backend storage)
  • Can also be used with Prometheus (but the experience won't be as good as something built just for prometheus, which we're also working on)
  • Accurate, flexible rollups by storing min/max/sum/count (which also gives us average). So we can do consolidation (combined runtime+archived) accurately and correctly, unlike most other graphite backends like whisper
  • Flexible tenancy: can be used as single tenant or multi tenant. Selected data can be shared across all tenants.
  • Input options: carbon, metrics2.0, kafka, Prometheus (soon: json or msgpack over http)
  • Guards against excessive data requests

Limitations

  • No performance/availability isolation between tenants per instance. (only data isolation)
  • Minimum computation locality: we move the data from storage to processing code, which is both metrictank and graphite.
  • Backlog replaying and queries can be made faster. A Go GC issue may occasionally inflate response times.
  • We use metrics2.0 in native input protocol and indexes, but barely do anything with it yet.
  • can't overwrite old data. We support reordering the most recent time window but that's it. (unless you restart MT)

Interesting design characteristics (feature or limitation... up to you)

  • Upgrades / process restarts requires running multiple instances (potentially only for the duration of the maintenance) and possibly re-assigning the primary role. Otherwise data loss of current chunks will be incurred. See operations guide
  • clustering works best with an orchestrator like kubernetes. MT itself does not automate master promotions. See clustering for more.
  • Only float64 values. Ints and bools currently stored as floats (works quite well due to the gorilla compression), No text support.
  • Only uint32 unix timestamps in second resolution. For higher resolution, consider streaming directly to grafana
  • No data locality: doesn't seem needed yet to put related series together.

Docs

installation, configuration and operation.

features in-depth

Other

Releases and versioning

  • releases and changelog

  • we aim to keep master stable and vet code before merging to master

  • We're pre-1.0 but adopt semver for our 0.MAJOR.MINOR format. The rules are simple:

    • MAJOR version for incompatible API or functionality changes
    • MINOR version when you add functionality in a backwards-compatible manner, and

    We don't do patch level releases since minor releases are frequent enough.

License

Copyright 2016-2018 Dieter Plaetinck, Anthony Woods, Jeremy Bingham, Damian Gryski, raintank inc

This software is distributed under the terms of the GNU Affero General Public License.