[ZBX-6749] Boolean expression are not always evaluated correctly Created: 2013 Jun 26 Updated: 2017 May 30 Resolved: 2013 Aug 20 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.6 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Ilya I. | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | evaluation, triggerfunctions | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
I have this trigger for "host unreachable" alerts. {Template_Linux:agent.ping.max(300)}=0 | {Template_Linux:agent.ping.nodata(300)}When agent is down, it says "Evaluation failed for function agent.ping.max" (and the state is OK). But it doesn't matter what agent.ping.max returns if agent.ping.nodata returns 1. The result will always be 1 in that case. |
Comments |
Comment by Alexei Vladishev [ 2013 Jul 17 ] |
That's because Zabbix is unable to evaluate agent.ping.max(300) since there is no data in the database. Change order of the conditions to make it work: {Template_Linux:agent.ping.nodata(300)}| {Template_Linux:agent.ping.max(300)}=0 |
Comment by Ilya I. [ 2013 Jul 17 ] |
I tried changing, it didn't help. That's the issue. For the record, this is what I resorted to, works fine: {Template_Linux:agent.ping.count(300,1)}=0 | {Template_Linux:agent.ping.nodata(300)} |
Comment by Alexander Vladishev [ 2013 Aug 20 ] |
Hi, Аll trigger functions shall be evaluated without errors. Otherwise the status of the trigger becomes UNKNOWN. I'm closing the issue. |
Comment by richlv [ 2013 Aug 20 ] |
also, why would you do it in such a convoluted way ? just use nodata(300) |
Comment by Ilya I. [ 2013 Aug 20 ] |
>Аll trigger functions shall be evaluated without errors. Otherwise the status of the trigger becomes UNKNOWN. >also, why would you do it in such a convoluted way? agent.ping can only return 1, so checking that 'max' = 0 would never work at all. |
Comment by Alexander Vladishev [ 2013 Aug 21 ] |
Тhe trigger never to return to OK state if one function can't be evaluated. 1. {<evaluation failed>}=0 | 1 <-- trigger in PROBLEM state (it is logical)2. {<evaluation failed>} =0 | 0 <-- Zabbix shall consider result of the first function, but can't |
Comment by Ilya I. [ 2013 Aug 21 ] |
1. It would be logical if it was so. But it isn't. Trigger doesn't flip to PROBLEM. There's no alert sent. |