Zabbix and ping



  • I'm using Zabbix in combination with /sbin/ping to check for devices on my LAN.
    I use this function

    UserParameter=net.ping[*], ping -c1 -W3 $1 | grep -o '[0-9]* packets received' | tr -cd '[0-9]'
    
    But I don't need to forget to enable the sticky bit on /sbin/ping if I install a new machine.
    The user "zabbix" is not allowed to use ping
    Normal Linux distributions (CentOS, Ubuntu, Fedora) have this sticky bit enabled by default.
    Not FreeBSD
    
    [code]su -m zabbix -c 'ping -c1 127.0.0.1'
    ping: socket: Operation not permitted
    [/code]
    
    Enabling sticky bit makes this possible
    [code]: chmod +s /sbin/ping
    : su -m zabbix -c 'ping -c1 127.0.0.1'
    PING 127.0.0.1 (127.0.0.1): 56 data bytes
    64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.211 ms
    
    --- 127.0.0.1 ping statistics ---
    1 packets transmitted, 1 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 0.211/0.211/0.211/0.000 ms
    [/code]
    
    Can the sticky bit be enabled for /sbin/ping by default or can at least the zabbix package enable it?
    

Locked