diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | create/mysql/schema.sql | 5 | ||||
-rw-r--r-- | create/postgresql/schema.sql | 4 | ||||
-rw-r--r-- | src/zabbix_server/actions.c | 2 | ||||
-rw-r--r-- | upgrades/dbpatches/1.1beta1_to_1.1beta2/mysql/patch.sql | 4 | ||||
-rw-r--r-- | upgrades/dbpatches/1.1beta1_to_1.1beta2/postgresql/patch.sql | 7 |
6 files changed, 21 insertions, 2 deletions
@@ -1,6 +1,7 @@ Changes for 1.1beta2: - improved support of proc.num[process,<user name>] (Eugene) + - added columns alerts.[triggerid,repeats,maxrepeats,nextcheck,delay] (Alexei) - added columns alerts.[triggerid,repeats,maxrepeats,nextcheck] (Alexei) - fixed compilation issues under FreeBSD (Alexei) - fixed compilation of hstrerror() under misc platforms (Alexei) diff --git a/create/mysql/schema.sql b/create/mysql/schema.sql index 4e57d603..45a86483 100644 --- a/create/mysql/schema.sql +++ b/create/mysql/schema.sql @@ -180,6 +180,11 @@ CREATE TABLE alerts ( status int(4) DEFAULT '0' NOT NULL, retries int(4) DEFAULT '0' NOT NULL, error varchar(128) DEFAULT '' NOT NULL, + repeats int(4) DEFAULT '0' NOT NULL, + maxrepeats int(4) DEFAULT '0' NOT NULL, + nextcheck int(4) DEFAULT '0' NOT NULL, + delay int(4) DEFAULT '0' NOT NULL, + PRIMARY KEY (alertid), INDEX (actionid), KEY clock (clock), diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql index 8e831872..ed291f5e 100644 --- a/create/postgresql/schema.sql +++ b/create/postgresql/schema.sql @@ -250,6 +250,10 @@ CREATE TABLE alerts ( status int4 DEFAULT '0' NOT NULL, retries int4 DEFAULT '0' NOT NULL, error varchar(128) DEFAULT '' NOT NULL, + repeats int4 DEFAULT '0' NOT NULL, + maxrepeats int4 DEFAULT '0' NOT NULL, + nextcheck int4 DEFAULT '0' NOT NULL, + delay int4 DEFAULT '0' NOT NULL, PRIMARY KEY (alertid), FOREIGN KEY (actionid) REFERENCES actions, FOREIGN KEY (triggerid) REFERENCES triggers, diff --git a/src/zabbix_server/actions.c b/src/zabbix_server/actions.c index a04bfccd..1026722d 100644 --- a/src/zabbix_server/actions.c +++ b/src/zabbix_server/actions.c @@ -156,7 +156,7 @@ static void send_to_user_medias(DB_TRIGGER *trigger,DB_ACTION *action, int useri continue; } - DBadd_alert(action->actionid,trigger->triggerid, media.mediatypeid,media.sendto,action->subject,action->message); + DBadd_alert(action->actionid,trigger->triggerid, media.mediatypeid,media.sendto,action->subject,action->message, action->maxrepeats, action->repeatdelay); } DBfree_result(result); } diff --git a/upgrades/dbpatches/1.1beta1_to_1.1beta2/mysql/patch.sql b/upgrades/dbpatches/1.1beta1_to_1.1beta2/mysql/patch.sql index 9f37f9f5..6efe0a18 100644 --- a/upgrades/dbpatches/1.1beta1_to_1.1beta2/mysql/patch.sql +++ b/upgrades/dbpatches/1.1beta1_to_1.1beta2/mysql/patch.sql @@ -11,3 +11,7 @@ CREATE TABLE autoreg ( ) type=InnoDB; alter table alerts add triggerid int(4) DEFAULT '0' NOT NULL after actionid; +alter table alerts add repeats int(4) DEFAULT '0' NOT NULL; +alter table alerts add maxrepeats int(4) DEFAULT '0' NOT NULL; +alter table alerts add nextcheck int(4) DEFAULT '0' NOT NULL; +alter table alerts add delay int(4) DEFAULT '0' NOT NULL; diff --git a/upgrades/dbpatches/1.1beta1_to_1.1beta2/postgresql/patch.sql b/upgrades/dbpatches/1.1beta1_to_1.1beta2/postgresql/patch.sql index 99583350..08efc0c8 100644 --- a/upgrades/dbpatches/1.1beta1_to_1.1beta2/postgresql/patch.sql +++ b/upgrades/dbpatches/1.1beta1_to_1.1beta2/postgresql/patch.sql @@ -10,4 +10,9 @@ CREATE TABLE autoreg ( PRIMARY KEY (id) ); -alter table alerts add triggerid int4 DEFAULT '0' NOT NULL after actionid; +alter table alerts add triggerid int4 DEFAULT '0' NOT NULL after actionid; + +alter table alerts add repeats int4 DEFAULT '0' NOT NULL; +alter table alerts add maxrepeats int4 DEFAULT '0' NOT NULL; +alter table alerts add nextcheck int4 DEFAULT '0' NOT NULL; +alter table alerts add delay int4 DEFAULT '0' NOT NULL; |