Ad Widget

Collapse

Zabbix 2.0.9 icmpping giving 0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Robbin
    Junior Member
    • Oct 2013
    • 4

    #1

    Zabbix 2.0.9 icmpping giving 0

    Hello,

    I have installed Zabbix 2.0.9 on Centos 6.4

    but the simple check icmpping always giving 0

    in the zabbix server config file i use this location for fping:
    /usr/sbin/fping

    so when i manualy try on the console:
    /usr/sbin/fping 10.15.20.254
    10.15.20.254 is alive

    i found some articles to change the permissions of fping.
    so i the current permissions are:
    -rws--s---. 1 root zabbix 25160 Apr 17 2012 /usr/sbin/fping

    it still not work so i enabled debugging of the zabbix server
    i see this messages:
    11526:20131027:112207.901 In get_pinger_hosts()
    11526:20131027:112207.901 In substitute_key_macros() data:'icmpping[10.15.20.50,4,20,24,60]'
    11526:20131027:112207.901 End of substitute_key_macros():SUCCEED data:'icmpping[10.15.20.50,4,20,24,60]'
    11526:20131027:112207.901 In add_icmpping_item() addr:'10.15.20.50' count:4 interval:20 size:24 timeout:60
    11526:20131027:112207.901 End of add_icmpping_item()
    11526:20131027:112207.901 End of get_pinger_hosts():1
    11526:20131027:112207.901 In process_pinger_hosts()
    11526:20131027:112207.901 In add_pinger_host() addr:'10.15.20.50'
    11526:20131027:112207.901 End of add_pinger_host()
    11526:20131027:112207.901 In do_ping() hosts_count:1
    11526:20131027:112207.901 In process_ping() hosts_count:1
    11526:20131027:112207.901 /tmp/zabbix_server_11526.pinger
    11526:20131027:112207.901 /usr/sbin/fping -q -C4 -p20 -b24 -t60 2>&1 </tmp/zabbix_server_11526.pinger;/usr/sbin/fping6 -q -C4 -p20 -b24 -t60 2>&1 </tmp/zabbix_server_11526.pinger;
    11526:20131027:112207.905 End of process_ping()
    11526:20131027:112207.905 End of do_ping():SUCCEED
    11526:20131027:112207.906 End of process_pinger_hosts()
    11526:20131027:112207.906 icmp pinger #1 spent 0.004909 seconds while processing 1 items



    11526:20131027:112239.917 In substitute_key_macros() data:'icmpping[{IPADDRESS},3,25,56,600]'
    11526:20131027:112239.917 End of substitute_key_macros():SUCCEED data:'icmpping[10.15.20.254,3,25,56,600]'
    11526:20131027:112239.917 In add_icmpping_item() addr:'10.15.20.254' count:3 interval:25 size:56 timeout:600
    11526:20131027:112239.917 End of add_icmpping_item()
    11526:20131027:112239.917 End of get_pinger_hosts():1
    11526:20131027:112239.917 In process_pinger_hosts()
    11526:20131027:112239.918 In add_pinger_host() addr:'10.15.20.254'
    11526:20131027:112239.918 End of add_pinger_host()
    11526:20131027:112239.918 In do_ping() hosts_count:1
    11526:20131027:112239.918 In process_ping() hosts_count:1
    11526:20131027:112239.918 /tmp/zabbix_server_11526.pinger
    11526:20131027:112239.918 /usr/sbin/fping -q -C3 -p25 -b56 -t600 2>&1 </tmp/zabbix_server_11526.pinger;/usr/sbin/fping6 -q -C3 -p25 -b56 -t600 2>&1 </tmp/zabbix_server_11526.pinger;
    11526:20131027:112239.922 End of process_ping()
    11526:20131027:112239.922 End of do_ping():SUCCEED
    11526:20131027:112239.922 End of process_pinger_hosts()
    11526:20131027:112239.922 icmp pinger #1 spent 0.004997 seconds while processing 1 items

    i dont get an access denied message or somthing, and icmpping is still not working, i hope someone can help me.
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    AFAIK fping needs superuser (aka root) privileges.

    For testing, do a "su - zabbix --shell=/bin/bash" and then test "fping <your.ip.addre.ss>"

    Comment

    • Robbin
      Junior Member
      • Oct 2013
      • 4

      #3
      Thank you for your fast reply

      i have tried this is the output:

      [root@zabbix lib]# su - zabbix --shell=/bin/bash
      su: warning: cannot change directory to /var/lib/zabbix: No such file or directory
      -bash-4.1$ fping 10.15.20.50
      10.15.20.50 is alive
      -bash-4.1$

      Comment

      • steveboyson
        Senior Member
        • Jul 2013
        • 582

        #4
        So it seems that the homedir for the zabbix user is not existing.

        (as root):
        mkdir /var/lib/zabbix
        chown zabbix:zabbix /var/lib/zabbix

        Do you use a macro for icmpping's target IP address? Is that set correctly?

        EDIT: don't forget to restart the zabbix_server service as he is responsible for performing the icmpping tests IIRC.
        Last edited by steveboyson; 28-10-2013, 19:04. Reason: addendum.

        Comment

        • Robbin
          Junior Member
          • Oct 2013
          • 4

          #5
          i create the homedirectory for the zabbix user.
          then i restart the zabbix-server service.
          but still no succes.
          For sure i restart the zabbix server, but no succes.

          i use a type: simple check
          and as key: icmpping[10.15.20.254,4,20,24,60]

          when i do a ping from the webinterface of zabbix it works:
          Result of "Ping"
          PING 10.15.20.254 (10.15.20.254) 56(84) bytes of data.
          64 bytes from 10.15.20.254: icmp_seq=1 ttl=64 time=0.741 ms
          64 bytes from 10.15.20.254: icmp_seq=2 ttl=64 time=0.519 ms
          64 bytes from 10.15.20.254: icmp_seq=3 ttl=64 time=0.640 ms

          --- 10.15.20.254 ping statistics ---
          3 packets transmitted, 3 received, 0% packet loss, time 2000ms
          rtt min/avg/max/mdev = 0.519/0.633/0.741/0.093 ms

          Comment

          • Robbin
            Junior Member
            • Oct 2013
            • 4

            #6
            i found the solution in form post: https://www.zabbix.com/forum/showthread.php?t=40523


            Thank you for helping!

            Comment

            Working...