Ad Widget

Collapse

Ping from PC to Host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zaniwoop
    Senior Member
    • Jan 2010
    • 232

    #1

    Ping from PC to Host

    From my server I can determine the ping delay and ping loss to a PC at site A and to a host at site B.

    I would like to be able to determine the same directly between the PC and the Host.

    To do this I would need the agent on the PC to ping the host and return the values back. The PC is running Windows.

    Any idea how I achieve this?
    Attached Files
  • bashman
    Senior Member
    • Dec 2009
    • 432

    #2
    You can tell Zabbix Agent on your Windows PC to do ping to the host, and Zabbix Server will collect the ping value from your Windows PC.
    978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

    Comment

    • Zaniwoop
      Senior Member
      • Jan 2010
      • 232

      #3
      ok, that's the idea, but you want to be more specific as to how I do this?

      Comment

      • bashman
        Senior Member
        • Dec 2009
        • 432

        #4
        1. Download zabbix agent: http://www.zabbix.com/download.php

        2. Install zabbix agent on your Windows pc.

        3. Add this new host in zabbix gui frontend.

        4. Add an item with key: icmpping[<target>,<packets>,<interval>,<size>,<timeout>], where <target> is your destination host.

        4. Add trigger and action.
        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

        Comment

        • Zaniwoop
          Senior Member
          • Jan 2010
          • 232

          #5
          icmpping and it's derivatives are not supported by the agent.

          Comment

          • bashman
            Senior Member
            • Dec 2009
            • 432

            #6
            Is your agent running on your windows hosts?.

            Try to add this to your zabbix_agentd.conf:

            Code:
            UserParameter=ping[*],/bin/ping -q -c 1 -w 2 $1 > /dev/null; echo $?
            Modify it for windows ping, and if echo returns 0, the destination host is reachable.

            Then add your item with key = ping[x.x.x.x]
            978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

            Comment

            • Zaniwoop
              Senior Member
              • Jan 2010
              • 232

              #7
              I have been trying to simulate the icmppingsec with the following (DOS) command:
              Code:
              UserParameter=test.ping,FOR /F "usebackq skip=11 tokens=6 delims== " %i IN (`ping 10.9.8.7`) DO @echo %i
              Which returns the average response time, but includes the 'ms' suffex, which doesn't go down well as an integer.

              eg. it returns 32ms and not 32

              Any ideas?

              Comment

              • bashman
                Senior Member
                • Dec 2009
                • 432

                #8
                So this means that you can ping from your windows host to destination and that your zabbix agent is running.

                I don't really know why your icmpping item is not supported, it works fine for me.

                You can get the cut command for windows and "cut" the ms from your 32ms value.
                978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                Comment

                • Zaniwoop
                  Senior Member
                  • Jan 2010
                  • 232

                  #9
                  Magic!

                  Code:
                  ping 10.9.8.1 | grep Average | cut -f4 -d"=" | cut -f1 -d"m"

                  Comment

                  Working...