diff options
Diffstat (limited to 'src/zabbix_server/alerter')
-rw-r--r-- | src/zabbix_server/alerter/alerter.c | 2 | ||||
-rw-r--r-- | src/zabbix_server/alerter/alerter.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/zabbix_server/alerter/alerter.c b/src/zabbix_server/alerter/alerter.c index 472fba96..7b22b115 100644 --- a/src/zabbix_server/alerter/alerter.c +++ b/src/zabbix_server/alerter/alerter.c @@ -177,7 +177,7 @@ int main_alerter_loop() now = time(NULL); /* zbx_snprintf(sql,sizeof(sql),"select a.alertid,a.mediatypeid,a.sendto,a.subject,a.message,a.status,a.retries,mt.mediatypeid,mt.type,mt.description,mt.smtp_server,mt.smtp_helo,mt.smtp_email,mt.exec_path from alerts a,media_type mt where a.status=0 and a.retries<3 and a.mediatypeid=mt.mediatypeid order by a.clock"); */ - result = DBselect("select a.alertid,a.mediatypeid,a.sendto,a.subject,a.message,a.status,a.retries,mt.mediatypeid,mt.type,mt.description,mt.smtp_server,mt.smtp_helo,mt.smtp_email,mt.exec_path,a.delay,mt.gsm_modem from alerts a,media_type mt where a.status=%d and a.retries<3 and (a.repeats<a.maxrepeats or a.maxrepeats=0) and a.nextcheck<=%d and a.mediatypeid=mt.mediatypeid order by a.clock", ALERT_STATUS_NOT_SENT, now); + result = DBselect("select a.alertid,a.mediatypeid,a.sendto,a.subject,a.message,a.status,a.retries,mt.mediatypeid,mt.type,mt.description,mt.smtp_server,mt.smtp_helo,mt.smtp_email,mt.exec_path,a.delay,mt.gsm_modem from alerts a,media_type mt where a.status=%d and a.retries<3 and (a.repeats<a.maxrepeats or a.maxrepeats=0) and a.nextcheck<=%d and a.mediatypeid=mt.mediatypeid and " ZBX_COND_NODEID " order by a.clock", ALERT_STATUS_NOT_SENT, now, LOCAL_NODE("mt.mediatypeid")); while((row=DBfetch(result))) { diff --git a/src/zabbix_server/alerter/alerter.h b/src/zabbix_server/alerter/alerter.h index 5fba1229..1b2f69d7 100644 --- a/src/zabbix_server/alerter/alerter.h +++ b/src/zabbix_server/alerter/alerter.h @@ -28,6 +28,8 @@ extern char *CONFIG_DBPASSWORD; extern char *CONFIG_DBSOCKET; extern char *CONFIG_ALERT_SCRIPTS_PATH; +extern int CONFIG_NODEID; + extern void signal_handler( int sig ); int main_alerter_loop(); |