Announcement

Collapse
No announcement yet.

icmpping

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    icmpping

    I have set up several simple checks for icmpping but i am always getting a 0 result when fping gives results back

    I have fping installed and this can be accesses by the zabbix user

    -rws--x---. 1 root zabbix 27824 May 19 2010 /usr/sbin/fping


    [[email protected] tmp]# su zabbix -c "fping -c 3 -p 100 -b 56 -t 150 monitor.rikrobson.co.uk"
    monitor.rikrobson.co.uk : [0], 84 bytes, 7.19 ms (7.19 avg, 0% loss)
    monitor.rikrobson.co.uk : [1], 84 bytes, 5.08 ms (6.13 avg, 0% loss)
    monitor.rikrobson.co.uk : [2], 84 bytes, 5.13 ms (5.80 avg, 0% loss)

    monitor.rikrobson.co.uk : xmt/rcv/%loss = 3/3/0%, min/avg/max = 5.08/5.80/7.19
    [[email protected] tmp]#

    as you can see this has the correct permissions.

    tmp dir is also accessible by zabbix as you would expect.

    I have a test server set up the same and this just works fine, but i cannot find the problem as they look the same

    I have also tried icmppingsec and icmppingloss, Both return 0.

    This indicates that the problem may be with zabbix communicating with fping


    Does anyone have ant suggestions as to the cause of this problem?

    #2
    I'm having the exact same problem. Here is the output from the zabbix_server.log with DebugLevel=4

    Code:
      2618:20120301:120125.138 In process_ping() hosts_count:1
      2618:20120301:120125.138 /tmp/zabbix_server_pgsql_2618.pinger
      2618:20120301:120125.138 192.168.96.201
      2618:20120301:120125.138 /usr/sbin/fping -q -C3 2>&1 </tmp/zabbix_server_pgsql_2618.pinger;/usr/sbin/fping -q -C3 2>&1 </tmp/zabbix_server_pgsql_2618.pinger;
      2618:20120301:120125.143 End of process_ping()
      2618:20120301:120125.143 End of do_ping():SUCCEED
      2618:20120301:120125.143 In process_values()
      2618:20120301:120125.143 Host [192.168.96.201] cnt=0 rcv=0 min/max/avg=0.000000/0.000000/0.000000
      2618:20120301:120125.143 In process_value()
    And here is a test as the zabbix user from the command line:

    Code:
    -bash-4.1$ whoami
    zabbix
    -bash-4.1$ echo "192.168.96.201" > /tmp/hostname
    -bash-4.1$  /usr/sbin/fping -q -C3 2>&1 </tmp/hostname;/usr/sbin/fping -q -C3 2>&1 </tmp/hostname;
    192.168.96.201 : 0.79 0.16 0.16
    192.168.96.201 : 0.18 0.16 0.11
    I'm guessing the problem is in the parsing of the fping output as I'm getting results when I do it manually but the debug output shows zero values. This is the same when I use icmppingsec.

    I'm using the following environment:

    OS: Centos 6.2 (Final) 32 Bit
    fping: Version 2.4b2_to $Date: 2002/01/16 00:33:42 $
    Zabbix: Version 1.8.10
    Postgres: Version 8.4.9

    Comment


      #3
      the versions for my set up are
      centos 6.2
      zabbix 1.8.10
      fping 2.4b2
      mysql-5.1.61

      basically the latest released centos versions. But on one system its working ant the other not.

      I've not tries debug level 4 yet

      Comment


        #4
        this is definitely something to do with the parsing of the fping output into zabbix.

        on the working system the output of fping is the same as the non working system

        not working:

        [[email protected] /]# echo 212.20.226.130 > /tmp/host
        [[email protected] /]# /usr/sbin/fping -q -C3 2>&1 </tmp/host
        212.20.226.130 : 13.66 13.21 12.94

        [[email protected] richardr]# echo 212.20.226.130 > /tmp/host
        [[email protected] richardr]# /usr/sbin/fping -q -C3 2>&1 </tmp/host
        212.20.226.130 : 10.27 10.44 10.30

        This rules out fping as the culprit

        Comment


          #5
          Confirmed the correct behavior using the Zabbix Virtual Appliance. Exact same config but values are correctly parsed. So it's something specific to CentOS and the Zabbix install would be my guess.

          I also checked the version of zabbix between Appliance and CentOS:
          Code:
          [[email protected] ~]$ /usr/sbin/zabbix_server_pgsql -V
          Zabbix Server v1.8.10 (revision 24303) (28 December 2011)
          Compilation time: Dec 29 2011 12:14:26
          Code:
          [[email protected] ~]$ /usr/sbin/zabbix_server -V
          Zabbix Server v1.8.10 (revision 24303) (28 December 2011)
          Compilation time: Dec 28 2011 11:48:13

          Comment


            #6
            I have two almosty identical centos installs one works and one doesn't. Can't see why one would work and one not. its defo to do with parsing the data

            Comment


              #7
              Check this post (in Russian).
              Same problem. Issue resolved.

              http://translate.google.com/translat...26prmd%3Dimvns


              MrKen
              Disclaimer: All of the above is pure speculation.

              Comment


                #8
                all permissions for fping are correct.

                [[email protected] sbin]# su zabbix
                sh-4.1$ fping 212.20.226.130
                212.20.226.130 is alive
                sh-4.1$ fping -q -C3 212.20.226.130
                212.20.226.130 : 13.33 13.07 12.87
                sh-4.1$ ls -la fping*
                -rws--s---. 1 root zabbix 27824 May 19 2010 fping
                -rws--s---. 1 root zabbix 27856 May 19 2010 fping6
                sh-4.1$


                logs show no data is being passed to zabbix from the fping

                1755:20120305:110854.112 In get_pinger_hosts()
                1755:20120305:110854.112 In DCconfig_get_poller_items() poller_type:3
                1755:20120305:110854.112 End of DCconfig_get_poller_items():1
                1755:20120305:110854.112 In substitute_simple_macros() data:'icmppingsec'
                1755:20120305:110854.112 In add_icmpping_item() addr:'monitor.rikrobson.co.uk' count:3 interval:0 size:0 timeout:0
                1755:20120305:110854.112 End of add_icmpping_item()
                1755:20120305:110854.112 End of get_pinger_hosts():1
                1755:20120305:110854.112 In process_pinger_hosts()
                1755:20120305:110854.112 In add_pinger_host() addr:'monitor.rikrobson.co.uk'
                1755:20120305:110854.112 End of add_pinger_host()
                1755:20120305:110854.112 In do_ping() hosts_count:1
                1755:20120305:110854.112 In process_ping() hosts_count:1
                1755:20120305:110854.113 /tmp/zabbix_server_mysql_1755.pinger
                1755:20120305:110854.113 monitor.rikrobson.co.uk
                1755:20120305:110854.113 /usr/sbin/fping -q -C3 2>&1 </tmp/zabbix_server_mysql_1755.pinger;
                1755:20120305:110854.118 End of process_ping()
                1755:20120305:110854.118 End of do_ping():SUCCEED
                1755:20120305:110854.118 In process_values()
                1755:20120305:110854.118 Host [monitor.rikrobson.co.uk] cnt=0 rcv=0 min/max/avg=0.000000/0.000000/0.000000
                1755:20120305:110854.118 In process_value()


                on an almost identical system that works:

                [[email protected] zabbix]# grep 031010 zabbix_server.log
                32025:20120302:031010.219 read line [212.20.226.130 : 10.74 12.96 11.50]
                32025:20120302:031010.223 read line [fping6: Address family for hostname not supported]
                32025:20120302:031010.227 End of process_ping()
                32025:20120302:031010.227 End of do_ping():SUCCEED
                32025:20120302:031010.227 In process_values()
                32025:20120302:031010.227 Host [212.20.226.130] cnt=3 rcv=3 min/max/avg=0.010740/0.012960/0.011733
                32025:20120302:031010.227 In process_value()
                32025:20120302:031010.227 In calculate_item_nextcheck() itemid:23257 delay:30 flex_intervals:'' now:1330657807
                32025:20120302:031010.227 End of calculate_item_nextcheck() nextcheck:1330657837 delay:30


                [[email protected] zabbix]# ls -la /usr/sbin/fping
                -rws--x--- 1 root zabbix 27824 May 19 2010 /usr/sbin/fping
                [[email protected] zabbix]#
                Last edited by greenlight; 05-03-2012, 13:37. Reason: update information

                Comment


                  #9
                  fresh install of centos 6 and all the latest versions

                  fping works as the zabbix user:

                  [[email protected] ~]# su zabbix -c '/usr/sbin/fping -q -C3 2>&1 </tmp/host'
                  212.20.226.130 : 13.11 13.00 13.11
                  46.105.118.46 : 0.46 0.58 0.46


                  the logs appear to show that the host file is being written and the fping completeing correctly. there is no data parsed back to the server. I am assuming that the host file is being written correctly and can is being read before deletion. not sure how i can fine this out as the file is not in existance for very long


                  these are the logs:

                  19132:20120305:164852.659 In get_pinger_hosts()
                  19132:20120305:164852.659 In DCconfig_get_poller_items() poller_type:3
                  19132:20120305:164852.660 End of DCconfig_get_poller_items():1
                  19132:20120305:164852.660 In substitute_simple_macros() data:'icmppingsec'
                  19132:20120305:164852.660 In add_icmpping_item() addr:'78.129.180.115' count:3 interval:0 size:0 timeout:0
                  19132:20120305:164852.660 End of add_icmpping_item()
                  19132:20120305:164852.660 End of get_pinger_hosts():1
                  19132:20120305:164852.660 In process_pinger_hosts()
                  19132:20120305:164852.660 In add_pinger_host() addr:'78.129.180.115'
                  19132:20120305:164852.660 End of add_pinger_host()
                  19132:20120305:164852.660 In do_ping() hosts_count:1
                  19132:20120305:164852.660 In process_ping() hosts_count:1
                  19132:20120305:164852.660 /tmp/zabbix_server_mysql_19132.pinger
                  19132:20120305:164852.660 78.129.180.115
                  19132:20120305:164852.660 /usr/sbin/fping -q -C3 2>&1 </tmp/zabbix_server_mysql_19132.pinger;/usr/sbin/fping6 -q -C3 2>&1 </tmp/zabbix_server_mysql_19132.pinger;
                  19161:20120305:164852.662 In collect_selfmon_stats()
                  19161:20120305:164852.662 End of collect_selfmon_stats()
                  19161:20120305:164852.662 sleeping for 1 seconds
                  19132:20120305:164852.666 End of process_ping()
                  19132:20120305:164852.666 End of do_ping():SUCCEED
                  19132:20120305:164852.666 In process_values()
                  19132:20120305:164852.666 Host [78.129.180.115] cnt=0 rcv=0 min/max/avg=0.000000/0.000000/0.000000
                  19132:20120305:164852.666 In process_value()
                  19132:20120305:164852.666 In calculate_item_nextcheck() itemid:22162 delay:30 flex_intervals:'' now:1330966132
                  19132:20120305:164852.666 End of calculate_item_nextcheck() nextcheck:1330966162 delay:30
                  19132:20120305:164852.666 End of process_value()
                  19132:20120305:164852.666 End of process_values()
                  19132:20120305:164852.666 End of process_pinger_hosts()
                  19132:20120305:164852.666 icmp pinger #1 spent 0.006978 seconds while processing 1 items

                  Comment


                    #10
                    pinger files in /tmp never created

                    I have 3 proxies - all 1.8.11 and all RHEL 6.2 x86_64.
                    All same config files, except host info.

                    1 has icmpping working - the other 2 are not.

                    I've been through all the threads and I have not found anyone with the solution. Fping permissions, location, ipv6 off, etc all checked.
                    The item config is in a template on the master - used by all 3 proxies.
                    1 works.

                    The only thing I see besides tcpdump not showing even an icmp attempt is:

                    The /tmp/zabbix_proxy_mysql_xxxx.pinger files are never created. That's used as the source for fping, so that explains why there's no icmp traffic, but WHY are those files not being created?

                    Comment


                      #11
                      greenlight ..

                      run this - "watch -d ls /tmp"

                      Ever see the pinger files?
                      Have you solved your problem.

                      Please someone reply. I have never received a reply from anyone here. Would be nice and reassuring.

                      Comment


                        #12
                        SELinux bit me. Fixed

                        Yes. My problem made no sense. It should have been working.
                        When I saw that the tmp pinger files weren't being created - I thought.. how could something be prevented from writing to /tmp?

                        SELinux.

                        setenforce 0

                        edit /etc/sysconfig/selinux - set to disabled

                        I had disabled it at build time on 1 of my proxies, but not the other 2.

                        Working now.

                        Comment


                          #13
                          SELinux Killing icmpping pinger files create

                          Just one more post... If I had looked in /var/log/audit/audit.log on my RHEL 6 proxy .. I would have seen tons of these..

                          type=AVC msg=audit(1334188168.457:60898): avc: denied { read } for pid=28049 comm="fping" path="/tmp/zabbix_proxy_mysql_22688.pinger" dev=sda6 ino=20 scontext=unconfined_u:system_ring_t:s0 tcontext=unconfined_ubject_r:initrc_tmp_t:s0 tclass=file

                          Bummer huh?

                          Comment


                            #14
                            Originally posted by greenlight View Post
                            I have set up several simple checks for icmpping but i am always getting a 0 result when fping gives results back

                            I have fping installed and this can be accesses by the zabbix user

                            -rws--x---. 1 root zabbix 27824 May 19 2010 /usr/sbin/fping


                            [[email protected] tmp]# su zabbix -c "fping -c 3 -p 100 -b 56 -t 150 monitor.rikrobson.co.uk"
                            monitor.rikrobson.co.uk : [0], 84 bytes, 7.19 ms (7.19 avg, 0% loss)
                            monitor.rikrobson.co.uk : [1], 84 bytes, 5.08 ms (6.13 avg, 0% loss)
                            monitor.rikrobson.co.uk : [2], 84 bytes, 5.13 ms (5.80 avg, 0% loss)

                            monitor.rikrobson.co.uk : xmt/rcv/%loss = 3/3/0%, min/avg/max = 5.08/5.80/7.19
                            [[email protected] tmp]#

                            as you can see this has the correct permissions.

                            tmp dir is also accessible by zabbix as you would expect.

                            I have a test server set up the same and this just works fine, but i cannot find the problem as they look the same

                            I have also tried icmppingsec and icmppingloss, Both return 0.

                            This indicates that the problem may be with zabbix communicating with fping


                            Does anyone have ant suggestions as to the cause of this problem?
                            Did you ever figure your problem with this? I'm having the exact same issue in Centos 6.3 and Zabbix 2.0.1.

                            Comment


                              #15
                              There definitely appears to be some sort of parsing issue. I ran this manually and the data is returned properly but never parsed / inserted correctly. I just end up with 0's in the 'latest data' section.

                              Code:
                               [[email protected] ~]$ /usr/sbin/fping -q -C10 -p1000 -t1000 2>&1 </tmp/zabbix_server_31256.pinger
                              96.120.26.249 : 10.79 10.21 10.85 10.21 10.66 9.34 10.28 9.96 14.46 10.55

                              Comment

                              Working...
                              X