I have setup prometheus and blackbox to monitor the kubenetes cluster and it is working fine for the dservice monitoring that is probe success for all services fine but the services which are from outside, I am not able to monitor those one. For ex: google.com, its giving probe_status: 0 and probe_http_redirects:0
Blackbox targets array is:
{
"targets": [ "google.com" ],
"labels": {
"job": "kubernetes-services",
"namespace": "default"
}
}
Job:
- job_name: 'kubernetes-services'
scheme: http
metrics_path: /probe
params:
module: [http_2xx]
file_sd_configs:
- files:
- /etc/prometheus/blackbox-targets.json
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: mo-blackbox.mo-system:9115
Result:
probe_ip_protocol 6
probe_http_status_code 0
probe_http_content_length 0
probe_http_redirects 0
probe_http_ssl 0
probe_duration_seconds 0.373322
probe_success 0
I want probe_success and probe_http_redirects should be 1, how can I achieve it?