Override the Prometheus URL Used by the YBA UI

When using YugabyteDB Anywhere (YBA), you may notice that the Prometheus link in the YBA UI points to an internal endpoint instead of the external endpoint you want users to open from their browser.

This can happen in environments where YBA or Prometheus is deployed behind internal networking, Kubernetes services, private DNS, load balancers, or reverse proxies.

The fix is to use the YBA runtime configuration flag:

				
					yb.metrics.external.url
				
			

This global runtime configuration value controls the external Prometheus URL used when YBA generates Prometheus metrics links in the UI. It is also used when configuring High Availability metrics federation.

Key Insight

If the Prometheus link in YBA is showing an internal hostname or IP address, check the yb.metrics.external.url runtime configuration flag.

Also check yb.metrics.link.use_browser_fqdn, because it controls whether the Prometheus link should use the current browser FQDN or the backend-provided value.

The Two Important Flags

YBA exposes two related runtime configuration flags for this behavior:

Flag Purpose
yb.metrics.external.url Sets the external Prometheus URL used by YBA-generated links and HA metrics federation.
yb.metrics.link.use_browser_fqdn Controls whether YBA rewrites the Prometheus link using the browser’s current FQDN.
In most cases, start with yb.metrics.external.url. If the generated link still does not behave as expected, review yb.metrics.link.use_browser_fqdn to determine whether YBA is using the browser hostname instead of the backend-configured value.

For the full list of supported YugabyteDB Anywhere runtime configuration flags, see: 

Example Scenario

Suppose YBA generates a Prometheus link like this:

				
					http://prometheus.internal:9090
				
			

But users need the browser link to open something like this:

				
					https://prometheus.example.com
				
			

In that case, set:

				
					yb.metrics.external.url = https://prometheus.example.com
				
			

And if YBA is still rewriting the link based on the browser hostname, review:

				
					yb.metrics.link.use_browser_fqdn
				
			

In some deployments, setting this to false may be needed so YBA uses the configured backend value instead of deriving the host from the browser’s current FQDN.

Don’t Forget YBA HA

One important caveat: yb.metrics.external.url is not only a browser/UI setting. It is also used for metrics federation between primary and standby Prometheus instances in YBA HA configurations.

So, if YBA High Availability is enabled, verify that the configured external Prometheus URL works correctly for both:

				
					YBA UI Prometheus links
YBA HA metrics federation
				
			

Final Takeaway

If the Prometheus link in the YugabyteDB Anywhere UI points to an internal endpoint, check these two runtime configuration flags:

				
					yb.metrics.external.url
yb.metrics.link.use_browser_fqdn
				
			

yb.metrics.external.url controls the external Prometheus URL used by the YBA UI, while yb.metrics.link.use_browser_fqdn determines whether the link should be rewritten using the browser’s current FQDN.

Just remember that yb.metrics.external.url may also affect YBA HA metrics federation, so test carefully in HA deployments.

Have Fun!

My wife has been selling everything in the house as we prepare for a potential move in the near future. Today, she sold my bike. At first, I was upset and said, “Hey, I was planning to ride that more this summer!” Then I remembered the last time I rode it, I fell off going down a hill. So… bye-bye bike.