For posterity, here's what I ended up adding which works great:
prometheus.yml:
- job_name: 'ldap_cert_check'
scrape_interval: 1h
metrics_path: /probe
params:
module: [tcp_cert]
static_configs:
- targets:
- '<hostname>:636'
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
blackbox_exporter.yml
tcp_cert:
prober: tcp
timeout: 5s
tcp:
tls: true
alert:
- alert: ldap_cert_expiration
expr: round((probe_ssl_earliest_cert_expiry - time()) / 86402) < 10
labels:
severity: warning
audience: "hammertime"
annotations:
summary: "`{{ $labels.instance }}` has an ldap cert which will expire in {{ $value }} days."
description: "The ldap certificate is expiring soon."