kubernetes - Prometheus - Not able to probe tcp end -
i have setup prometheus , blackbox check liveliness of services , working fine http targets not working tcp one.
if try probe service using curl http://blackbox:9115/probe?target=mongodb:27017&module=tcp
it gives me output as
probe_http_status_code 200
probe_http_content_length 84
probe_http_redirects 0
probe_http_ssl 0
probe_duration_seconds 0.310101
probe_success 1
but not able same result using prometheus job. prometheus ui shows status down error "server returned http status 400 bad request"
job configuration
- job_name: 'mongo-service' scheme: http metrics_path: /probe params: module: [tcp] static_configs: - targets: ['mongo-svc:27017'] relabel_configs: - source_labels: [__address__] target_label: __param_target replacement: ${1} - source_labels: [__param_target] regex: (.*) target_label: instance replacement: ${1} - source_labels: [ ] regex: .* target_label: __address__ replacement: blackbox:9115
that works fine me. sure you're talking same blackbox exporter in both cases?
i'd suggest using tcpdump see error is.
Comments
Post a Comment