[ZBX-6174] Triggers not displayed in the dashboard when dependent triggers exist but are in disabled state Created: 2013 Jan 24 Updated: 2017 May 30 Resolved: 2014 Oct 06 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.4 |
Fix Version/s: | 2.0.14rc1, 2.2.7rc1, 2.4.1rc2, 2.5.0 |
Type: | Incident report | Priority: | Trivial |
Reporter: | Yuri Gorshkov | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 1 |
Labels: | triggerdependencies | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Linux lemur 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux 5 or so Zabbix 2.0.4 proxies running on CentOS 6.3 x86_64 |
Description |
I spent a lot of time trying to debug the following issue: Suddenly we stopped receiving alerts in the dashboard for hosts in certain subnet (also in a separate Zabbix group, monitored by separate Zabbix proxy). The email notifications worked, though. At the end of a day I discovered by chance that the gateway for this host stopped responding to ICMP pings awhile ago, then I had a theory... It turned out that all of our hosts had a trigger for this host being unreachable, with expression like 'agent.ping.nodata(300). Also that trigger was dependent on a trigger for that hosts's gateway being unreachable. Strangely, when I had this linked to the "Host unreachable" trigger, the alerts for unreachable hosts stopped popping up on the dashboard if the gateway for this host didn't respond to ICMP pings, even if the "gateway unreachable" trigger itself was disabled. |
Comments |
Comment by Aleksandrs Saveljevs [ 2014 Sep 16 ] |
Issue |
Comment by Krists Krigers (Inactive) [ 2014 Sep 17 ] |
(1) Check documentation about fact that event generation for some trigger with disabled dependent triggers is not suppressed in case the trigger changes state. Update documentation if this is missing. martins-v I think this sentence from documentation now reflects it: "It is important to note that events/actions for dependent triggers will not be suppressed if the trigger they depend on is disabled, has disabled item or disabled item host." It should be checked though (see https://www.zabbix.com/documentation/2.4/manual/config/triggers/dependencies). RESOLVED. sasha CLOSED |
Comment by Krists Krigers (Inactive) [ 2014 Sep 18 ] |
Fixed in commit r49145, branch svn://svn.zabbix.com/branches/dev/ZBX-6174 (copy of 2.0). |
Comment by Krists Krigers (Inactive) [ 2014 Sep 18 ] |
(2) No string changes. iivs CLOSED. |
Comment by Krists Krigers (Inactive) [ 2014 Sep 18 ] |
(3) Update API changelog and check documentation. Updated API documentation: Updated API changelog: kristsk RESOLVED. iivs New entries start from top to bottom: https://www.zabbix.com/documentation/2.4/manual/api/changes_2.2_-_2.4?do=diff&rev2[0]=1413297295&rev2[1]=1413357776&difftype=sidebyside CLOSED. |
Comment by Ivo Kurzemnieks [ 2014 Sep 25 ] |
(4) Since it's a fix for 2.0 and supported version of PHP is 5.1.6+, we can't use anonymous functions. We need to come up with a different function. kristsk RESOLVED in r49611. iivs CLOSED. |
Comment by Ivo Kurzemnieks [ 2014 Sep 25 ] |
(5) On PHP side we use variable first and then value, so if (TRIGGER_VALUE_TRUE == $upTriggerValues[$upTriggerId])
change to if ($upTriggerValues[$upTriggerId] == TRIGGER_VALUE_TRUE)
kristsk RESOLVED in r49401. iivs CLOSED. |
Comment by Ivo Kurzemnieks [ 2014 Sep 25 ] |
(6) Probably not necessary to set a separate variable $resultTriggerIdsToUnset. We can unset triggers inside the loop. Same goes for last loop with $disabledTriggerIds. kristsk RESOLVED in r49402. iivs CLOSED. |
Comment by Ivo Kurzemnieks [ 2014 Sep 25 ] |
(7) Let's add few more comments in code, for example what's $upTriggerMap what does it hold, why we gather $upTriggerIds and what's $gatherUpTriggerIds etc. Maybe we could add a page in "How it works" section too. And if it's worth mentioning, that all of this worked before if there was only one trigger dependency and stopped working if trigger was dependent on two triggers. kristsk REOLVED in r49611. Please check https://documentation.zabbix.lan/internal/devel_howitworks/disabled_dependent_triggers. iivs Thanks for detailed explanation! The code is much more understandable now. |
Comment by Ivo Kurzemnieks [ 2014 Sep 25 ] |
(8) Please, fix SQL coding style issues with spacings and dots, like we discussed. kristsk RESOLVED in r49611. iivs Still incorrect. I fixed them in r49691, r49731. Please, review. kristsk Looks better, thanks. CLOSED. |
Comment by Ivo Kurzemnieks [ 2014 Oct 10 ] |
TESTED, |
Comment by Krists Krigers (Inactive) [ 2014 Oct 14 ] |
Issue fixed and merged:
|
Comment by Oleksii Zagorskyi [ 2015 Jan 08 ] |
it caused a regression for 2.0, reported in |