From ea43b5989622a03c809ebd2aca8b9ea4e2f5a763 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Sat, 9 Nov 2002 21:54:54 +0000 Subject: - added upgrades/dbpatches/1.0beta6_to_1.0beta7/ with patches (Alexei) - added item type TRAPPER (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@564 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- src/zabbix_sucker/zabbix_sucker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/zabbix_sucker/zabbix_sucker.c b/src/zabbix_sucker/zabbix_sucker.c index 8721ecba..78dd297d 100644 --- a/src/zabbix_sucker/zabbix_sucker.c +++ b/src/zabbix_sucker/zabbix_sucker.c @@ -996,9 +996,9 @@ int main_nodata_loop() now=time(NULL); #ifdef HAVE_PGSQL - sprintf(sql,"select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and (h.status=0 or (h.status=2 and h.disable_until<%d)) and i.itemid=f.itemid and f.function='nodata' and i.lastclock+f.parameter::text::integer<=%d and i.status in (%d,%d) and f.lastvalue<>1", now, now, ITEM_STATUS_ACTIVE, ITEM_STATUS_TRAPPED); + sprintf(sql,"select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and (h.status=0 or (h.status=2 and h.disable_until<%d)) and i.itemid=f.itemid and f.function='nodata' and i.lastclock+f.parameter::text::integer<=%d and i.status=%d and i.type=%d and f.lastvalue<>1", now, now, ITEM_STATUS_ACTIVE, ITEM_TYPE_TRAPPER); #else - sprintf(sql,"select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and (h.status=0 or (h.status=2 and h.disable_until<%d)) and i.itemid=f.itemid and f.function='nodata' and i.lastclock+f.parameter<=%d and i.status in (%d,%d) and f.lastvalue<>1", now, now, ITEM_STATUS_ACTIVE, ITEM_STATUS_TRAPPED); + sprintf(sql,"select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and (h.status=0 or (h.status=2 and h.disable_until<%d)) and i.itemid=f.itemid and f.function='nodata' and i.lastclock+f.parameter<=%d and i.status=%d and i.type=%d and f.lastvalue<>1", now, now, ITEM_STATUS_ACTIVE, ITEM_TYPE_TRAPPER); #endif result = DBselect(sql); -- cgit