-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds a metrics API implementation. The API supports get and set the metric relabel config. Seastar supports metrics relabeling in runtime, following Prometheus relabel_config. Based on metrics and label name, a user can add or remove labels, disable a metric and set the skip_when_empty flag. The metrics-config API support such configuration to be done using the RestFull API. As it's a new API it is placed under the V2 path. After this patch the following API will be available 'http://localhost:10000/v2/metrics-config/' GET/POST. For example: To get the current config: ``` curl -X GET --header 'Accept: application/json' 'http://localhost:10000/v2/metrics-config/' ``` To set a config: ``` curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '[ \ { \ "source_labels": [ \ "__name__" \ ], \ "action": "replace", \ "target_label": "level", \ "replacement": "1", \ "regex": "io_que.*" \ } \ ]' 'http://localhost:10000/v2/metrics-config/' ```
- Loading branch information
Showing
2 changed files
with
80 additions
and
1 deletion.
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