[Telegraf] inputs.ping reports result code 2 although pings are successful

Started by Senten, January 16, 2025, 10:58:47 AM

Previous topic - Next topic
Hi there,

on 08.01.2025 my telegraf plugin stopped reporting any ping metrics other than "response_code = 2" for no apparent reason.
I did not execute any updates in that time, nor did I change the configuration in any way - it just stopped.

The Telegraf logs for each interval look like these:

                                 64 bytes from 8.8.8.8: icmp_seq=64 ttl=119 time=5.354 ms
[...]
                                 64 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=5.522 ms   
                                 64 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=6.754 ms   
                                 64 bytes from 8.8.8.8: icmp_seq=0 ttl=119 time=6.105 ms   
2025-01-16T09:35:05              E! [inputs.ping] Error in plugin: host "8.8.8.8": command timed out - PING 8.8.8.8 (8.8.8.8): 56 data bytes   
2025-01-16T09:35:05              E! [agent] Error terminating process children: no such process

The ping execution stops after sequence number 64 instead of 99 (ping count configured is 100)


Here is the progression over time from Grafana:

https://imgur.com/a/o2p2qHB


## Versions
OPNsense: 24.7.11_2
os-telegraf: 1.12.12
telegraf: 1.33.0


## Telegraf inputs.ping configuration
Ping (IPv4): enabled
Ping Count (IPv4): 100
Ping Hosts (IPv4): 8.8.8.8


## What I did so far
- OPNsense update from 24.7.11_2 to 24.7.12
- Uninstall/Reinstall of the Telegraf plugin
- Tested running the Telegraf plugin as root


Does anybody have an idea what could cause this issue?


Thank you in advance!

Regards,
Senten