Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when I use the cname and cdn domain,can not get the ssl_expire_earilest_time #1274

Open
conardchen opened this issue Aug 2, 2024 · 1 comment

Comments

@conardchen
Copy link

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:
    • source_labels: [address]
      target_label: __param_target
    • source_labels: [__param_target]
      target_label: instance
    • target_label: address
      replacement: blackbox:9115
  • 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
    • 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
    • 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
    • source_labels:
      • __meta_kubernetes_service_name
        target_label: service
    • source_labels:
      • __meta_kubernetes_pod_name
        target_label: pod
    • source_labels:
      • __meta_kubernetes_pod_container_name
        target_label: container
    • action: drop
      source_labels:
      • __meta_kubernetes_pod_phase
        regex: (Failed|Succeeded)
    • source_labels:
      • __meta_kubernetes_service_name
        target_label: job
        replacement: ${1}
    • target_label: endpoint
      replacement: http
    • source_labels:
      • address
        target_label: __tmp_hash
        modulus: 1
        action: hashmod
    • source_labels:
      • __tmp_hash
        regex: 0
        action: keep
  • 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
    • 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
    • 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
    • source_labels:
      • __meta_kubernetes_service_name
        target_label: service
    • source_labels:
      • __meta_kubernetes_pod_name
        target_label: pod
    • source_labels:
      • __meta_kubernetes_pod_container_name
        target_label: container
    • action: drop
      source_labels:
      • __meta_kubernetes_pod_phase
        regex: (Failed|Succeeded)
    • source_labels:
      • __meta_kubernetes_service_name
        target_label: job
        replacement: ${1}
    • target_label: endpoint
      replacement: http
    • source_labels:
      • address
        target_label: __tmp_hash
        modulus: 1
        action: hashmod
    • source_labels:
      • __tmp_hash
        regex: 0
        action: keep
        alerting:
        alertmanagers:
    • scheme: HTTP
      static_configs:
      • targets:
        • prometheus-alertmanager.monitor.svc.cluster.local:80
          rule_files:
  • rules.yaml`
@electron0zero
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants