简体   繁体   中英

Why are metrics available via http://localhost:56789/metrics but not returned via https://example.com/path/serviceforapp/metrics?

Kube.netes. Prometheus. A test application that can send metrics or a simple phrase to an HTTP request. The end goal is to see graphs in Grafana. I want to make sure that everything works up to the current setup moment.

Now I want to see the metrics by URL, to see that the ServiceMonitor is working correctly, that they reach the Graphana. But so far I haven't been able to find a good enough troubleshooting guide.

I assume it's okay not to show everyone your metrics. But I want to make sure that this is normal behavior and which way to google in case I want to allow it .

This is a completely intended behavior when trying to use Grafana to visualize data from Managed Service for Prometheus . Metrics will be available via http request when trying to browse Grafana, as during the deployment we port-forward the frontend service to our local machine. As it is not a good practice to leave our metrics available to everyone for some security reasons, Grafana port-forwards the frontend service to our local machine.

Google Cloud APIs all require authentication using OAuth2. However, Grafana doesn't support OAuth2 authentication for Prometheus data sources. To use Grafana with Managed Service for Prometheus, you must use the Prometheus UI as an authentication proxy.

You can refer to these documentations to know more about Grafana & How-to-Deploy-Grafana .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM