Ad Widget

Collapse

1.6.1 ICMP ping always returns 0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jmcnulty
    Member
    • Nov 2008
    • 33

    #1

    1.6.1 ICMP ping always returns 0

    I know that setting up icmpping has been covered lots elsewhere, and I've read through doc and postings here and followed the advise. fping has the right permissions:

    -rws--s--- 1 root zabbix 37259 Mar 7 2007 /usr/sbin/fping

    And is set correctly in zabbix_server.conf:

    FpingLocation=/usr/sbin/fping

    I've tried adding the item to a template, and also to an individual system and sure enough, it show up in Monitor->latest data for the node I want to test, but it always returns a value of 0, whether the node is up or down.

    fping works ok from the zabbix account:

    $ sudo su - zabbix
    $ /usr/sbin/fping openvz2
    openvz2 is alive
    $ /usr/sbin/fping openvz2
    ICMP Host Unreachable from 10.131.130.16 for ICMP Echo sent to openvz2 (10.131.130.20)
    ICMP Host Unreachable from 10.131.130.16 for ICMP Echo sent to openvz2 (10.131.130.20)
    ICMP Host Unreachable from 10.131.130.16 for ICMP Echo sent to openvz2 (10.131.130.20)
    openvz2 is unreachable

    If I turn on the telnet service on the remote host and change the simple check key to tcp,23 then it works as it's supposed to.

    Can anyone think what I might be doing wrong? I need to add a lots of dumb systems that don't use telnet, ssh, httpd, etc for me to test against.

    Cheers,

    John
  • Kerrygeek
    Senior Member
    • Dec 2008
    • 115

    #2
    I had this problem last week, maybe it's time for me to pay back for all the help I've needed in the last week or so!

    It sounds like if you're not using Ubuntu or Debian, you'll have a problem with this because Zabbix is trying to use a -S parameter that isn't available in the normal fping. There's a patch to add the -S to fping but I didn't get it to work right (probably my problem, not the patch's problem) but one of the guys in this thread:

    One of the guys there said to change a file and recompile and it started working fine, no sweat, I just had to change it to a lower case "S". I don't know if it broke anything else but pings are working. The ping times (icmppingsec) don't seem to work but I haven't been using them so it's not a problem for now. Look at that thread for the file to edit and see if it helps you, make a backup of the file first just in case.

    Good luck,
    Kerry

    Comment

    • jmcnulty
      Member
      • Nov 2008
      • 33

      #3
      Hi Kerry, well you've definitely paid back as far as I'm concerned, and you hit the nail on the head. Our Zabbix server runs on RHEL 5.2 and sure enough fping doesn't have a -S flag.

      I'll be upgrading from 1.6.1 to 1.6.3 (possibly today) so I'll slot this change in at the same time.

      Many thanks,

      John
      Last edited by jmcnulty; 02-04-2009, 10:12.

      Comment

      • Kerrygeek
        Senior Member
        • Dec 2008
        • 115

        #4
        Glad I could help, I've asked enough questions over the last couple of weeks and I'm probably not done yet! Let me know how your upgrade goes, I'm on 1.6.2 and wouldn't mind doing an upgrade before I let the rest of the department start using Zabbix and I shut down our old monitoring system. So far I'm still adding devices.

        Good luck!
        Kerry

        Edit - I almost forgot, I'm running it on CentOS 5.2 on a dual Xeon server with 4gigs of ram.

        Comment

        • jmcnulty
          Member
          • Nov 2008
          • 33

          #5
          Upgrading to 1.6.1

          ( Whoops: Title should have read upgrading to 1.6.4 )

          Hi.

          Well this morning I did a double upgrade, from 1.6.1 to 1.6.3, only to discover at the end of it 1.6.4 had come out

          I'll quickly list off what I did so you can use that as a reference. Before hand though I will say that the suggested ICMP fping fix of removing the -S flag has not worked for me

          Here are my upgrade steps. Note that I've been keeping multiple versions of the /var/www/html/zabbix php frontend files, and just soft link to the most current:

          Get the kit
          copy to ~zabbix
          change ownership to zabbix:zabbix
          sudo to zabbix
          unpack the kit
          patch src/libs/zbxicmpping/icmpping.c to remove -S
          cd to ~/zabbix-1.6.4
          ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl
          run make

          sudo to root
          stop zabbix_server
          cd /var/www/html
          mkdir zabbix-1.6.4
          cp -r /home/zabbix/zabbix-1.6.4/frontends/php/* zabbix-1.6.4
          ln -s zabbix-1.6.4 zabbix
          cd ~zabbix/zabbix-1.6.4
          make install

          vim /var/www/html/zabbix/include/db.inc.php

          After the <?php line add ...

          $DB_TYPE ="MYSQL";
          $DB_SERVER ="localhost";
          $DB_DATABASE ="zabbix";
          $DB_USER ="root";
          $DB_PASSWORD ="<insert your DB password>";
          $DB_PORT = "10051";

          To save having to go through the installation wizard again do ...

          cp zabbix-1.6.3/conf/zabbix.conf.php zabbix-1.6.4/conf/zabbix.conf.php

          restart httpd
          start zabbix_server

          connect to the Zabbix http page and test.

          I've not added the new indexes to the database yet.
          Last edited by jmcnulty; 06-04-2009, 12:04.

          Comment

          • Kerrygeek
            Senior Member
            • Dec 2008
            • 115

            #6
            Thanks for posting the upgrade instructions, that will be handy when I get ready to upgrade mine. Did you ever find a solution for your ping problem? I've been working on a DNS problem the last couple of days but I'll be back on the job of adding devices to Zabbix today then my next project will be to start figuring out how to tune the database. When I tried adding some lines to the mysql config file last week the database wouldn't start so I left it alone for a while.

            Kerry

            Comment

            • jmcnulty
              Member
              • Nov 2008
              • 33

              #7
              Hi Kerry. Not yet. Had to put it on the back burner for the moment to deal with other priorities. Will come back to it soon though.

              John

              Comment

              Working...