Ad Widget

Collapse

Server queries fetching no results

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amit_kej
    Junior Member
    • Jan 2009
    • 1

    #1

    Server queries fetching no results

    Hi

    I configured ZabbixServer, ZabbixAgentd and ZabbixFrontend. But the ZabbixFrontend is not showing any results from any ZabbixAgentd that I configured.

    I explored zabbix_server.log file in debug mode and found these types of queries there.
    Code:
    select i.itemid,  i.key_, h.host,h.port, i.delay,i.description,i.nextcheck, i.type, i.snmp_community, i.snmp_oid,h. useip,h.ip, i.history, i.lastvalue, i.prevvalue, i.hostid, h.status, i.value_type, h.errors_from, i.snmp_port,i.delta, i.prevorgvalue, i.lastclock, i.units, i.multiplier, i.snmpv3_securityname, i.snmpv3_securitylevel, i.snmpv3_authpassphrase, i.snmpv3_privpassphrase, i.formula,h.available, i.status,i.trapper_hosts,i.logtimefmt,i.valuemapid,i.delay_flex,h.dns,i.params,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 i.status in (0) and i.type not in (2,7,9,12) and h.status=0 and h.disable_until<=1233061201 and h.errors_from=0 and h.hostid=i.hostid and (h.proxy_hostid=0 or i.type in (5)) and mod(i.itemid,5)=2 and i.key_ not in ('status','icmpping','icmppingsec','zabbix[log]') and h.hostid between 000000000000000 and 099999999999999 order by i.nextcheck
    Mysql returned no result on directly executing the query. By exploring the hosts.hostid column I found all the values in this column are 15 digits in length. But the query is having the condition (h.hostid between 000000000000000 and 099999999999999 ) i.e. it should be less than a 15 digit number.

    Only to see its effect, I executed these two queries
    Code:
    update hosts set hostid=mod(hostid,1001000000)+10010000000000;
    update items set hostid=mod(hostid,1001000000)+10010000000000;
    This reduced the length of hosts.hostid values from 15 to 14 digits. The query started fetching results and the server could log the agents response in its database.

    But then the Hosts and LatestData stopped showing any hosts.

    So I executed the reciprocal to the given update query and the original values came back in hosts.hostid and items.hostid. Both the Hosts and LatestData tab started showing some data that Server have collected during this small period.

    But the server is again logging no new data.

    Please provide some clue on how to fix this problem.

    Thanks
Working...