Ad Widget

Collapse

How to ping an agentless host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zabbixuser85
    Junior Member
    • Sep 2010
    • 13

    #1

    How to ping an agentless host

    Hi folks!

    I seem to be having a problem pinging an agentless host.

    The ping from the dashboard works fine for hosts running an agent but when I try to configure items for those hosts or other devices I get a value of 0 in response or no value whatsoever.

    So far I tried a number of variations of icmpping (type: "simple check") like:

    icmppingsec[192.168.168.6,5,100,50,300,avg] or
    icmppingsec[ , , , , , ] or simply
    icmppingsec

    but to no avail...

    Can someone please point me in the right direction?
    Last edited by zabbixuser85; 19-10-2010, 15:46.
  • alixen
    Senior Member
    • Apr 2006
    • 474

    #2
    Originally posted by zabbixuser85
    Hi folks!

    I seem to be having a problem pinging an agentless host.

    The ping from the dashboard works fine for hosts running an agent but when I try to configure items for those hosts or other devices I get a value of 0 in response or no value whatsoever.
    The dashboard won't do anything by itself.
    You have probably configured your hosts with a template that does an 'agent.ping' and defines a trigger.

    Originally posted by zabbixuser85
    So far I tried a number of variations of icmpping (type: "simple check") like:

    icmppingsec[192.168.168.6,5,100,50,300,avg] or
    icmppingsec[ , , , , , ] or simply
    icmppingsec

    but to no avail...

    Can someone please point me in the right direction?
    icmppingsec and also icmpping, without arguments, are OK.
    You have to define your item and also set a trigger on it if you want to see something on dashboard.

    Regards,
    Alixen
    http://www.alixen.fr/zabbix.html

    Comment

    • zabbixuser85
      Junior Member
      • Sep 2010
      • 13

      #3
      Originally posted by alixen
      You have to define your item and also set a trigger on it if you want to see something on dashboard.
      That I did not know. Pings are coming through now in the dashboard. There is one more issue however. Ping latency is not visible in my graphs - it's basically a flat line with 0 value. I added an item to a host; went into 'latest data' tab and opened the the plot which shows this flat 0 value. It;s the same item I set a trigger on that allows me to ping through the dashboard. Also I fiddled with multiplier (1000) type of information (Numeric(float)) for icmpping...

      Thanks Alixen for your help but still what could be done to fix the graph problem?

      Comment

      • alixen
        Senior Member
        • Apr 2006
        • 474

        #4
        Originally posted by zabbixuser85
        There is one more issue however. Ping latency is not visible in my graphs - it's basically a flat line with 0 value.
        icmpping is basically a logical value 0 = Not OK, 1 = OK
        If you want to measure latency, you have to use icmppingsec.
        You can define an item for icmpping and another for icmppingsec.

        They are described in the manual (http://www.zabbix.com/documentation/...#simple_checks)

        Regards,
        Alixen
        http://www.alixen.fr/zabbix.html

        Comment

        • zabbixuser85
          Junior Member
          • Sep 2010
          • 13

          #5
          Originally posted by alixen
          icmpping is basically a logical value 0 = Not OK, 1 = OK
          If you want to measure latency, you have to use icmppingsec.
          You can define an item for icmpping and another for icmppingsec.

          They are described in the manual (http://www.zabbix.com/documentation/...#simple_checks)

          Regards,
          Alixen
          Alixen, I agree it;s all true. And I mixed them up. Nevertheless, I am still getting a 0 value for icmpping or 100% loss for icmppingloss when trying to reach a host via item creation. Surprisingly, I get proper ping response when I use the dashboard for the same host.

          What is causing this error?

          Here's an example conf for simple ping item:


          Uploaded with ImageShack.us

          Comment

          • alixen
            Senior Member
            • Apr 2006
            • 474

            #6
            Hi,

            You can use icmpping as key. No need of [,,,].
            Also, 1 second update interval seems too aggressive.

            I have attached a screenshot of my icmpping setup.
            I use a 60 s. period and it is working fine.

            If you want smaller update interval, I suggest that you don't go below 5 s.

            Regards,
            Alixen
            Attached Files
            http://www.alixen.fr/zabbix.html

            Comment

            • zabbixuser85
              Junior Member
              • Sep 2010
              • 13

              #7
              Thank you for your quick reply.

              I copied your configuration but still I get nothing; no connectivity (0 value for plain ping or 100% loss for icmppingloss).

              Any other ideas ?

              Comment

              • alixen
                Senior Member
                • Apr 2006
                • 474

                #8
                Hi,

                Originally posted by zabbixuser85
                Thank you for your quick reply.

                I copied your configuration but still I get nothing; no connectivity (0 value for plain ping or 100% loss for icmppingloss).

                Any other ideas ?
                If it is your first use of icmpping, you may have an installation or configuration problem.

                Basically, Zabbix uses fping command for icmpping checks as described in manual (http://www.zabbix.com/documentation/.../zabbix_server).

                Make sure that
                • fping is installed
                • FpingLocation is correct

                If you still have problems, you can search the forum about fping problems, it has been discussed several times.

                Regards,
                Alixen
                http://www.alixen.fr/zabbix.html

                Comment

                • zabbixuser85
                  Junior Member
                  • Sep 2010
                  • 13

                  #9
                  Thanks for replying.

                  I looked up up the fping location:

                  ./usr/bin/fping
                  ./usr/sbin/fping

                  Did the following:

                  shell> chown root:zabbix /usr/sbin/fping
                  shell> chmod 710 /usr/sbin/fping
                  shell> chmod ug+s /usr/sbin/fping

                  Went into zabbix_server.conf and check fping location. Reads:

                  FpingLocation=/usr/sbin/fping


                  Still, can;t do any the pinging. What else could be misconfigured/missing that I can't ping my hosts? Please help...

                  Comment

                  • zabbixuser85
                    Junior Member
                    • Sep 2010
                    • 13

                    #10
                    Problem still remains. I can't seem to get it working. Would appreciate any help/suggestions that anybody might have.

                    Comment

                    • marcel
                      Senior Member
                      Zabbix Certified Specialist
                      • Oct 2010
                      • 112

                      #11
                      What does the server log file say? Make it highly verbose.
                      Zabbix Certified Specialist for Large Environments since 12/2010

                      Comment

                      • zabbixuser85
                        Junior Member
                        • Sep 2010
                        • 13

                        #12
                        I set a higher sensitivity in debug mode and don't see much that tells anything about failing pings. I am getting a whole bunch of errors relating to snmp like:


                        1272:20101026:085228.088 Item [<name of my host>:ifOutOctets.10013] error: Timeout while connecting to [<ip of my host>:161]
                        1272:20101026:085228.153 SNMP Host [<name of my host>]: first network error, wait for 15 seconds
                        and this:

                        1284:20101026:085104.758 Item [<name of my host>:agent.ping] error: Get value from agent failed: *** Cannot connect to [<ip of my host>]:10050 [Connection refused]
                        Although, this is to be expected since I am not running an agent on that host. I am still uncertain what to do. The fping does work when executed via dashboard but fails when done with items. I've read somewhere the fping has a -s option missing but doubt that's the culprit...
                        Last edited by zabbixuser85; 26-10-2010, 09:49.

                        Comment

                        • marcel
                          Senior Member
                          Zabbix Certified Specialist
                          • Oct 2010
                          • 112

                          #13
                          Hmm, try to set the key to icmppingsec and Type of information is Float.

                          Also make sure of this:

                          chmod +s /usr/sbin/fping
                          ls -al /usr/sbin/fping
                          -rwsr-sr-x 1 root root 61887 Oct 8 17:11 /usr/sbin/fping

                          This is the way I have installed fping;

                          http://fping.sourceforge.net/ - 2.4b2

                          ./configure --prefix=/usr
                          make
                          make install

                          vi /etc/opt/zabbix/zabbix_server.conf
                          (line FpingLocation=/usr/sbin/fping
                          Zabbix Certified Specialist for Large Environments since 12/2010

                          Comment

                          • zabbixuser85
                            Junior Member
                            • Sep 2010
                            • 13

                            #14
                            Hey, thanks for replying.

                            Code:
                            Hmm, try to set the key to icmppingsec and Type of information is Float.
                            Done.

                            chmod +s /usr/sbin/fping
                            ls -al /usr/sbin/fping
                            -rwsr-sr-x 1 root root 61887 Oct 8 17:11 /usr/sbin/fping
                            Mine looks like this (went a step ahead and set a full access):

                            -rwsrwsrwx 1 root root 31528 2010-02-02 08:06 /usr/bin/fping
                            Location of fping is:

                            whereis fping
                            fping: /usr/bin/fping /usr/sbin/fping.js /usr/sbin/fping
                            So the location of fping in zabix_server.conf is set to /usr/bin/fping.

                            Went into error log and the response from ping triggered with dashboard shows the results:

                            <IP of my host >: xmt/rcv/%loss = 3/3/0%, min/avg/max = 11.3/14.0/15.7

                            But still nothing from icmpping item...

                            Comment

                            • marcel
                              Senior Member
                              Zabbix Certified Specialist
                              • Oct 2010
                              • 112

                              #15
                              try

                              cat /var/opt/zabbix/zabbix_server.log | grep fping

                              you shoud get smthng like this:


                              25561:20101026:154427.448 /usr/sbin/fping -q -C3 2>&1 </var/opt/zabbix/tmp/zabbix_server_25561.pinger
                              25561:20101026:154437.698 /usr/sbin/fping -q -C3 2>&1 </var/opt/zabbix/tmp/zabbix_server_25561.pinger

                              try to run that command like this:

                              sudo -u zabbix /usr/sbin/fping -q -C3 2>&1 </var/opt/zabbix/tmp/zabbix_server_25561.pinger

                              check the results.

                              Marcel
                              Zabbix Certified Specialist for Large Environments since 12/2010

                              Comment

                              Working...