Scrape kube-state-metrics data/metrics from a URL as target

29 views
Skip to first unread message

Sdh26

unread,
Feb 26, 2021, 7:15:07 AM2/26/21
to Prometheus Users
Hi ,

We are using Promethues to monitor our AKS cluster but the Promethues is setup outside of the cluster in a stand alone VM and using kube-state-metrics to monitor the AKS cluster health , events etc.
Now , we have exposed the metrics to a URL through Ingress and the load balancer.
Can someone help to understand - how we can use the metrics published on the URL to be scraped by  the promethues  and how we should set the targets and relabel configs in promethues.yml ?

Thanks.

Stuart Clark

unread,
Feb 26, 2021, 9:32:18 AM2/26/21
to Sdh26, Prometheus Users
If you already have it that the metrics are accessible from outside the
cluster you just need to add a job to your prometheus.yaml with the
target URL/IP address (probably using the static_sd option) of the load
balancer. You don't need any relabeling configuration generally.

--
Stuart Clark

Reply all
Reply to author
Forward
0 new messages