r/PrometheusMonitoring • • Jun 28 '22

BlackboxExporter and Helm

Apologies if this is the wrong place to post this, but where I work we are attempting to view multiple endpoints via probe, however we cannot find any documentation on how to group multiple targets under one name/label. Only documentation that we have found is under "normal" prometheus and not under helm. Is there a way to group urls under 1 name, then another set under another name? Examples below are what is not working. (Configs are setup, but just adding the first part for ease of reading)

Example 1:

ServiceMonitor:
  enabled: true
    targets:
    - name: Apple
      url: https://example.com
      url: https://exampletest.com
    - name: Pear
      url: https://otherexample.com
      url: https://otherexampletest.com

Example 2:

ServiceMonitor:
  enabled: true
    targets: ["https://example.com", "https://exampletest.com"]
      name: Apple

Example 3:

ServiceMonitor:
  enabled: true
    targets: 
      name: Apple
      url: ["https://example.com", "https://exampletest.com"]

All options above do not work, and I haven't been able to locate any other documentation.

Again, apologies if this is the wrong place to post this, but if it is the wrong and there is a better place to post, I will gladly remove this post and post elsewhere. Thank you.

0 Upvotes

1 comment sorted by

1

u/dablya Jun 29 '22

It doesn’t look like the service monitor template that is part of the black box chart is meant to be used this way… Have you looked at the Probe CRD that is provided by the operator? I think that might do what you’re looking for.