0

I'm trying to set up some prometheus metric collection on my kubernetes cluster using ServiceMonitors. Among the services I want to collect from are services provisioned by operators, such as Cockroach and EMQX. I'm having some issues working out how to select these services with a ServiceMonitor, given that ServiceMonitors select based on Label, not Name.

The labels applied by the operators aren't very useful for this purpose, because they may provision several services that serve different purposes (not all of which expose metrics) but with identical labels.

Some operators are flexible enough to let me adjust the templates used for their services - but not all.

Is there a more sensible way to select these services than e.g. a deployment job that manually applies custom labels to services of given names, so that I can select them? This feels pretty contrived, so maybe I'm missing something.

user3896248
  • 347
  • 1
  • 5
  • 16

0 Answers0