promethues Blackbox exporter

53 views
Skip to first unread message

Kamalakar Adepu

unread,
Sep 17, 2021, 8:27:27 AM9/17/21
to Prometheus Users
Hi,

I have deployed a blackbox exporter pod in existing cluster

Where there will be 1 pod, 1 service ,1 configmap

under blacbox i have added below code:-

apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus-blackbox-exporter
  labels:
    app: prometheus-blackbox-exporter
data:
  blackbox.yaml: |
    modules:
      http_2xx:
        http:
          no_follow_redirects: false
          preferred_ip_protocol: ip4
          valid_http_versions:
          - HTTP/1.1
          - HTTP/2
          valid_status_codes: []
        prober: http
        timeout: 5s

And in promethues config file i have added below code -

- job_name: 'kube-api-blackbox'
  scrape_interval: 1w
  metrics_path: /probe
  params:
    module: [http_2xx]
  static_configs:
   - targets:
  relabel_configs:
   - source_labels: [__address__]
     target_label: __param_target
   - source_labels: [__param_target]
     target_label: instance
   - target_label: __address__
     replacement: prometheus-blackbox-exporter:9115 # blackboc service name and port


Later when i am doing
kubectl --namespace=monitoring port-forward svc/ prometheus-blackbox-exporter   9090:9090

The localhost:9115 is opening in browser but in prometheus Ui under target the enpoit is down error

check the Kube-api-blackbox in beow imageWhatsApp Image 2021-09-17 at 10.44.32 AM.jpeg



Reply all
Reply to author
Forward
0 new messages