0
votes

I am trying to probe my LDAP server using the blackbox exporter using the tcp_connect module. The source is my k8s cluster. From within my cluster, I can definitely reach the ldap server

debug@debug:~$ telnet global.ldap 636
Trying 10.27.20.7...
Connected to global.ldap.
Escape character is '^]'.
^]

My Prometheus config looks like

- job_name: 'ldap_check'
          scrape_interval: 5m
          metrics_path: /probe
          params:
            module: [tcp_connect]
          static_configs:
            - targets:
              - 'ldaps://global.ldap:636' # Also tried 'global.ldap:636' without the 'ldaps://'
          relabel_configs:
            - source_labels: [__address__]
              target_label: __param_target
            - source_labels: [__param_target]
              target_label: instance
            - target_label: __address__
              replacement: monitoring-prometheus-blackbox-exporter:9115

But my Prometheus /targets page shows me "server returned HTTP status 400 Bad Request" Is there something I have missed ?

1

1 Answers

0
votes

Try this:

- job_name: ldap_check
  metrics_path: /probe
  static_configs:
    - labels:
        module: tcp_connect
      targets:
        - global.ldap:636
  relabel_configs:
  ...