prometheus/blackbox_exporter

How to configure a continuous range of ip addresses when using the icmp module

cuiliang0302 opened this issue · 1 comments

Host operating system: output of uname -a

Linux huanbao 4.18.0-425.3.1.el8.x86_64 #1 SMP Wed Nov 9 20:13:27 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

blackbox_exporter version: output of blackbox_exporter --version

v0.21.0

What is the blackbox.yml module config.

apiVersion: v1
kind: ConfigMap
metadata:
  name: blackbox-exporter-config
  namespace: thanos
data:
  blackbox.yml: |-
    modules:
      http_2xx:
        prober: http
        http:
          preferred_ip_protocol: "ip4"
          tls_config:
            insecure_skip_verify: true
      tcp_connect:
        prober: tcp
      icup:
        prober: icup

What is the prometheus.yml scrape config.

    - job_name: blackbox-exporter-ping-ts
      metrics_path: /probe
      params:
        module: [icmp]
      static_configs:
        - targets:
          - 172.21.0.1-110
          labels:
            team: 'server'
            service: 'TS_AC_CLIENTIP'

What did you do that produced an error?

I want to add icmp monitoring with 110 consecutive ip addresses, how do I write the targets?

What did you expect to see?

For example, my ip address is 172.21.0.1-110, I want to fill in my targets with 172.21.0.1-110, and then I can see the details of each ip address in Prometheus

image

What did you see instead?

See the metric values for each ip between 172.21.0.1-110 with the probe_sucess metric

SuperQ commented

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.