[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
Debian testing
Zabbix server v2.0.4 (revision 31984) (08 December 2012)
Compilation time: Dec 11 2012 18:53:33
mysqld Ver 5.1.58-1 for debian-linux-gnu on x86_64 ((Debian))

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.
Initially I suspected that this was an issue on the proxy, even went so far as to recreate that proxy's DB. No luck. Spent half a day digging thru (other) performance problems with Zabbix, still looking for the mysterious bug. No luck again.
We've thought at the time the bug was affecting every trigger on the host, and couldn't find it.

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.
But what's more strange, we kept receiving email alerts for those unreachable hosts.



 Comments   
Comment by Aleksandrs Saveljevs [ 2014 Sep 16 ]

Issue ZBX-4344 is related.

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:
https://www.zabbix.com/documentation/3.0/manual/api/reference/trigger/get#parameters
https://www.zabbix.com/documentation/2.4/manual/api/reference/trigger/get#parameters
https://www.zabbix.com/documentation/2.2/manual/api/reference/trigger/get#parameters
https://www.zabbix.com/documentation/2.0/manual/appendix/api/trigger/get#parameters

Updated API changelog:
https://www.zabbix.com/documentation/2.4/manual/api/changes_2.2_-_2.4
https://www.zabbix.com/documentation/2.2/manual/api/changes_2.2
https://www.zabbix.com/documentation/2.0/manual/appendix/api/changes_2.0

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
Otherwise, good.

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.
CLOSED.

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,
but don't forget about subissues (1), (3) and review (8)

Comment by Krists Krigers (Inactive) [ 2014 Oct 14 ]

Issue fixed and merged:

  • to 2.0.14rc1 in r49846,
  • to 2.2.7rc1 in r49847,
  • to 2.4.1rc2 in r49851,
  • to 2.5.0 (trunk) in r49861.
Comment by Oleksii Zagorskyi [ 2015 Jan 08 ]

it caused a regression for 2.0, reported in ZBX-9197

Generated at Thu Mar 28 11:10:09 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.