when I use the cname and cdn domain,can not get the ssl_expire_earilest_time
conardchen opened this issue · 1 comments
when I use the module http_2xx to get the ssl Certificate expire time,I found my domain use the cdn and cname ,it can not get the probe_ssl_earliest_cert_expiry 。
my blacbox_exporter config:
modules: http_2xx: prober: http http: preferred_ip_protocol: "ip4" http_post_2xx: prober: http http: method: POST tcp_connect: prober: tcp pop3s_banner: prober: tcp tcp: query_response: - expect: "^+OK" tls: true tls_config: insecure_skip_verify: false grpc: prober: grpc grpc: tls: true preferred_ip_protocol: "ip4" grpc_plain: prober: grpc grpc: tls: false service: "service1" ssh_banner: prober: tcp tcp: query_response: - expect: "^SSH-2.0-" - send: "SSH-2.0-blackbox-ssh-check" irc_banner: prober: tcp tcp: query_response: - send: "NICK prober" - send: "USER prober prober prober :prober" - expect: "PING :([^ ]+)" send: "PONG ${1}" - expect: "^:[^ ]+ 001" icmp: prober: icmp icmp_ttl5: prober: icmp timeout: 5s icmp: ttl: 5
my prometheus config:
`global:
external_labels:
monitor: prometheus
scrape_configs:
- job_name: 'blackbox'
metrics_path: /probe
params:
module: ['http_2xx']
static_configs:- targets:
- admin.web.xxxx
relabel_configs:
- admin.web.xxxx
- source_labels: [address]
target_label: __param_target - source_labels: [__param_target]
target_label: instance - target_label: address
replacement: blackbox:9115
- targets:
- job_name: prometheus
kubernetes_sd_configs:- role: endpoints
namespaces:
names:
- monitor
metrics_path: /metrics
relabel_configs: - source_labels:
- job
target_label: __tmp_prometheus_job_name
- job
- action: keep
source_labels:- __meta_kubernetes_service_label_app_kubernetes_io_component
- __meta_kubernetes_service_labelpresent_app_kubernetes_io_component
regex: (server);true
- action: keep
source_labels:- __meta_kubernetes_service_label_app_kubernetes_io_instance
- __meta_kubernetes_service_labelpresent_app_kubernetes_io_instance
regex: (prometheus);true
- action: keep
source_labels:- __meta_kubernetes_service_label_app_kubernetes_io_name
- __meta_kubernetes_service_labelpresent_app_kubernetes_io_name
regex: (prometheus);true
- action: keep
source_labels:- __meta_kubernetes_endpoint_port_name
regex: http
- __meta_kubernetes_endpoint_port_name
- source_labels:
- __meta_kubernetes_endpoint_address_target_kind
- __meta_kubernetes_endpoint_address_target_name
separator: ;
regex: Node;(.*)
replacement: ${1}
target_label: node
- source_labels:
- __meta_kubernetes_endpoint_address_target_kind
- __meta_kubernetes_endpoint_address_target_name
separator: ;
regex: Pod;(.*)
replacement: ${1}
target_label: pod
- source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- __meta_kubernetes_namespace
- source_labels:
- __meta_kubernetes_service_name
target_label: service
- __meta_kubernetes_service_name
- source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- __meta_kubernetes_pod_name
- source_labels:
- __meta_kubernetes_pod_container_name
target_label: container
- __meta_kubernetes_pod_container_name
- action: drop
source_labels:- __meta_kubernetes_pod_phase
regex: (Failed|Succeeded)
- __meta_kubernetes_pod_phase
- source_labels:
- __meta_kubernetes_service_name
target_label: job
replacement: ${1}
- __meta_kubernetes_service_name
- target_label: endpoint
replacement: http - source_labels:
- address
target_label: __tmp_hash
modulus: 1
action: hashmod
- address
- source_labels:
- __tmp_hash
regex: 0
action: keep
- __tmp_hash
- role: endpoints
- job_name: alertmanager
kubernetes_sd_configs:- role: endpoints
namespaces:
names:
- monitor
metrics_path: /metrics
relabel_configs: - source_labels:
- job
target_label: __tmp_prometheus_job_name
- job
- action: keep
source_labels:- __meta_kubernetes_service_label_app_kubernetes_io_component
- __meta_kubernetes_service_labelpresent_app_kubernetes_io_component
regex: (alertmanager);true
- action: keep
source_labels:- __meta_kubernetes_service_label_app_kubernetes_io_instance
- __meta_kubernetes_service_labelpresent_app_kubernetes_io_instance
regex: (prometheus);true
- action: keep
source_labels:- __meta_kubernetes_service_label_app_kubernetes_io_name
- __meta_kubernetes_service_labelpresent_app_kubernetes_io_name
regex: (prometheus);true
- action: keep
source_labels:- __meta_kubernetes_endpoint_port_name
regex: http
- __meta_kubernetes_endpoint_port_name
- source_labels:
- __meta_kubernetes_endpoint_address_target_kind
- __meta_kubernetes_endpoint_address_target_name
separator: ;
regex: Node;(.*)
replacement: ${1}
target_label: node
- source_labels:
- __meta_kubernetes_endpoint_address_target_kind
- __meta_kubernetes_endpoint_address_target_name
separator: ;
regex: Pod;(.*)
replacement: ${1}
target_label: pod
- source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- __meta_kubernetes_namespace
- source_labels:
- __meta_kubernetes_service_name
target_label: service
- __meta_kubernetes_service_name
- source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- __meta_kubernetes_pod_name
- source_labels:
- __meta_kubernetes_pod_container_name
target_label: container
- __meta_kubernetes_pod_container_name
- action: drop
source_labels:- __meta_kubernetes_pod_phase
regex: (Failed|Succeeded)
- __meta_kubernetes_pod_phase
- source_labels:
- __meta_kubernetes_service_name
target_label: job
replacement: ${1}
- __meta_kubernetes_service_name
- target_label: endpoint
replacement: http - source_labels:
- address
target_label: __tmp_hash
modulus: 1
action: hashmod
- address
- source_labels:
- __tmp_hash
regex: 0
action: keep
alerting:
alertmanagers:
- __tmp_hash
- scheme: HTTP
static_configs:- targets:
- prometheus-alertmanager.monitor.svc.cluster.local:80
rule_files:
- prometheus-alertmanager.monitor.svc.cluster.local:80
- targets:
- role: endpoints
- rules.yaml`
For questions/help/support please use our community channels. There are more people available to potentially respond to your request and the whole community can benefit from the answers provided.