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

ICMP ping packet size #920

Closed
uquerx opened this issue May 31, 2022 · 1 comment
Closed

ICMP ping packet size #920

uquerx opened this issue May 31, 2022 · 1 comment

Comments

@uquerx
Copy link

uquerx commented May 31, 2022

Hello everybody,

From my prometheus server I'm not able to ping the device I wish to monitor with the default icmp packet size (64 bytes) but ok if I force with a ping 32 byte.

Exemple

# ping 10.X.X.200
PING 10.X.X.200 (10.X.X.200) 56(84) bytes of data.
--- 10.X.X.200 ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 9ms

but like this

# ping -s 32 10.X.X.200
PING 10.X.X.200 (10.X.X.200) 32(60) bytes of data.
40 bytes from 10.X.X.200: icmp_seq=1 ttl=63 time=1.97 ms
40 bytes from 10.X.X.200: icmp_seq=2 ttl=63 time=1.92 ms
40 bytes from 10.X.X.200: icmp_seq=3 ttl=63 time=1.86 ms
--- 10.X.X.200 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 3ms

Do you know if with blackbox_exporter there is a chance to configure an ICMP ping probe with a 32 Byte packet instead of 64 Bytes???

Host operating system:

Linux 5.4.106-1-pve #1 SMP PVE 5.4.106-1 (Fri, 19 Mar 2021 11:08:47 +0100) x86_64 GNU/Linux

This is my prometheus.yml file:

- job_name: blackbox-ping
    metrics_path: /probe
    params:
      module: [icmp]
    static_configs:
      - targets:
        - 10.XX.XX.200   # <== Put here your targets
    relabel_configs:    # <== This comes from the blackbox exporter README
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 127.0.0.1:9115  # Blackbox exporter
@uquerx
Copy link
Author

uquerx commented Jun 13, 2022

Hello,

Finally I found the solution by myself. You have to use payload_size value when you configure the ICMP probe in your blackbox.yml.
Example for me:

modules:
  ip4_icmp:
    prober: icmp
    icmp:
      preferred_ip_protocol: "ip4"
      payload_size: 32

And voilà

@uquerx uquerx closed this as completed Jun 13, 2022
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

1 participant