FreeBSD 11.4 : Monit 5.27 : Ping not reporting response time

Issue #946 new
Kiril Ballow created an issue

Hello I can not seem to get ping result to return ping response time.

Remote Host '8.8.8.8'
status OK
monitoring status Monitored
monitoring mode active
on reboot start
ping response time -
data collected Thu, 05 Nov 2020 11:10:42

when in console

ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=120 time=0.654 ms

Anything i could be doing wrong or is this a bug?

Comments (1)

  1. Tildeslash repo owner

    Do you run monit as root or as normal user? Ping requires a raw socket, which only privileged user can create. Therefore the “ping” utility is setuid:

    # ls -l /sbin/ping
    -r-sr-xr-x  1 root  wheel  32624 Jun 18 14:00 /sbin/ping
    

    If you use the ping statement in monit, you need to run it as root.

  2. Log in to comment