nais/naisd

Control Prometheus Scraping

Closed this issue · 1 comments

We need to expose some variables to control scraping from promehteus
yaml should be like:
metrics:
prometheus:
enabled: true # if false the pod will not be scraped for metrics by prometheus
path: /_/metrics # Path to prometheus-metrics

this should control the relevant annotations:

  • prometheus.io.scrape
  • prometheus.io.port
  • prometheus.io.path

using sensible default values

gtcno commented

Do a plain one to one mapping with the following default values?

prometheus:
enabled: true
path: /metrics
port: 8080

And add annotations to the deployment resource.