-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[query] Native PromQL integration into m3coordinator (#2343)
- Loading branch information
1 parent
bdcbc0d
commit 8363830
Showing
22 changed files
with
1,333 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# 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 (or PromQL) 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](annotated_config.md)) | ||
- Passing HTTP header `M3-Engine` when calling http url | ||
|
||
```curl -H "M3-Engine: m3query" "http://localhost:7201/api/v1/query?query=count(http_requests)&time=1590147165"``` | ||
|
||
or | ||
|
||
```curl -H "M3-Engine: prometheus" "http://localhost:7201/api/v1/query?query=count(http_requests)&time=1590147165"``` | ||
|
||
- Passing url parameter `engine` when calling http url | ||
|
||
```curl "http://localhost:7201/api/v1/query?engine=m3query&query=count(http_requests)&time=1590147165"``` | ||
|
||
or | ||
|
||
```curl "http://localhost:7201/api/v1/query?engine=prometheus&query=count(http_requests)&time=1590147165"``` | ||
|
||
- Using different URLs: | ||
- /prometheus/api/v1/* - to call PromQL | ||
- /m3query/api/v1/* - to call M3 Query | ||
|
||
```curl "http://localhost:7201/m3query/api/v1/query?query=count(http_requests)&time=1590147165"``` | ||
|
||
or | ||
|
||
```curl "http://localhost:7201/prometheus/api/v1/query?query=count(http_requests)&time=1590147165"``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.