summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-06-08 20:31:10 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-06-08 20:31:10 +0000
commitca5e5c13e5471d0e8e984fa0c3786926969c8bb7 (patch)
tree2cdd1fb29153fb8edb51c7fc756ded5df0bf07b7 /include
parenta485607e0910336acb48b076d9d1953721ff80db (diff)
Support of escalations.
git-svn-id: svn://svn.zabbix.com/trunk@1830 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
-rw-r--r--include/db.h11
-rw-r--r--include/functions.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/include/db.h b/include/db.h
index 60638fca..fd92bf50 100644
--- a/include/db.h
+++ b/include/db.h
@@ -52,6 +52,7 @@ extern char *CONFIG_DBSOCKET;
#define DB_FUNCTION struct function_type
#define DB_MEDIA struct media_type
#define DB_MEDIATYPE struct mediatype_type
+#define DB_ESCALATION_RULE struct escalation_rule_type
#define DB_ESCALATION_LOG struct escalation_log_type
#ifdef HAVE_MYSQL
@@ -200,6 +201,16 @@ DB_ALERT
int retries;
};
+DB_ESCALATION_RULE
+{
+ int escalationruleid;
+ int escalationid;
+ int level;
+ char *period;
+ int delay;
+ int actiontype;
+};
+
DB_ESCALATION_LOG
{
int escalationlogid;
diff --git a/include/functions.c b/include/functions.c
index 9e9535d7..19822b86 100644
--- a/include/functions.c
+++ b/include/functions.c
@@ -751,7 +751,7 @@ void apply_actions(DB_TRIGGER *trigger,int alarmid,int trigger_value)
if((escalationid=DBget_default_escalation_id())>0)
{
- snprintf(sql,sizeof(sql)-1,"insert into escalation_log (triggerid,alarmid,escalationid,level,adminlevel,nextcheck,nextcheck) values (%d,%d,%d,%d,%d,%d,%d)", trigger->triggerid, alarmid, escalationid, 0, 0, 0, 0);
+ snprintf(sql,sizeof(sql)-1,"insert into escalation_log (triggerid,alarmid,escalationid,level,adminlevel,nextcheck,status) values (%d,%d,%d,%d,%d,%d,%d)", trigger->triggerid, alarmid, escalationid, 0, 0, 0, 0);
DBexecute(sql);
}
else