Ad Widget

Collapse

ICMPPING problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AndWei
    Junior Member
    • Apr 2014
    • 12

    #1

    ICMPPING problem

    Hi,

    i'm new here and already have a question:
    I want to monitor a DSL connection with a dynamic IPv4 address. The address is reported to Zabbix and stored a plain text item named 'inetip'. I created a second item using "Simple Check" -> Key: icmpping[{inetip.last(0)}.

    The item fails with the message 'fping6 Temporary failure in name resolution'. Why is Zabbix using fping6?

    Hosts that are linked to the default template 'ICMP Ping' are checked without any problems.

    Kind regards ...
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    You need to tell zabbix that it has to read the contents of the file. Simply specifying "ping filename" cannot work.

    You have to do some script magic for that. The easiest way is to do it via a "UserParameter" script. See the docs for that.

    Comment

    • AndWei
      Junior Member
      • Apr 2014
      • 12

      #3
      Hum, no.

      This is the script i'm running:
      DATA=$(snmpgetnext -v1 -c public 192.168.1.1 ipAdEntAddr.0)
      if [ $? == 0 ]; then
      echo $DATA | awk '{print $4}'
      else
      echo 0.0.0.0
      fi
      The resulting value is stored in Zabbix as an item named 'inetip' (Type of information: Text). I created a second item using "Simple Check" -> Key: icmpping[{inetip.last(0)}.

      But it does not work, the resulting error is 'fping6 Temporary failure in name resolution'.

      Comment

      • steveboyson
        Senior Member
        • Jul 2013
        • 582

        #4
        Why don't you ping directly in your snmpget script and send the result?

        Comment

        • AndWei
          Junior Member
          • Apr 2014
          • 12

          #5
          Originally posted by steveboyson
          Why don't you ping directly in your snmpget script and send the result?
          That's not the solution i'm looking for, and would feel like a kludge to me

          There must be a reason, why Zabbix uses 'fping6' instead of 'fping'.

          Comment

          • steveboyson
            Senior Member
            • Jul 2013
            • 582

            #6
            Have you checked /etc/zabbix/zabbix-server.conf?
            /etc/zabbix/zabbix-server.conf:# Location of fping.
            /etc/zabbix/zabbix-server.conf:# Make sure that fping binary has root ownership and SUID flag set.
            /etc/zabbix/zabbix-server.conf:# FpingLocation=/usr/sbin/fping
            /etc/zabbix/zabbix-server.conf:# Location of fping6.
            /etc/zabbix/zabbix-server.conf:# Make sure that fping6 binary has root ownership and SUID flag set.
            /etc/zabbix/zabbix-server.conf:# Make empty if your fping utility is capable to process IPv6 addresses.
            /etc/zabbix/zabbix-server.conf:# Fping6Location=/usr/sbin/fping6


            Or could it be that on your system fping is symlinked to fping6?

            Comment

            • AndWei
              Junior Member
              • Apr 2014
              • 12

              #7
              Originally posted by steveboyson
              Have you checked /etc/zabbix/zabbix-server.conf?
              /etc/zabbix/zabbix-server.conf:# Location of fping.
              /etc/zabbix/zabbix-server.conf:# Make sure that fping binary has root ownership and SUID flag set.
              /etc/zabbix/zabbix-server.conf:# FpingLocation=/usr/sbin/fping
              /etc/zabbix/zabbix-server.conf:# Location of fping6.
              /etc/zabbix/zabbix-server.conf:# Make sure that fping6 binary has root ownership and SUID flag set.
              /etc/zabbix/zabbix-server.conf:# Make empty if your fping utility is capable to process IPv6 addresses.
              /etc/zabbix/zabbix-server.conf:# Fping6Location=/usr/sbin/fping6


              Or could it be that on your system fping is symlinked to fping6?
              That's the two files:
              [root@zabbix ~]# ls -l /usr/sbin/fping*
              rwsr-xr-x. 1 root root 27856 Apr 17 2012 /usr/sbin/fping
              rwsr-xr-x. 1 root root 28208 Apr 17 2012 /usr/sbin/fping6

              If used from the shell:

              [root@zabbix ~]# fping6 91.53.249.112
              fping6: Address family for hostname not supported

              [root@zabbix ~]# fping 91.53.249.112
              91.53.249.112 is alive

              The correct error in Zabbix is:
              "fping failed: "fping6: Temporary failure in name resolution"

              I'm running Zabbix 2.2.2 from the Zabbix repository on CentOS 6.5 x64.
              -----------------------------------------------------------------------
              Edit: Could it be, that Zabbix does not support variables in ICMPPING and mistakes '[{inetip.last(0)}' for a hostname? If so, why would it use fping6
              Last edited by AndWei; 16-04-2014, 09:29.

              Comment

              • steveboyson
                Senior Member
                • Jul 2013
                • 582

                #8
                fping6 is most likely the IPv6 version of fping. If you have no IPv6 addresses configured it gives an error message.

                I don't think that any of Zabbix' functions can take the last value of a different item as an input parameter - that is what I wanted to explain previously.

                They accept macros but no other item values.

                Comment

                • AndWei
                  Junior Member
                  • Apr 2014
                  • 12

                  #9
                  Originally posted by steveboyson
                  fping6 is most likely the IPv6 version of fping. If you have no IPv6 addresses configured it gives an error message.

                  I don't think that any of Zabbix' functions can take the last value of a different item as an input parameter - that is what I wanted to explain previously.

                  They accept macros but no other item values.
                  Looks like it. Thank you.

                  Comment

                  Working...