krr icon indicating copy to clipboard operation
krr copied to clipboard

Prometheus discovery by CRD and custom labels

Open caruccio opened this issue 1 year ago • 3 comments

Hi.

I ´d like to suggest the following:

  1. Allow user to specify prometheus service labels to discover.
  2. Use crd/prometheuses.monitoring.coreos.com objects to discover prometheus instances.

caruccio avatar Dec 21 '23 19:12 caruccio

Hey, we already let you specify the Prometheus url using -p. Or we autodiscover.

Can you elaborate on your use case and how you would use this addition?

aantn avatar Dec 28 '23 15:12 aantn

Hey. Sure I can.

  1. Services may be recreated with differente names, whereas labels are more "uniform" across projects (this is my intuition speaking, not real world data). More than once I had to rename a whole namespace where prometheus was installed, which required me to change the -p url provided to krr (of course I forgot that and krr failed on the first run after changes)
  2. Prometheus CRs are the "official" way to create prometheus instances. It may sometimes do not have any of the labels KRR uses to autodiscovery, thus looking into the object itself will always give a valid instance to use.

In fact, this is just a request to be more comprehensive in the discovery process.

caruccio avatar Dec 28 '23 16:12 caruccio

Got it, thanks!

aantn avatar Dec 31 '23 08:12 aantn