Ad Widget

Collapse

Zabbix 2.0.5 - simple check - icmpping always return 0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lemamar
    Junior Member
    • Apr 2011
    • 8

    #1

    Zabbix 2.0.5 - simple check - icmpping always return 0

    Hi

    I am running a zabbix server 2.0.5 on a CentOS 6.

    I want to try the simple check item and use the ping function to check the availibility of my servers.

    So I have created an item named "test" with type "simple check" and key "icmppingloss".

    The item seems working but it always returns 0 even when the server is shutdowned or up

    fping & fping6 are installed, version 3.4
    I have checked fping and fping6 is executable by user zabbix.

    With a zabbix server, in a debug mode I see the command
    /usr/sbin/fping -q -C3 2>&1 </tmp/zabbix_server_2313.pinger;/usr/sbin/fping6 -q -C3 2>&1 </tmp/zabbix_server_2313.pinger;

    End of get_pinger_hosts():0


    Any ideas? I can't see where the problem is located?

    Regards
    Martin
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    the path to fping is right?

    what is in the /tmp/zabbix_server_2313.pinger ?
    Debian-User

    Sorry for my bad english

    Comment

    • lemamar
      Junior Member
      • Apr 2011
      • 8

      #3
      The path to fping is right.

      "/tmp/zabbix_serverXXX" is used by zabbix server to write data in file like IP or host, and to do multiple ping.

      I see some posts about difference between fping on debian and centos with -S option

      Comment

      • lemamar
        Junior Member
        • Apr 2011
        • 8

        #4
        I found it !
        SELinux (Security-Enhanced Linux) is guilty

        If you disabled it, all is working fine. If you don't want to disable it, use this page http://www.alsigned.ru/?p=2463 (in russian) and this will help you.

        Comment

        • nick0909
          Member
          • Apr 2013
          • 73

          #5
          Looks like I am having the same problem.

          **EDIT**
          I built a new policy and installed it using this link


          First I had to install a selinux tool:
          Code:
          #yum install policycoreutils-python
          Then find the log about what is being violated in selinux in regards to fping:
          Code:
          #cat /var/log/audit/audit.log | grep fping
          Which returned this line
          Code:
          type=AVC msg=audit(1365786073.433:538274): avc:  denied  { read } for  pid=7931 comm="fping" path="/tmp/zabbix_proxy_11458.pinger" dev=dm-0 ino=1438991 scontext=unconfined_u:system_r:ping_t:s0 tcontext=unconfined_u:object_r:initrc_tmp_t:s0 tclass=file
          Using that above link they explain how to use that to create a new policy, I adjusted their commands to match my needs:

          Code:
          #grep fping /var/log/audit/audit.log | audit2allow -M zabbix_fping
          #semodule -i zabbix_fping.pp
          Once I did that I started getting data from fping again.
          Last edited by nick0909; 12-04-2013, 19:18. Reason: found solution

          Comment

          Working...