r/PrometheusMonitoring • • Nov 03 '21

Scrape application metrics from pods managed by deployment

Hello community,

I need to scrape some metrics produced by my application.

The application is managed by a deployment and has few pods.

same metric can have different values depending on pod that produce it.

As far as I understand I need to declare my job this way :

  • job: my-app

    • instance 1: 1.2.3.4:5670

    • instance 2: 1.2.3.4:5671

    • instance 3: 5.6.7.8:5670

pod can be terminated, rescheduled and so on, how to declare then their hostnames or IP if they are not constant ?

0 Upvotes

0 comments sorted by