-
Change Request
-
Resolution: Fixed
-
Major
-
None
-
3.2.1
-
Sprint 5
I know that you will probably say that this works as expected but bare with me.
I found a problem that once you have a trigger in a PROBLEM state you can't shake it down to OK using RECOVERY expression as you might expect
Well, in fact that's not enough since PROBLEM expression is also reevaluated as you might see in the zabbix debug log(second to last line here):
15896:20161005:002352.179 In zbx_vc_add_value() itemid:28196 value_type:3 timestamp:1475616232.158567346 15896:20161005:002352.179 End of zbx_vc_add_value():SUCCEED 15896:20161005:002352.179 End of DCmass_add_history() 15896:20161005:002352.179 In DCmass_update_triggers() 15896:20161005:002352.179 In evaluate_expressions() tr_num:1 15896:20161005:002352.179 In substitute_simple_macros() data:'{14779}=1 or {14780}=1' 15896:20161005:002352.179 End substitute_simple_macros() data:'{14779}=1 or {14780}=1' 15896:20161005:002352.180 In substitute_simple_macros() data:'{14779}=0 or {14780}=0' 15896:20161005:002352.180 End substitute_simple_macros() data:'{14779}=0 or {14780}=0' 15896:20161005:002352.180 In substitute_functions() 15896:20161005:002352.180 In zbx_extract_functionids() tr_num:1 15896:20161005:002352.180 End of zbx_extract_functionids() functionids_num:2 15896:20161005:002352.180 In zbx_populate_function_items() functionids_num:2 15896:20161005:002352.180 End of zbx_populate_function_items() ifuncs_num:2 15896:20161005:002352.180 In zbx_evaluate_item_functions() ifuncs_num:2 15896:20161005:002352.180 In evaluate_function() function:'Zabbix server:test.last()' 15896:20161005:002352.180 In evaluate_LAST() 15896:20161005:002352.180 In __get_function_parameter_uint31() parameters:'' Nparam:1 15896:20161005:002352.180 In substitute_simple_macros() data:EMPTY 15896:20161005:002352.180 __get_function_parameter_uint31() flag:1 value:1 15896:20161005:002352.180 End of __get_function_parameter_uint31():SUCCEED 15896:20161005:002352.180 In zbx_vc_get_value_range() itemid:28196 value_type:3 seconds:0 count:1 timestamp:1475616232 15896:20161005:002352.180 End of zbx_vc_get_value_range():SUCCEED count:1 cached:1 15896:20161005:002352.180 End of evaluate_LAST():SUCCEED 15896:20161005:002352.180 End of evaluate_function():SUCCEED value:'0' 15896:20161005:002352.180 In evaluate_function() function:'Zabbix server:agent.ping.last()' 15896:20161005:002352.180 In evaluate_LAST() 15896:20161005:002352.180 In __get_function_parameter_uint31() parameters:'' Nparam:1 15896:20161005:002352.180 In substitute_simple_macros() data:EMPTY 15896:20161005:002352.181 __get_function_parameter_uint31() flag:1 value:1 15896:20161005:002352.181 End of __get_function_parameter_uint31():SUCCEED 15896:20161005:002352.181 In zbx_vc_get_value_range() itemid:28197 value_type:3 seconds:0 count:1 timestamp:1475616232 15896:20161005:002352.181 End of zbx_vc_get_value_range():SUCCEED count:1 cached:1 15896:20161005:002352.181 End of evaluate_LAST():SUCCEED 15896:20161005:002352.181 End of evaluate_function():SUCCEED value:'1' 15896:20161005:002352.181 End of zbx_evaluate_item_functions() 15896:20161005:002352.181 In zbx_substitute_functions_results() ifuncs_num:2 tr_num:1 15896:20161005:002352.181 zbx_substitute_functions_results() expression[0]:'{14779}=1 or {14780}=1' => '0=1 or 1=1' 15896:20161005:002352.181 zbx_substitute_functions_results() recovery_expression[0]:'{14779}=0 or {14780}=0' => '0=0 or 1=0'
I want to suggest that activation of 'Recovery expression' option in trigger configuration screen should assume that
'{TRIGGER.VALUE}=1 and'
appended to recovery expression
and
'{TRIGGER.VALUE}=0 and'
appended to problem expression.
Just as it was in old hysteresis before 3.2
Then you would get expected and easy to predict behaviour from triggers(by EXPECTED I mean that to clear the trigger user expects that recovery expression should be evaluated to TRUE and that should be enough)
with recovery(hysteresis) expressions just like before 3.2, but with advantages:
+ no inverted logic
+ trigger expressions kept simple and compact as possible
- is duplicated by
-
ZBX-12067 nodata() function issue on Zabbix trapper item
- Closed