ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-1902

can't create trigger dependency if template is linked against another template

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1, 1.9.0 (alpha)
    • Fix Version/s: 1.8.2
    • Component/s: Frontend (F)
    • Labels:
      None

      Description

      have two templates, link one to another. in the upstream template, have two triggers.
      try to make one of the triggers depend on the other :
      "<template name> is not the highest level template"

      it actually is.

        Activity

        Hide
        svenw added a comment - - edited

        i disabled the check completely, and hope i did not break something else. ofcourse i need to make sure manually to only depend highest level triggers...

            • /tmp/triggers.inc.php.orig 2010-02-17 14:31:30.000000000 +0100
            • include/triggers.inc.php 2010-02-17 14:11:47.000000000 +0100
              ***************
            • 1940,1945 ****
            • 1940,1946 ----
              // Deny adding dependency between templates ifthey are not high level templates
              function validate_trigger_dependency($expression, $deps) {
              $result = true;
              + return $result;
              if(!empty($deps)){
              $templates = array();
              $templateids = array();
        Show
        svenw added a comment - - edited i disabled the check completely, and hope i did not break something else. ofcourse i need to make sure manually to only depend highest level triggers... /tmp/triggers.inc.php.orig 2010-02-17 14:31:30.000000000 +0100 include/triggers.inc.php 2010-02-17 14:11:47.000000000 +0100 *************** 1940,1945 **** 1940,1946 ---- // Deny adding dependency between templates ifthey are not high level templates function validate_trigger_dependency($expression, $deps) { $result = true; + return $result; if(!empty($deps)){ $templates = array(); $templateids = array();
        Hide
        richlv added a comment -

        confirming the fix in dev branch rev 10349.

        Show
        richlv added a comment - confirming the fix in dev branch rev 10349.
        Hide
        Alexey Fukalov added a comment -

        branches/1.8 1350

        Show
        Alexey Fukalov added a comment - branches/1.8 1350
        Hide
        Nicolas Van Eenaeme added a comment -

        I'm hitting a similar error with zabbix 1.8.2.

        Here's my situation:

        I have 4 templates: Template_System_Essentials, Template_Mysql_Server, Template_Mysql_Server_50 and Template_Mysql_Server_51. The templates Template_Mysql_Server_50 and Template_Mysql_Server_51 are linked to Template_Mysql_Server.

        Every host has Template_System_Essentials but no templates are linked to it.

        When I want to update a trigger in Template_Mysql_Server and add a dependency on a trigger in Template_System_Essentials, I get the error of "Template_Mysql_Server is not the highest level template".

        So the bug still exists or I'm doing something completely wrong.

        Show
        Nicolas Van Eenaeme added a comment - I'm hitting a similar error with zabbix 1.8.2. Here's my situation: I have 4 templates: Template_System_Essentials, Template_Mysql_Server, Template_Mysql_Server_50 and Template_Mysql_Server_51. The templates Template_Mysql_Server_50 and Template_Mysql_Server_51 are linked to Template_Mysql_Server. Every host has Template_System_Essentials but no templates are linked to it. When I want to update a trigger in Template_Mysql_Server and add a dependency on a trigger in Template_System_Essentials, I get the error of "Template_Mysql_Server is not the highest level template". So the bug still exists or I'm doing something completely wrong.
        Hide
        richlv added a comment -

        two bugs have been found.

        1. link templates t1 and t2 to template t3. try to create dependency from t1 to t2 - this fails. should work.

        2. link template t1 to host h1. create a dependency from t1 to another template (not linked to h1) - this succeeds. should not.

        as for the last comment, i believe issue is caused by attempting to depend to a template that is not available to lower level templates, thus they don't have any trigger to depends on => operation fails.

        Show
        richlv added a comment - two bugs have been found. 1. link templates t1 and t2 to template t3. try to create dependency from t1 to t2 - this fails. should work. 2. link template t1 to host h1. create a dependency from t1 to another template (not linked to h1) - this succeeds. should not. as for the last comment, i believe issue is caused by attempting to depend to a template that is not available to lower level templates, thus they don't have any trigger to depends on => operation fails.
        Hide
        Bart Verwilst added a comment -

        Template_B Template_C

         
         
         
        ----------   -----------
         

        Template_A Template_D

        So you are saying that creating a dep from B to C should work? What the difference between creating one between B and D then? B and C aren't linked to eachother, sharing the same template shouldn't matter, right? ( Having B attached to your host doesn't mean it has C as well )

        Show
        Bart Verwilst added a comment - Template_B Template_C       ----------   -----------   Template_A Template_D So you are saying that creating a dep from B to C should work? What the difference between creating one between B and D then? B and C aren't linked to eachother, sharing the same template shouldn't matter, right? ( Having B attached to your host doesn't mean it has C as well )
        Hide
        Bart Verwilst added a comment -

        Damned, JIRA screws up my pretty ASCII art

        Show
        Bart Verwilst added a comment - Damned, JIRA screws up my pretty ASCII art
        Hide
        richlv added a comment -

        3. it is possible to link templates with identical items to a host from template properties if linking them one by one.
        this is also possible when linking two templates with the same item to the host in one go.
        should not be possible

        Show
        richlv added a comment - 3. it is possible to link templates with identical items to a host from template properties if linking them one by one. this is also possible when linking two templates with the same item to the host in one go. should not be possible
        Hide
        richlv added a comment -

        dev branch rev 11710.

        4. have two templates where a trigger in one depends on trigger in the other. link these to another template.
        unlink these templates.
        link them again - trigger that had the dependency is not properly updated (duplicate is created)

        Show
        richlv added a comment - dev branch rev 11710. 4. have two templates where a trigger in one depends on trigger in the other. link these to another template. unlink these templates. link them again - trigger that had the dependency is not properly updated (duplicate is created)
        Hide
        richlv added a comment -

        turns out it's not caused by the dependency, but a slightly more complex trigger expression.
        currently one that causes the problem : "((

        {t_circlink3:a.last(0)}

        >0)&(

        {t_circlink3:a.nodata(60)}

        =0))"

        Show
        richlv added a comment - turns out it's not caused by the dependency, but a slightly more complex trigger expression. currently one that causes the problem : "(( {t_circlink3:a.last(0)} >0)&( {t_circlink3:a.nodata(60)} =0))"
        Hide
        richlv added a comment -

        confirming the fix for problems 1-4 in dev branch rev 11730...

        Show
        richlv added a comment - confirming the fix for problems 1-4 in dev branch rev 11730...
        Hide
        Alexey Fukalov added a comment -

        branches/1.8 11736

        Show
        Alexey Fukalov added a comment - branches/1.8 11736

          People

          • Assignee:
            Alexey Fukalov
            Reporter:
            richlv
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: