Add Grafana annotations example #127
1 changed files with 22 additions and 1 deletions
|
@ -20,7 +20,7 @@ Scenarios `grpc.js`, `local.js`, `http.js` and `s3.js` support the following opt
|
||||||
* `SELECTION_SIZE` - size of batch to select for deletion (default: 1000).
|
* `SELECTION_SIZE` - size of batch to select for deletion (default: 1000).
|
||||||
* `PAYLOAD_TYPE` - type of an object payload ("random" or "text", default: "random").
|
* `PAYLOAD_TYPE` - type of an object payload ("random" or "text", default: "random").
|
||||||
* `STREAMING` - if set, the payload is generated on the fly and is not read into memory fully.
|
* `STREAMING` - if set, the payload is generated on the fly and is not read into memory fully.
|
||||||
* `METRIC_TAGS` - `instance` tag value.
|
* `METRIC_TAGS` - custom metrics tags (format `tag1:value1;tag2:value2`).
|
||||||
|
|
||||||
Additionally, the profiling extension can be enabled to generate CPU and memory profiles which can be inspected with `go tool pprof file.prof`:
|
Additionally, the profiling extension can be enabled to generate CPU and memory profiles which can be inspected with `go tool pprof file.prof`:
|
||||||
```shell
|
```shell
|
||||||
|
@ -202,6 +202,27 @@ K6_PROMETHEUS_RW_TREND_STATS="p(95),p(99),min,max" \
|
||||||
./k6 run ... -o experimental-prometheus-rw -e METRIC_TAGS="instance:server1;run:run1" scenario.js
|
./k6 run ... -o experimental-prometheus-rw -e METRIC_TAGS="instance:server1;run:run1" scenario.js
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Grafana annotations
|
||||||
|
|
||||||
|
There is no option to export Grafana annotaions, but it can be easily done with `curl` and Grafana's annotations API.
|
||||||
|
Example:
|
||||||
|
```shell
|
||||||
|
curl --request POST \
|
||||||
|
--url https://user:password@grafana.host/api/annotations \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"dashboardUID": "YsVWNpMIk",
|
||||||
|
"time": 1706533045014,
|
||||||
|
"timeEnd": 1706533085100,
|
||||||
|
"tags": [
|
||||||
|
"tag1",
|
||||||
|
"tag2"
|
||||||
|
],
|
||||||
|
"text": "Test annotation"
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
See [Grafana docs](https://grafana.com/docs/grafana/latest/developers/http_api/annotations/) for details.
|
||||||
|
|
||||||
## Verify
|
## Verify
|
||||||
|
|
||||||
This scenario allows to verify that objects created by a previous run are really stored in the system and their data is not corrupted. Running this scenario assumes that you've already run gRPC or HTTP or S3 scenario with option `REGISTRY_FILE`.
|
This scenario allows to verify that objects created by a previous run are really stored in the system and their data is not corrupted. Running this scenario assumes that you've already run gRPC or HTTP or S3 scenario with option `REGISTRY_FILE`.
|
||||||
|
|
Loading…
Add table
Reference in a new issue