How To Guides
Query Data with M3 Query
M3 Query is a distributed query engine for querying realtime and historical data stored in M3DB nodes, supporting several query languages. It is designed to support both low latency realtime queries and queries that can take longer to execute, aggregating over larger datasets for analytical use cases.
For example, if you are using the Prometheus remote write endpoint with M3 Coordinator, you can use M3 Query instead of the Prometheus remote read endpoint.
Read more
Aggregate Metrics with M3 Aggregator
M3 Aggregator is a dedicated metrics aggregator that provides stateful stream-based downsampling before storing metrics in M3DB nodes. It uses dynamic rules stored in etcd .
It uses leader election and aggregation window tracking, leveraging etcd to manage this state, to reliably emit at-least-once aggregations for downsampled metrics to long term storage. This provides cost effective and reliable downsampling & roll up of metrics.
M3 Coordinator can also perform this role, but M3 Aggregator shards and replicates metrics, whereas M3 Coordinator is not and requires care to deploy and run in a highly available way.
Read more
Using M3DB as a general purpose time series database
Overview M3 has native integrations that make it particularly easy to use it as a metrics storage for Prometheus and Graphite. M3DB can also be used as a general purpose distributed time series database by itself.
Data Model IDs and Tags M3DB’s data model allows multiple namespaces, each of which can be configured and tuned independently.
Each namespace can also be configured with its own schema (see “Schema Modeling” section below).
Read more
M3 Aggregation for any Prometheus remote write storage
Prometheus Remote Write As mentioned in our integrations guide, M3 Coordinator and M3 Aggregator can be configured to write to any Prometheus Remote Write receiver.
Sidecar M3 Coordinator setup In this setup we show how to run M3 Coordinator with in process M3 Aggregator as a sidecar to receive and send metrics to a Prometheus instance via remote write protocol.
It is just a matter of endpoint configuration to use any other backend in place of Prometheus such as Thanos or Cortex.
Read more
Running M3 Coordinator in Admin mode
Sometimes it is useful to run M3 Coordinator in “admin mode”. Usually it is enough o have a single dedicated instance that is used to perform various administration tasks:
M3DB placement management M3 Aggregator placement management Namespace operations To run M3 Coordinator in admin mode simply start it with noop-etcd backend:
backend: noop-etcd Usually for production clusters we run external Etcd. Set it up under clusterManagement configuration key.
Read more