Environment
- YugabyteDB Anywhere (YBA): All versions
Summary
YugabyteDB Anywhere (YBA) includes an embedded Prometheus instance that allows you to run custom PromQL queries for advanced monitoring and troubleshooting.
Steps to Run PromQL Queries
-
Navigate to the Metrics Page
- In the YBA UI, go to Universes > [Your Universe Name] > Metrics.
-
Open the Prometheus Query Editor
- On any metrics graph, click the Prometheus Icon
(top-right corner).
- This opens a Prometheus query editor window.
- On any metrics graph, click the Prometheus Icon
-
Enter and Run Your PromQL Query
- Paste your PromQL query into the editor and execute it to view the results.
Example Queries:
label_replace(
avg by (exported_instance) (
avg_over_time(generic_heap_size{node_prefix="yb-demo-yugabyte-disk-demo-rf1",metric_id= "yb.tabletserver"}[$__interval])
)
, "label", "$2", "exported_instance", "(yb-demo-yugabyte-disk-demo-rf1-)?(.*)$"
)
or
label_replace(
avg (
server_memory_soft_limit{node_prefix="yb-demo-yugabyte-disk-demo-rf1",metric_id= "yb.tabletserver"}
)
, "label", "max soft_limit", "label", "")
or
label_replace(
max (
server_memory_hard_limit{node_prefix="yb-demo-yugabyte-disk-demo-rf1",metric_id= "yb.tabletserver"}
)
, "label", "max hard_limit", "label", "") - Node_prefix value can be found on the Nodes tab for the Universe. For example, if there is a node called
yb-demo-yugabyte-disk-demo-rf1-n1, the correct prefix value for this Universe isyb-demo-yugabyte-disk-demo-rf1. - Make sure the Prometheus UI port is not blocked, otherwise user won't be able to open Prometheus UI in browser and thus will not be able to run PromQLs.
When to Use Custom PromQL Queries
Custom PromQL queries are useful when you need deeper insights beyond standard dashboards. Some scenarios include:
Troubleshooting performance issues
Identify memory bottlenecks, CPU pressure, or query latency trends.Validating resource configuration
Compare actual heap usage with configured soft and hard memory limits.Custom monitoring dashboards
Build targeted graphs for specific universes, nodes, or workloads.Alert fine-tuning
Run test queries before creating custom alerts in YBA.
Additional Resources
Reference: SUPPORT-775
Comments
0 comments
Please sign in to leave a comment.