-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#9063] Support metrics filtering for /prometheus-metrics endpoint
Summary: Metrics filtering is supported by the /metrics end point. This diff allows /prometheus-metrics to use the same mechanism For example: /prometheus-metrics?metrics=<metric-substring1>,<metric-substring2> Test Plan: Launch a local yb-ctl and curl prometheus-metrics with ?metrics=<param1>,<param2> ``` dev-server-amitanand2:~/code/yugabyte-perf [:194aa24|✚ 5…4⚑ 22] 05:28 $ curl http://127.0.0.1:7000/prometheus-metrics?metrics=transactions_running transactions_running{exported_instance="dev-server-amitanand2:7000",table_id="sys.catalog.uuid",namespace_name="",table_name="sys.catalog",metric_type="tablet"} 0 1625203749777 dev-server-amitanand2:~/code/yugabyte-perf [:194aa24|✚ 5…4⚑ 22] 05:29 $ curl http://127.0.0.1:7000/prometheus-metrics?metrics=transactions_running,write_operations_inflight transactions_running{exported_instance="dev-server-amitanand2:7000",table_id="sys.catalog.uuid",namespace_name="",table_name="sys.catalog",metric_type="tablet"} 0 1625203761186 write_operations_inflight{exported_instance="dev-server-amitanand2:7000",table_id="sys.catalog.uuid",namespace_name="",table_name="sys.catalog",metric_type="tablet"} 0 1625203761186 dev-server-amitanand2:~/code/yugabyte-perf [:194aa24|✚ 5…4⚑ 22] ``` with no-params/empty list of params: ``` dev-server-amitanand2:~/code/yugabyte-perf [:194aa24|✚ 4…4⚑ 22] 18:53 $ curl -q http://127.0.0.1:7000/prometheus-metrics 2>/dev/null | wc -l 1245 dev-server-amitanand2:~/code/yugabyte-perf [:194aa24|✚ 4…4⚑ 22] 18:53 $ curl -q http://127.0.0.1:7000/prometheus-metrics?metrics= 2>/dev/null | wc -l 0 ``` Reviewers: bogdan Reviewed By: bogdan Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D12152
- Loading branch information
1 parent
faa0574
commit f7438c2
Showing
4 changed files
with
91 additions
and
38 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
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