M3 Query, a stateless query server for M3DB and Prometheus

API

Please note: This documentation is a work in progress and more detail is required. Query using PromQL Query using PromQL and returns JSON datapoints compatible with the Prometheus Grafana plugin. URL /api/v1/query_range Method GET URL Params Required start=[time in RFC3339Nano] end=[time in RFC3339Nano] step=[time duration] target=[string] Optional debug=[bool] lookback=[string|time duration]: This sets the per request lookback duration to something other than the default set in config, can either be a time duration or the string “step” which sets the lookback to the same as the step request parameter.

Read more arrow-right-circle

Architecture

Please note: This documentation is a work in progress and more detail is required. Overview M3 Query and M3 Coordinator are written entirely in Go, M3 Query is as a query engine for M3DB and M3 Coordinator is a remote read/write endpoint for Prometheus and M3DB. To learn more about Prometheus’s remote endpoints and storage, see here.

Read more arrow-right-circle

Configuration

Default query engine By default M3 runs two query engines: Prometheus (default) - robust and de-facto query language for metrics M3 Query Engine - high-performance query engine but doesn’t support all the functions yet Prometheus Query Engine is the default one when calling query endpoint: http://localhost:7201/api/v1/query?query=count(http\_requests)&time=1590147165 But you can switch between the two in the following ways: Changing default query engine in config file (see defaultEngine parameter in Configuration)

Read more arrow-right-circle