-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into linasn/bootstrap-profiler
* master: [dbnode] Add aggregate term limit regression test (#3135) [DOCS] Adding Prometheus steps to quickstart (#3043) [dbnode] Revert AggregateQuery changes (#3133) Fix TestSessionFetchIDs flaky test (#3132) [dbnode] Alter multi-segments builder to order by size before processing (#3128) [dbnode] Emit aggregate usage metrics (#3123) [dbnode] Add Shard.OpenStreamingReader method (#3119) [dtests] Docker tests integration with docker-compose (#3031) [dbnode] Comments / remove unused var (#3124) [query] Handle context.Canceled and map to 499 http status (#3069) [dbnode] Use StreamingReadMetadata for bootstrapping (#2938) [dbnode] Use DefaultTestOptions in test code (#3113) # Conflicts: # src/dbnode/storage/bootstrap/bootstrapper/fs/source.go
- Loading branch information
Showing
60 changed files
with
2,125 additions
and
776 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
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,32 @@ | ||
global: | ||
scrape_interval: 15s | ||
evaluation_interval: 15s | ||
external_labels: | ||
monitor: 'codelab-monitor' | ||
|
||
remote_read: | ||
- url: "http://localhost:7201/api/v1/prom/remote/read" | ||
# To test reading even when local Prometheus has the data | ||
read_recent: true | ||
remote_write: | ||
- url: "http://localhost:7201/api/v1/prom/remote/write" | ||
|
||
scrape_configs: | ||
- job_name: 'prometheus' | ||
scrape_interval: 5s | ||
static_configs: | ||
- targets: ['localhost:9090'] | ||
|
||
- job_name: 'node' | ||
scrape_interval: 5s | ||
static_configs: | ||
- targets: ['localhost:8080', 'localhost:8081'] | ||
labels: | ||
group: 'production' | ||
- targets: ['localhost:8082'] | ||
labels: | ||
group: 'canary' | ||
|
||
- job_name: 'm3' | ||
static_configs: | ||
- targets: ['localhost:7203'] |
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,128 @@ | ||
To query metrics, use the _{{% apiendpoint %}}query_range_ endpoint with the following data in the request body, all fields are required: | ||
|
||
- `query`: A PromQL query | ||
- `start`: Timestamp in `RFC3339Nano` of start range for results | ||
- `end`: Timestamp in `RFC3339Nano` of end range for results | ||
- `step`: A duration or float of the query resolution, the interval between results in the timespan between `start` and `end`. | ||
|
||
Below are some examples using the metrics written above. | ||
|
||
#### Return results in past 45 seconds | ||
|
||
{{< tabs name="example_promql_regex" >}} | ||
{{% tab name="Linux" %}} | ||
|
||
<!-- TODO: Check this on Linux --> | ||
|
||
```shell | ||
curl -X "POST" -G "{{% apiendpoint %}}query_range" \ | ||
-d "query=third_avenue" \ | ||
-d "start=$(date "+%s" -d "45 seconds ago")" \ | ||
-d "end=$( date +%s )" \ | ||
-d "step=5s" | jq . | ||
``` | ||
|
||
{{% /tab %}} | ||
{{% tab name="macOS/BSD" %}} | ||
|
||
```shell | ||
curl -X "POST" -G "{{% apiendpoint %}}query_range" \ | ||
-d "query=third_avenue" \ | ||
-d "start=$( date -v -45S +%s )" \ | ||
-d "end=$( date +%s )" \ | ||
-d "step=5s" | jq . | ||
``` | ||
|
||
{{% /tab %}} | ||
{{% tab name="Output" %}} | ||
|
||
```json | ||
{ | ||
"status": "success", | ||
"data": { | ||
"resultType": "matrix", | ||
"result": [ | ||
{ | ||
"metric": { | ||
"__name__": "third_avenue", | ||
"checkout": "1", | ||
"city": "new_york" | ||
}, | ||
"values": [ | ||
[ | ||
{{% now %}}, | ||
"3347.26" | ||
], | ||
[ | ||
{{% now %}}, | ||
"5347.26" | ||
], | ||
[ | ||
{{% now %}}, | ||
"7347.26" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
{{% /tab %}} | ||
{{< /tabs >}} | ||
|
||
#### Values above a certain number | ||
|
||
{{< tabs name="example_promql_range" >}} | ||
{{% tab name="Linux" %}} | ||
|
||
<!-- TODO: Check Linux command --> | ||
|
||
```shell | ||
curl -X "POST" -G "{{% apiendpoint %}}query_range" \ | ||
-d "query=third_avenue > 6000" \ | ||
-d "start=$(date "+%s" -d "45 seconds ago")" \ | ||
-d "end=$( date +%s )" \ | ||
-d "step=5s" | jq . | ||
``` | ||
|
||
{{% /tab %}} | ||
{{% tab name="macOS/BSD" %}} | ||
|
||
```shell | ||
curl -X "POST" -G "{{% apiendpoint %}}query_range" \ | ||
-d "query=third_avenue > 6000" \ | ||
-d "start=$(date -v -45S "+%s")" \ | ||
-d "end=$( date +%s )" \ | ||
-d "step=5s" | jq . | ||
``` | ||
|
||
{{% /tab %}} | ||
{{% tab name="Output" %}} | ||
|
||
```json | ||
{ | ||
"status": "success", | ||
"data": { | ||
"resultType": "matrix", | ||
"result": [ | ||
{ | ||
"metric": { | ||
"__name__": "third_avenue", | ||
"checkout": "1", | ||
"city": "new_york" | ||
}, | ||
"values": [ | ||
[ | ||
{{% now %}}, | ||
"7347.26" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
{{% /tab %}} | ||
{{< /tabs >}} |
Oops, something went wrong.