[
https://issues.apache.org/jira/browse/KUDU-3690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18080314#comment-18080314
]
ASF subversion and git services commented on KUDU-3690:
-------------------------------------------------------
Commit 3e42c0e7dc2199f80eabd0413e53de79e3940f1b in kudu's branch
refs/heads/master from Marton Greber
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=3e42c0e7d ]
KUDU-3690: Add filtering to /metrics_prometheus
The /metrics_prometheus endpoint now accepts the same query
parameters as the /metrics JSON endpoint for filtering:
?level= severity threshold (debug/info/warn)
?types= entity type (server/tablet/table)
?ids= entity ID substring
?metrics= metric name substring
?attributes= key/value pairs for entity attribute matching
Malformed ?attributes= (odd number of values) returns HTTP 400,
mirroring the existing JSON endpoint behaviour.
Change-Id: I5c0b23ae5c184bf9e33e453736cef5e7ce8ee2e1
Reviewed-on: http://gerrit.cloudera.org:8080/24269
Reviewed-by: Zoltan Chovan <[email protected]>
Reviewed-by: Ashwani Raina <[email protected]>
Tested-by: Marton Greber <[email protected]>
> Implement query parameter-based filtering for the /metrics_prometheus
> webserver end-point
> -----------------------------------------------------------------------------------------
>
> Key: KUDU-3690
> URL: https://issues.apache.org/jira/browse/KUDU-3690
> Project: Kudu
> Issue Type: Sub-task
> Components: master, metrics, tserver
> Reporter: Alexey Serbin
> Assignee: Marton Greber
> Priority: Major
>
> [Prometheus|https://prometheus.io/] supports optional HTTP query parameters
> for its scrape URLs, as per the [scrape_config section
> docs|https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config].
> With that, it's possible to implement filtering of Kudu metrics while
> scraping the {{/metrics_prometheus}} HTTP endpoint of the embedded webserver
> with Prometheus. In this context, it makes sense to have parity with the
> [filtering|https://kudu.apache.org/docs/administration.html#_collecting_metrics_via_http]
> of the JSON-formatted Kudu metrics sourced at the {{/metrics}} endpoint. At
> least, filtering by the following criteria should be implemented:
> * severity level
> * entity type
> * entity ID
> * set of substrings to match metric name
> * key/value pairs to match attributes of a metric (e.g., that's to filter
> metrics for all tablets that comprise a particular table identified by either
> "table_id" or "table_name" attribute)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)