summaryrefslogtreecommitdiffstats
path: root/src/zabbix_server/timer/timer.c
diff options
context:
space:
mode:
authorjames_wells <james_wells@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-11-05 03:28:01 +0000
committerjames_wells <james_wells@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-11-05 03:28:01 +0000
commitb08a351860b379d09344887a4aa572be736be9b5 (patch)
tree9f45bfe67fc1f6c4845b10e5094c2ceb0703962f /src/zabbix_server/timer/timer.c
parentd98930885119abd5b9b21c1254d479857681acbb (diff)
downloadzabbix-b08a351860b379d09344887a4aa572be736be9b5.tar.gz
zabbix-b08a351860b379d09344887a4aa572be736be9b5.tar.xz
zabbix-b08a351860b379d09344887a4aa572be736be9b5.zip
Applied MySQL reconnect patch.
zabbix_tmp/src/libs/zbxdbhigh/db.c Applied Multiple Server Patch. zabbix/create/mysql/schema.sql zabbix/create/postgresql/schema.sql zabbix/frontends/php/include/config.inc.php zabbix/frontends/php/include/forms.inc.php zabbix/frontends/php/include/items.inc.php zabbix/frontends/php/include/locales/de_de.inc.php zabbix/frontends/php/include/locales/en_gb.inc.php zabbix/frontends/php/include/locales/fr_fr.inc.php zabbix/frontends/php/include/locales/it_it.inc.php zabbix/frontends/php/include/locales/lv_lv.inc.php zabbix/frontends/php/include/locales/ru_ru.inc.php zabbix/frontends/php/include/locales/sp_sp.inc.php zabbix/frontends/php/items.php zabbix/frontends/php/servers.php zabbix/include/common.h zabbix/misc/conf/zabbix_server.conf zabbix/src/zabbix_server/housekeeper/housekeeper.c zabbix/src/zabbix_server/housekeeper/housekeeper.h zabbix/src/zabbix_server/pinger/pinger.c zabbix/src/zabbix_server/pinger/pinger.h zabbix/src/zabbix_server/poller/poller.c zabbix/src/zabbix_server/poller/poller.h zabbix/src/zabbix_server/server.c zabbix/src/zabbix_server/timer/timer.c zabbix/src/zabbix_server/timer/timer.h zabbix/upgrades/dbpatches/1.1beta2_to_1.1beta3/mysql/patch.sql zabbix/upgrades/dbpatches/1.1beta2_to_1.1beta3/postgresql/patch.sql git-svn-id: svn://svn.zabbix.com/trunk@2277 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/zabbix_server/timer/timer.c')
-rw-r--r--src/zabbix_server/timer/timer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/zabbix_server/timer/timer.c b/src/zabbix_server/timer/timer.c
index 1f8735c2..a73cb6e3 100644
--- a/src/zabbix_server/timer/timer.c
+++ b/src/zabbix_server/timer/timer.c
@@ -45,6 +45,8 @@
extern void update_triggers(int itemid);
+extern int CONFIG_SERVERD_ID;
+
/******************************************************************************
* *
* Function: main_timer_loop *
@@ -81,9 +83,9 @@ void main_timer_loop()
now=time(NULL);
#ifdef HAVE_PGSQL
- snprintf(sql,sizeof(sql)-1,"select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and h.status=%d and i.itemid=f.itemid and f.function in ('nodata','date','dayofweek','time','now') and i.lastclock+f.parameter::text::integer<=%d and i.status=%d", HOST_STATUS_MONITORED, now, ITEM_STATUS_ACTIVE);
+ snprintf(sql,sizeof(sql)-1,"select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and h.status=%d and i.itemid=f.itemid and f.function in ('nodata','date','dayofweek','time','now') and i.lastclock+f.parameter::text::integer<=%d and i.status=%d and i.serverid=%d", HOST_STATUS_MONITORED, now, ITEM_STATUS_ACTIVE,CONFIG_SERVERD_ID);
#else
- snprintf(sql,sizeof(sql)-1,"select distinct f.itemid,f.functionid,f.parameter,f.function from functions f, items i,hosts h where h.hostid=i.hostid and h.status=%d and i.itemid=f.itemid and f.function in ('nodata','date','dayofweek','time','now') and i.lastclock+f.parameter<=%d and i.status=%d", HOST_STATUS_MONITORED, now, ITEM_STATUS_ACTIVE);
+ snprintf(sql,sizeof(sql)-1,"select distinct f.itemid,f.functionid,f.parameter,f.function from functions f, items i,hosts h where h.hostid=i.hostid and h.status=%d and i.itemid=f.itemid and f.function in ('nodata','date','dayofweek','time','now') and i.lastclock+f.parameter<=%d and i.status=%d and i.serverid=%d", HOST_STATUS_MONITORED, now, ITEM_STATUS_ACTIVE,CONFIG_SERVERD_ID);
#endif
result = DBselect(sql);