Ad Widget

Collapse

Another icmpping problem!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ewan
    Junior Member
    • Apr 2009
    • 6

    #1

    Another icmpping problem!

    Hello,

    Been using zabbix for about 6 months now and think it's great! We've mostly been focused on agent based monitoring but are starting to branch out to simplechecks and snmp.

    I've read dozens of posts regarding icmpping troubles but still can't get mine to work so I hope someone can help

    For a host I know is up, an icmpping (or icmppingsec) simple check always shows as down (0).

    I'm running zabbix 1.6.4 on RHEL5.2

    Permissions of fping:
    -rwsr-xr-x 1 root zabbix 30312 Apr 16 15:32 /usr/sbin/fping

    fping location in zabbix_server.conf:
    FpingLocation=/usr/sbin/fping

    I have SourceIP set in zabbix_server.conf but I have a patched version of fping that supports -S so that the following command works as the zabbix user:
    [zabbix@sydboas4 ~]$ /usr/sbin/fping -S 'SourceIP' 'HostIP'
    HostIP is alive

    I've upped debugging to 4 and checked the log for any errors but can't find any errors related to icmpping. Below is an example of the only lines relating to the host (i've #ed out the IPs):

    9953:20090604:110229 IP [###.###.###.###]
    9953:20090604:110229 ###.###.###.###
    9953:20090604:110231 Host [###.###.###.###] alive [0] 0.000000 sec.
    9953:20090604:110231 In process_value(icmpping@###.###.###.###)
    9953:20090604:110231 Query [select i.itemid,i.key_,h.host,h.port,i.delay,i.descriptio n,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h .useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.ho stid,h.status,i.value_type,h.errors_from,i.snmp_po rt,i.delta,i.prevorgvalue,i.lastclock,i.units,i.mu ltiplier,i.snmpv3_securityname,i.snmpv3_securityle vel,i.snmpv3_authpassphrase,i.snmpv3_privpassphras e,i.formula,h.available,i.status,i.trapper_hosts,i .logtimefmt,i.valuemapid,i.delay_flex,h.dns,i.para ms,i.trends,h.useipmi,h.ipmi_port,h.ipmi_authtype, h.ipmi_privilege,h.ipmi_username,h.ipmi_password,i .ipmi_sensor,i.lastlogsize from hosts h, items i where mod(h.hostid,30)=2 and h.status=0 and h.hostid=i.hostid and h.proxy_hostid=0 and h.useip=1 and h.ip='###.###.###.###' and i.key_='icmpping' and i.status in (0,3) and i.type=3 and i.nextcheck<=1244109749 and h.hostid between 000000000000000 and 099999999999999]
    9953:20090604:110231 In process_value(icmppingsec@###.###.###.###)
    9953:20090604:110231 Query [select i.itemid,i.key_,h.host,h.port,i.delay,i.descriptio n,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h .useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.ho stid,h.status,i.value_type,h.errors_from,i.snmp_po rt,i.delta,i.prevorgvalue,i.lastclock,i.units,i.mu ltiplier,i.snmpv3_securityname,i.snmpv3_securityle vel,i.snmpv3_authpassphrase,i.snmpv3_privpassphras e,i.formula,h.available,i.status,i.trapper_hosts,i .logtimefmt,i.valuemapid,i.delay_flex,h.dns,i.para ms,i.trends,h.useipmi,h.ipmi_port,h.ipmi_authtype, h.ipmi_privilege,h.ipmi_username,h.ipmi_password,i .ipmi_sensor,i.lastlogsize from hosts h, items i where mod(h.hostid,30)=2 and h.status=0 and h.hostid=i.hostid and h.proxy_hostid=0 and h.useip=1 and h.ip='###.###.###.###' and i.key_='icmppingsec' and i.status in (0,3) and i.type=3 and i.nextcheck<=1244109749 and h.hostid between 000000000000000 and 099999999999999]
    9953:20090604:110232 IP [###.###.###.###]
    9953:20090604:110232 ###.###.###.###
    9953:20090604:110235 Host [###.###.###.###] alive [0] 0.000000 sec.
    9953:20090604:110235 In process_value(icmpping@###.###.###.###)
    9953:20090604:110235 Query [select i.itemid,i.key_,h.host,h.port,i.delay,i.descriptio n,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h .useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.ho stid,h.status,i.value_type,h.errors_from,i.snmp_po rt,i.delta,i.prevorgvalue,i.lastclock,i.units,i.mu ltiplier,i.snmpv3_securityname,i.snmpv3_securityle vel,i.snmpv3_authpassphrase,i.snmpv3_privpassphras e,i.formula,h.available,i.status,i.trapper_hosts,i .logtimefmt,i.valuemapid,i.delay_flex,h.dns,i.para ms,i.trends,h.useipmi,h.ipmi_port,h.ipmi_authtype, h.ipmi_privilege,h.ipmi_username,h.ipmi_password,i .ipmi_sensor,i.lastlogsize from hosts h, items i where mod(h.hostid,30)=2 and h.status=0 and h.hostid=i.hostid and h.proxy_hostid=0 and h.useip=1 and h.ip='###.###.###.###' and i.key_='icmpping' and i.status in (0,3) and i.type=3 and i.nextcheck<=1244109752 and h.hostid between 000000000000000 and 099999999999999]
    9953:20090604:110235 In process_value(icmppingsec@###.###.###.###)
    9953:20090604:110235 Query [select i.itemid,i.key_,h.host,h.port,i.delay,i.descriptio n,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h .useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.ho stid,h.status,i.value_type,h.errors_from,i.snmp_po rt,i.delta,i.prevorgvalue,i.lastclock,i.units,i.mu ltiplier,i.snmpv3_securityname,i.snmpv3_securityle vel,i.snmpv3_authpassphrase,i.snmpv3_privpassphras e,i.formula,h.available,i.status,i.trapper_hosts,i .logtimefmt,i.valuemapid,i.delay_flex,h.dns,i.para ms,i.trends,h.useipmi,h.ipmi_port,h.ipmi_authtype, h.ipmi_privilege,h.ipmi_username,h.ipmi_password,i .ipmi_sensor,i.lastlogsize from hosts h, items i where mod(h.hostid,30)=2 and h.status=0 and h.hostid=i.hostid and h.proxy_hostid=0 and h.useip=1 and h.ip='###.###.###.###' and i.key_='icmppingsec' and i.status in (0,3) and i.type=3 and i.nextcheck<=1244109752 and h.hostid between 000000000000000 and 099999999999999]


    Also, although I am not sure it is related, when doing a ping or traceroute from the webui to any host it returns an error:
    * socket_connect() [<a href='function.socket-connect'>function.socket-connect</a>]: unable to connect [111]: Connection refused[/var/www/html/zabbix-1.6.4/include/scripts.inc.php:76]
    * Cannot connect to ZABBIX server [localhost:10051] [Connection refused]

    TIA for any advice on what to try next!

    Ewan
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    have you tried using fping as zabbix user ?

    i don't think the second problem is related, but can you connect to localhost:10051 (to zabbix server port) ?
    Zabbix 3.0 Network Monitoring book

    Comment

    • ewan
      Junior Member
      • Apr 2009
      • 6

      #3
      thanks richlv

      Yes, fping works as the zabbix user.

      I'm not too worried about the second problem - just thought it might have been related.

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        well, hard to make additional guesses. i'd suggest trying to eliminate possible causes - try restarting zabbix server without source ip option, maybe
        Zabbix 3.0 Network Monitoring book

        Comment

        • ldunston
          Junior Member
          • May 2009
          • 12

          #5
          So I'm having similar issues. fping works as the zabbix user but I can't get icmppingsec to work. I'm able to see the error in the logs however...

          (I've replaced my IP with 'x')

          29061:20090617:162813 In substitute_simple_macros (data:"icmppingsec xx.xx.xx.xx")
          29061:20090617:162813 In get_value(key:icmppingsec xx.xx.xx.xx)
          29061:20090617:162813 In get_value_simple([icmppingsec xx.xx.xx.xx]
          29061:20090617:162813 Sysinfo [net.tcp.service[icmppingsec 204.245.39.97,127.0.0.1]]
          29061:20090617:162813 Simple check [net.tcp.service[icmppingsec 204.245.39.97,127.0.0.1]] is not supported
          29061:20090617:162813 Parameter [icmppingsec xx.xx.xx.xx] is not supported by agent on host [127.0.0.1] Old status [0]

          The agent is configured as icmppingsec xx.xx.xx.xx

          If I change it to icmppingsec, xx.xx.xx.xx I get the following in the logs...

          29061:20090617:163500 In substitute_simple_macros (data:"icmppingsec, xx.xx.xx.xx")
          29061:20090617:163500 In get_value(key:icmppingsec, xx.xx.xx.xx)
          29061:20090617:163500 In get_value_simple([icmppingsec, xx.xx.xx.xx]
          29061:20090617:163500 Port number must be numeric in [icmppingsec, xx.xx.xx.xx]
          29061:20090617:163500 Parameter [icmppingsec, xx.xx.xx.xx] is not supported by agent on host [127.0.0.1] Old status [0]

          I think I'm close but need a little help with the syntax for the check perhaps?

          Thanks,
          Les

          Comment

          • ldunston
            Junior Member
            • May 2009
            • 12

            #6
            OK so I have it working now.

            <rant>
            I like Zabbix a lot and will continue to use it but cannot for the life of me figure out how someone could write a monitoring solution where most basic and simplest check can be this difficult to configure. If there is a better/easier way than what I describe below, I will take back that statement. But for now I can only shake my head.

            My C/C++ is rusty nails but I will attempt to fix this problem.
            </rant>




            The workaround is to write my own externalscript that takes an IP address as an argument and then runs fping and formats the data as result.

            Here are the steps:

            mkdir /etc/zabbix/externalchecks

            chown root:zabbix /etc/zabbix/externalchecks

            vi /etc/zabbix/externalcheck/icmppingsec and paste the following:

            #!/bin/bash
            RESULT=`/usr/sbin/fping -e $2`


            if [ -n "$RESULT" ]; then

            RESULT=`echo $RESULT | cut -f2 -d\( | cut -f1 -d\) | awk '{print $1}'`
            echo "$RESULT"
            else
            echo "No data!"
            fi

            Add an item to the zabbix server with the parameters of the attachment and you should start seeing the response times in milliseconds of the target host.

            Be sure you can run fping as the zabbix user.

            From the docs:

            Run these commands as user ‘root’ in order to setup correct permissions:
            shell> chown root:zabbix /usr/sbin/fping
            shell> chmod 710 /usr/sbin/fping
            shell> chmod ug+s /usr/sbin/fping
            Attached Files

            Comment

            Working...