Ad Widget

Collapse

Multiple Templates for one Host - Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • urkle
    Junior Member
    • Jun 2007
    • 14

    #16
    In include/hosts.inc.php around line 1122 in the "validate_templates" function comment out the second check (which is the check for duplicate applications)

    It should look like this..

    Yeah I know it disables the application duplicate check, but as many have found out. things work fine w/ dup applications between templates. and It contradicts Alexei own comment here where he encourages another user to duplicate the application across templates.

    Code:
            function        validate_templates($templateid_list)
            {
                    if(is_numeric($templateid_list))return true;
                    if(!is_array($templateid_list)) return false;
                    if(count($templateid_list)<2)   return true;
    
                    $result = true;
                    $db_cnt = DBfetch(DBselect('select key_,type,count(*) as cnt from items '.
                            ' where hostid in ('.implode(',',$templateid_list).') '.
                            ' group by key_,type order by cnt desc'
                            ));
    
                    $result &= $db_cnt['cnt'] > 1 ? false : true;
    
                    /*$db_cnt = DBfetch(DBselect('select name,count(*) as cnt from applications '. 
                            ' where hostid in ('.implode(',',$templateid_list).') '. 
                            ' group by name order by cnt desc' 
                            )); 
     
                    $result &= $db_cnt['cnt'] > 1 ? false : true;*/
    
                    return $result;
            }

    Comment

    • radamand
      Member
      • Aug 2008
      • 89

      #17
      Im running 1.4.5 and having the same exact problem. I even went thru and dissassociated all applications from one of the templates. It still wont let me link the two templates to the same host.

      Comment

      • pierre-hoffmann
        Senior Member
        • Jan 2008
        • 133

        #18
        Originally posted by radamand
        Im running 1.4.5 and having the same exact problem. I even went thru and dissassociated all applications from one of the templates. It still wont let me link the two templates to the same host.
        Perhaps the two templates contains the same applications name... i've often this problem; i think it's not a bug !
        P.Hoffmann
        System & Network Admin.
        __________________________
        Zabbix version 1.8.1
        Hosts monitored 1300
        OS Novell SLES 10 SP2
        __________________________

        Comment

        • radamand
          Member
          • Aug 2008
          • 89

          #19
          Actually, I think it is, I rebuilt one of the templates with a new name, EXACTLY like the old one. Unlinked both templates from the host, saved, then added the templates back (using the newly created copy), and it worked fine.

          but, either way, i got it to work so..... There's quite a few odd little idiosyncracies in the Zabbix interface, most are fairly minor, but still annoying.

          Comment

          • vrtareg
            Senior Member
            • May 2006
            • 293

            #20
            Hi

            I expecting the same problem.
            I found that this problem caused when I add applications to templates.
            In different templates I add the same applications and try to link these templates to one host.
            I disable check for applications part in hosts.inc.php function validate_templates.

            Version of zabbix: 1.6.

            Areg

            Comment

            • vinny
              Senior Member
              • Jan 2008
              • 145

              #21
              In fact this problem is very old....and very annoying in a prod environment...
              Aly,
              is it possible to get rid of it ?
              -------
              Zabbix 1.8.3, 1200+ Hosts, 40 000+ Items...zabbix's everywhere

              Comment

              • zabbix_es
                Senior Member
                • Apr 2007
                • 153

                #22
                [zabbix-1.6] Any changes about this issue?

                Hello:
                I have also this issue "Error: conflict between selected templates" in version 1.6.
                What about that?
                It's a bug?

                Comment

                • tekknokrat
                  Senior Member
                  • Sep 2008
                  • 140

                  #23
                  imo on the linking of some templates to a host the conflict checking should only check against application id and not the name of the application.
                  For application to work it then should suffice comparing the application name.

                  Comment

                  • bbrendon
                    Senior Member
                    • Sep 2005
                    • 870

                    #24
                    Having this issue with 1.6 build 6439

                    Edit: Fixed. I created a "services" application and had it created in multiple templates. Zabbix didn't like it, though I did.
                    Last edited by bbrendon; 11-12-2008, 00:44.
                    Unofficial Zabbix Expert
                    Blog, Corporate Site

                    Comment

                    • urkle
                      Junior Member
                      • Jun 2007
                      • 14

                      #25
                      Zabbix 1.6.x Patch

                      The issue still exists in the 1.6 releases, and it seems they do not wish to fix it. Here is my previous post with the fix.


                      I've attached my current patch that I'm applying to the 1.6.x releases of zabbix
                      Attached Files

                      Comment

                      • jmcnulty
                        Member
                        • Nov 2008
                        • 33

                        #26
                        You can add my name to the list of people who want to see this functionality. Guess why I'm here, because I just bumped into it as well.

                        This problem seems to have been kicking around for a few years without resolution. Why It's a very logical thing to want to do, to create multiple templates specific to application groups. Seems barking mad that I have to invent unique application names for each template if I want to link them all to the same server.

                        Comment

                        • tekknokrat
                          Senior Member
                          • Sep 2008
                          • 140

                          #27
                          [zabbix-1.6.2]

                          I have this conflict problem appearing although no items/applications are appearing twice.

                          Comment

                          • tekknokrat
                            Senior Member
                            • Sep 2008
                            • 140

                            #28
                            This issue is still keeping me from adding additional templates to a host.

                            The error message that appears:
                            * Template with application [Log Files] already linked to the host

                            The problem is that there are no items configured with the Application Name 'Log Files' in none of the templates i am using here.

                            Comment

                            • richardkraal
                              Junior Member
                              • Jul 2008
                              • 8

                              #29
                              we've got problems to,

                              sometime we use the same items in different templates
                              in some cases we want both templates added to the same host

                              also using the same applications in different templates is a problem
                              this is causing big problems because we can not add new hosts to our monitoring system

                              Comment

                              • urkle
                                Junior Member
                                • Jun 2007
                                • 14

                                #30
                                Originally posted by richardkraal
                                we've got problems to,

                                sometime we use the same items in different templates
                                in some cases we want both templates added to the same host
                                I'd actually see this as a completely different issue than the one in this thread. Since having the same item in multiple templates creates a new set of issues. Mainly which item takes precedent? In other words, which name will be used, which application linkage will be used? Having this scenario creates a lot of ambiguity. It may be worth looking into reworking your templates to move these "common" items into another template.

                                Hmm.. I wonder if create a template with your shared item and linking that tempate to your two other templates would work?

                                ie.
                                host
                                => link Template A
                                => inks to Shared Template Z
                                => link to Template B
                                => inks to Shared Template Z
                                At least then, in theory, Zabbix should know that the item is the SAME as it's linked to the sub-template. However, theory is not reality and I'm not sure if zabbix would pick up on that at the moment. I'd suggest posting a new thread on this topic (since it is different, although related, from this topic)

                                Comment

                                Working...