Monitroing Hundred ICMP Hosts.

108 views
Skip to first unread message

banyu mubarok

unread,
Mar 9, 2022, 3:52:51 AM3/9/22
to Prometheus Developers
Hi,

Currently, I need to monitor a hundred hosts with the ICMP module using blackbox_exporter with file_sd_configs for every target host.

But the result I've got is almost the host result the '0' / 'down' value whereas the host is up and running and can be ping to that. Is there any misconfiguration on my own?

Here is my config:

prometheus config prometheus.yml:
scrape_configs:
  - job_name: "hosts_status"
    scrape_interval: 10m
    metrics_path: /probe
    params:
      module: [icmp_ipv4]
    file_sd_configs:
    - files:
      - 'ping/*.json'
relabel_configs:
    - source_labels: [__address__]
      target_label: __param_target
    - source_labels: [__param_target]
      target_label: ip_rtu
    - target_label: __address__
      replacement: localhost:9115


target config hosts.json:
[
  {"targets":["10.10.10.10"],"
     labels":
   {"sname":"HOST-U00"}}
]

blackbox config blackbox.yml
modules:
  icmp_ipv4:
     prober: icmp
#     timeout: 1s
     icmp:
       preferred_ip_protocol: ip4

blackbox daemon config:
[Unit]
Description=blackbox_exporter
Wants=network-online.target
After=network-online.target

[Service]
User=blackbox
AmbientCapabilities=CAP_NET_RAW
ExecStart=/opt/blackbox-exporter/blackbox_exporter --config.file=/opt/blackbox-exporter/blackbox.yml
StandardOutput=syslog
StandardError=syslog
LimitNOFILE=8192
Reply all
Reply to author
Forward
0 new messages