Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Zabbix and ping

    Scheduled Pinned Locked Moved pfSense Packages
    1 Posts 1 Posters 3.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      frater
      last edited by

      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?
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.