How do I add blackbox exporter (and blackbox exporter targets) to prometheus in kubernetes

I have installed prometheus with kube-prometheus-stack helm chart. I have also installed blackbox exporter with the blackbox-exporter helm chart. Now I want to prometheus to scrape information from blackbox exporter. How do I configure this?

I also want to add http targets to blackbox exporter. I have seen something like this on the internet:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    app: blackbox-prometheus-blackbox-exporter
  name: blackbox-prometheus-blackbox-exporter
  namespace: default
spec:
  endpoints:
    - interval: 10s
      path: /probe
      port: web
      params:
        module: 
        - http_2xx
        target: 
        - "https://localhost:5000"
      metricRelabelings:
      - action: replace
        regex: (.*)
        replacement: my_local_service
        sourceLabels:
        - __param_target
        targetLabel: target
  selector:
    matchLabels:
      app: blackbox-prometheus-blackbox-exporter

But anyting I find does not really seem to work.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum