How to query Prometheus for a required metrics

Viewed 764

I have Prometheus up and running, and I am able to scrape the metrics and am able to query via browser at localhost:9090 graphically, as per my requirement. But, I need to get certain metrics from my Go code and hence query from Go. So, how can I do this? For example, say I need to get the result of the query: container_memory_usage_bytes{container_label_io_kubernetes_pod_name="pod_name",container_label_io_kubernetes_docker_type="container"} from Go. How can I get the result?

0 Answers
Related