Ad Widget

Collapse

switch without snmp - using icmp ping, how to solve permission issue on fping?

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mrout
    Junior Member
    • Jan 2025
    • 6

    #1

    switch without snmp - using icmp ping, how to solve permission issue on fping?

    Hello everybody,

    when I start using a new system then I start with a test installation to see whether it fits my needs or not. Zabbix fits;-) That is why I started again from scratch to setup Zabbix and so far everything worked as in the test installation.

    Only with my managed network switches (which do not support SNMP even when the vendor said they do...) I have now a problem to setup icmp ping.

    1) fping installed

    #sudo which fping
    /usr/sbin/fping
    #ls -al /usr/bin/fping*
    -rwxr-xr-x 1 4710 zabbix 52240 6. Feb 2022 /usr/bin/fping
    lrwxrwxrwx 1 4710 zabbix 5 6. Feb 2022 /usr/bin/fping6 -> fping
    2) zbbix.conf edited

    values changed:
    • StartPingers=10
    • FpingLocation=/usr/bin/fping
    • Fping6Location=/usr/bin/fping6
    3) host created
    using template imcp ping on agent ip address

    4) graph created
    I have also created a new graph but I think this has not influenced my issue...


    Issue
    in menu - monitoring - latest data, the three collected values show below the column info a red "i" with following text:

    /usr/bin/fping: can't create socket (must run as root?) ​

    I have already tried changing the permissions on fping but apparently did not find the right setting.
    How do I have to change the permissions?
    Last edited by mrout; 13-02-2025, 15:20.
  • Answer selected by mrout at 19-02-2025, 02:26.
    Glencoe
    Zabbix developer
    • Oct 2019
    • 152

    Code:
    sudo setcap cap_net_raw+ep /usr/sbin/fping

    Comment


    • mrout
      mrout commented
      Editing a comment
      Based on the question below about how many fping installations I have - I recognised that my fping is in the directory /usr/bin!

      So, I modified the command and it was working:

      sudo setcap cap_net_raw+ep /usr/bin/fping

      Perfect thank you for the help!
      Last edited by mrout; 19-02-2025, 02:28.
  • Glencoe
    Zabbix developer
    • Oct 2019
    • 152

    #2
    Code:
    sudo setcap cap_net_raw+ep /usr/sbin/fping

    Comment


    • mrout
      mrout commented
      Editing a comment
      Based on the question below about how many fping installations I have - I recognised that my fping is in the directory /usr/bin!

      So, I modified the command and it was working:

      sudo setcap cap_net_raw+ep /usr/bin/fping

      Perfect thank you for the help!
      Last edited by mrout; 19-02-2025, 02:28.
  • mrout
    Junior Member
    • Jan 2025
    • 6

    #3
    Thank you for the fast feedback. Got following error:

    Originally posted by Glencoe
    Code:
    sudo setcap cap_net_raw+ep /usr/sbin/fping
    Invalid file '/usr/sbin/fping' for capability operation

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #4
      So how many fping-s you have? "which" command shows /usr/sbin/fping, and then you also have /usr/bin/fping...

      Comment


      • mrout
        mrout commented
        Editing a comment
        fping is installed only once.

        The /usr/sbin/fping* are only soft links. This was one approach solving the issue recommended by one video.

        sudo ls -al /usr/sbin/fping*
        lrwxrwxrwx 1 root root 14 4. Feb 16:55 /usr/sbin/fping -> /usr/bin/fping
        lrwxrwxrwx 1 root root 15 4. Feb 16:55 /usr/sbin/fping6 -> /usr/bin/fping6

        Do you recommend to delete the links? I would expect that based on the changes in the zabbix.conf, that zabbix should use the /usr/bin/fping, that these links do not interfere...
        Last edited by mrout; 14-02-2025, 16:43.
    Working...