summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-11-09 21:54:54 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-11-09 21:54:54 +0000
commitea43b5989622a03c809ebd2aca8b9ea4e2f5a763 (patch)
tree3b2a856ce86ffde8a70e23ccd96baf9b75823fd4 /src
parent12fb9a31a75ce2ba7a3c14fcc90eaf4344a7b437 (diff)
downloadzabbix-ea43b5989622a03c809ebd2aca8b9ea4e2f5a763.tar.gz
zabbix-ea43b5989622a03c809ebd2aca8b9ea4e2f5a763.tar.xz
zabbix-ea43b5989622a03c809ebd2aca8b9ea4e2f5a763.zip
- 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
Diffstat (limited to 'src')
-rw-r--r--src/zabbix_sucker/zabbix_sucker.c4
1 files changed, 2 insertions, 2 deletions
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);