Ad Widget

Collapse

need help with ping latency in simple check.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • easy_john
    Junior Member
    • Jan 2008
    • 28

    #1

    need help with ping latency in simple check.

    I would like "to add" simply, for the hosts necessary to me, a template in which there would be a check of its availability without the agent established on host.
    I.e. the same as " simple check ".

    Now I am compelled to check the necessary network devices by means of a script from fping, started by the agent, on one of host, transferring it the address of a host.
    It causes inconvenience.

    Whether it is possible to bypass this problem somehow?
    I would like to have statistics on delays up to the necessary host, simply attaching a template to a host.


    PS sorry, machine translation.
    PPS hate situation, when i need talk to another russian speaking people (zabbix autor) in foreign language. is there are somewhere russian support community?
  • Petya
    Member
    • Dec 2007
    • 37

    #2
    1) Create new Template
    2) Create new Item, type "Simple check"
    2.1) description: http
    2.2) key: tcp,80 (tcp,22 -- if you want SSH; icmpping -- if you want ICMP ping, but you'll need fping set up correctly)
    3) Link needed hosts with this new Template

    Create triggers and actions as needed.

    That's it.

    Comment

    • easy_john
      Junior Member
      • Jan 2008
      • 28

      #3
      Originally posted by Petya
      1) Create new Template
      2) Create new Item, type "Simple check"
      2.1) description: http
      2.2) key: tcp,80 (tcp,22 -- if you want SSH; icmpping -- if you want ICMP ping, but you'll need fping set up correctly)
      3) Link needed hosts with this new Template
      Create triggers and actions as needed.
      That's it.
      i have fping binaries, but with this type of simple check i do not have data with latency or %packet loss. what is wrong?

      Comment

      • Petya
        Member
        • Dec 2007
        • 37

        #4
        Enable debug logging in zabbix_server.conf,
        check that Pingers do actually start
        (Pingers variable in zabbix_server.conf)

        `tail -F zabbix_server.log` and try to guess
        what's wrong.

        To simplify debugging you could use this patch
        (it gives you the name of each zabbix_server process
        in `ps -ef` output):



        I had hard times configuring fping with Zabbix also

        Comment

        • fableman
          Member
          • Oct 2007
          • 78

          #5
          the ping function in zabbix you should not use if you looking for real ping times.

          problem with fping and zabbix is that zabbix only send 1 ping to meassure the time. That will result in strange values on some network items.

          some network switches,routers dont priority ICMP (ping) soo one ping from zabbix can give you times around 1000ms when its around 1ms normally.

          Soo use my ping script instead The script will send 5 pings at the speed of 25ms and report back the ave ms soo all peak numbers gets even out.

          Put my script at: /etc/zabbix/externalscripts/


          #!/bin/sh
          tal=`ping -c5 -i0.25 $1 | tail -n 1 | awk '{print $4}'| cut -d/ -f2`
          if [ -z $tal ]
          then
          echo 0
          else
          echo $tal
          fi


          then make triggers to alert if ping times is 0ms or over 300ms for example.

          Good luck.

          Comment

          • efen
            Junior Member
            • Nov 2007
            • 1

            #6
            similar problem with external check for packetloss

            I added
            Host:
            grouped

            IP-adress

            connect to IP-adress
            port80
            status monitored

            Item:
            ext. check
            key: packetloss23.sh[]
            numeric (64bit)
            units:ms
            no multiplier
            update intervall 60
            status: active
            store value as is
            show value as is

            packetloss23.sh:
            #!/bin/bash
            IP=`mysql -b -D zabbix -u zabbix -pxxxx -e "SELECT ip FROM hosts WHERE host='$1' LIMIT 1" | cut -f2 | $
            /bin/ping -q -n -c 23 -w 2 $1 | /bin/grep "packet loss" | /usr/bin/cut -d " " -f 6 | /usr/bin/cut -d "%" -$

            Log:
            ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)
            7610:20080207:162611 server #5 started [Poller. SNMP:ON]
            sh: /etc/zabbix/externalscripts/packetloss23: not found
            7610:20080207:162611 Script /etc/zabbix/externalscripts/packetloss23 returned nothing.
            7625:20080207:162611 server #15 started [Poller for unreachable hosts. SNMP:ON]
            ping: unknown host Test-PacketVerlust
            7606:20080207:162612 Script /etc/zabbix/externalscripts/packetloss23.sh returned nothing.
            7606:20080207:162612 Parameter [packetloss23.sh[]] is not supported by agent on host [Test-PacketVerlust$
            ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)
            ping: unknown host Test-PacketVerlust
            7606:20080207:162613 Script /etc/zabbix/externalscripts/packetloss23.sh returned nothing.

            first it doesnt seem to find to script, then it cant return anything, I dont get it

            Comment

            Working...