summaryrefslogtreecommitdiffstats
path: root/src/libs/zbxdbhigh
diff options
context:
space:
mode:
authoralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-05-04 10:40:27 +0000
committeralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-05-04 10:40:27 +0000
commit8d742b5d3b4964adcd231f91172f0f0aca2a37ec (patch)
tree89df462eca7792aa7342edb51ab1346121480b7f /src/libs/zbxdbhigh
parent81e8c026e359c23a7ffa2091542cf58fe44b7b66 (diff)
downloadzabbix-8d742b5d3b4964adcd231f91172f0f0aca2a37ec.tar.gz
zabbix-8d742b5d3b4964adcd231f91172f0f0aca2a37ec.tar.xz
zabbix-8d742b5d3b4964adcd231f91172f0f0aca2a37ec.zip
- fixed generation of events for unknown status of triggers (Alexei)
- fixed processing of trigger statuses (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@4092 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs/zbxdbhigh')
-rw-r--r--src/libs/zbxdbhigh/db.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c
index 33cbecd8..3b447dcb 100644
--- a/src/libs/zbxdbhigh/db.c
+++ b/src/libs/zbxdbhigh/db.c
@@ -468,14 +468,23 @@ int DBupdate_trigger_value(DB_TRIGGER *trigger, int new_value, int now, char *re
/* The lastest event has the same status, do not generate new one */
if(event_last_status != new_value)
{
- if( ((trigger->value == TRIGGER_VALUE_TRUE) && (new_value == TRIGGER_VALUE_FALSE)) ||
+/* if( ((trigger->value == TRIGGER_VALUE_TRUE) && (new_value == TRIGGER_VALUE_FALSE)) ||
((trigger->value == TRIGGER_VALUE_FALSE) && (new_value == TRIGGER_VALUE_TRUE)) ||
((event_last_status == TRIGGER_VALUE_FALSE) && (trigger->value == TRIGGER_VALUE_UNKNOWN) && (new_value == TRIGGER_VALUE_TRUE)) ||
((event_last_status == TRIGGER_VALUE_TRUE) && (trigger->value == TRIGGER_VALUE_UNKNOWN) && (new_value == TRIGGER_VALUE_FALSE)) ||
((event_prev_status == TRIGGER_VALUE_UNKNOWN) && (event_last_status == TRIGGER_VALUE_UNKNOWN) && (trigger->value == TRIGGER_VALUE_UNKNOWN) && (new_value == TRIGGER_VALUE_TRUE)) ||
((event_prev_status == TRIGGER_VALUE_FALSE) && (event_last_status == TRIGGER_VALUE_UNKNOWN) && (trigger->value == TRIGGER_VALUE_UNKNOWN) && (new_value == TRIGGER_VALUE_TRUE)) ||
((event_prev_status == TRIGGER_VALUE_TRUE) && (event_last_status == TRIGGER_VALUE_UNKNOWN) && (trigger->value == TRIGGER_VALUE_UNKNOWN) && (new_value == TRIGGER_VALUE_FALSE))
- )
+ )*/
+
+ /* Generate also UNKNOWN events, We are not interested in prev trigger value here. */
+ if(event_last_status != new_value)
+/* if( ((event_last_status == TRIGGER_VALUE_FALSE) && (new_value != TRIGGER_VALUE_FALSE)) ||
+ ((event_last_status == TRIGGER_VALUE_TRUE) && (new_value != TRIGGER_VALUE_TRUE)) ||
+ ((event_prev_status == TRIGGER_VALUE_UNKNOWN) && (event_last_status == TRIGGER_VALUE_UNKNOWN) && (new_value != TRIGGER_VALUE_UNKNOWN)) ||
+ ((event_prev_status == TRIGGER_VALUE_FALSE) && (event_last_status == TRIGGER_VALUE_UNKNOWN) &&(new_value == TRIGGER_VALUE_TRUE)) ||
+ ((event_prev_status == TRIGGER_VALUE_TRUE) && (event_last_status == TRIGGER_VALUE_UNKNOWN) && (trigger->value == TRIGGER_VALUE_UNKNOWN) && (new_value == TRIGGER_VALUE_FALSE))
+ )*/
{
/* Preparing event for processing */
memset(&event,0,sizeof(DB_EVENT));