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 ?
Use TCP module for that.
tcp_connect:
prober: tcp
timeout: 5s
like this. telnet 10.10.10.1 host for 123 port.
curl 'http://localhost:9115/probe?target=10.10.10.1:123&module=tcp_connect&debug=true'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With