Ad Widget

Collapse

Multiple Templates for one Host - Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brandy
    Junior Member
    • May 2006
    • 20

    #1

    Multiple Templates for one Host - Problem

    Hi,

    i use zabbix 1.4 and try to link 2 templates to one host. the first one, is the standard solaris template. the second one is a snmp based template.

    if i try to link the snmp template to the host, i get a:

    [ERROR: Conflict between selected templates]

    Can anyone help me?

    cheers brandy
  • brandy
    Junior Member
    • May 2006
    • 20

    #2
    Now it works. But i need to delete the application link from the snmp template to made it work. Without the application link in the second (snmp) template it works.

    But if i add the second template on the host i lost all my application links from the solaris template.

    Is this a bug?


    * Application 'uxapp01:Availability' deleted
    * Application 'uxapp01:CPU' deleted
    * Application 'uxapp01:Filesystem' deleted
    * Application 'uxapp01:General' deleted
    * Application 'uxapp01:Integrity' deleted
    * Application 'uxapp01:Log files' deleted
    * Application 'uxapp01:Memory' deleted
    * Application 'uxapp01:Network' deleted
    * Application 'uxapp01:OS' deleted
    * Application 'uxapp01:Performance' deleted
    * Application 'uxapp01:Processes' deleted
    * Application 'uxapp01:Services' deleted
    * Added new item uxapp01:jvmMemoryHeapFree
    * Added new item uxapp01:jvmMemoryHeapMax
    * Added new item uxapp01:jvmThreadCount

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      Yes, it looks like a bug, however I cannot confirm it yet.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • brandy
        Junior Member
        • May 2006
        • 20

        #4
        try the following steps to reproduce it:

        1.) create a host with the solaris template
        2.) create a new template and create applications for it.
        3.) link items in the new template to the applications.
        4.) try to add the new template to the host with the existing solaris template

        it should give you the linking conflict error.

        if you need any screenshots or information, don't hesidate to write me!

        cheers brandy

        Comment

        • StanZoid
          Member
          • Oct 2005
          • 47

          #5
          I can confirm this one. The application links work when you link a template to a host, but if you link a template where one is already linked, the previous application definitions disappear.

          I have had to unlink all templates to a host and link them back all at the same time to get the applications to assign correctly.

          Stanzoid

          Comment

          • Alexei
            Founder, CEO
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2004
            • 5654

            #6
            The fix (patch) is attached.
            Attached Files
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • btriem
              Member
              • Apr 2006
              • 30

              #7
              patch on 1.4.1

              Did you apply this fix to 1.4.1? I try applying the patch and it gives me a fail at the second hunk at 895. (hosts.inc.php.rej)

              Thanks.

              Comment

              • Alexei
                Founder, CEO
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Sep 2004
                • 5654

                #8
                The patch is already included into 1.4.1. No need to re-apply it.
                Alexei Vladishev
                Creator of Zabbix, Product manager
                New York | Tokyo | Riga
                My Twitter

                Comment

                • btriem
                  Member
                  • Apr 2006
                  • 30

                  #9
                  But I upgraded to 1.4.1 and am still having this same problem. Something I need to know? Rebuild host entry? Remove and add templates?

                  Thanks

                  Comment

                  • rreilly
                    Member
                    • May 2007
                    • 61

                    #10
                    i am also having this problem in 1.4.1...
                    Rob

                    Comment

                    • ddrager
                      Junior Member
                      • Aug 2006
                      • 13

                      #11
                      I too had this problem. I verified that the patch was added to 1.4.1 (it is).

                      This is a hack so I don't know what I am breaking here, but I changed the frontend code and it allowed me to link multiple templates to a host, and it is actively monitoring the items in each template, so it looks like it is working.

                      edit popup.php:

                      change:

                      Code:
                                      if(!validate_templates(array_keys($templates)))
                                      {
                                            show_error_message('Conflict between selected templates');
                                      }
                                      elseif(isset($_REQUEST['select']))
                                      {
                      to:

                      Code:
                                      //if(!validate_templates(array_keys($templates)))
                                      //{
                                      //      show_error_message('Conflict between selected templates');
                                      //}
                                      if(isset($_REQUEST['select']))
                                      {
                      I'll let you guys know if I see any problems with that, which I'd imagine there would be in a few situations, it seems like the function validate_templates needs some reworking.

                      Comment

                      • Alexei
                        Founder, CEO
                        Zabbix Certified Trainer
                        Zabbix Certified SpecialistZabbix Certified Professional
                        • Sep 2004
                        • 5654

                        #12
                        This patch is absolutely incorrect. Apply it if you'd like to get all sorts of problems at some point later.
                        Alexei Vladishev
                        Creator of Zabbix, Product manager
                        New York | Tokyo | Riga
                        My Twitter

                        Comment

                        • ddrager
                          Junior Member
                          • Aug 2006
                          • 13

                          #13
                          Originally posted by Alexei
                          This patch is absolutely incorrect. Apply it if you'd like to get all sorts of problems at some point later.
                          Care to elaborate on the problem so we can write a patch that truely fixes the issue? Or maybe a better description as to what the conflict is so we can correct it. I didnt see any conflicts in my templates (that I know of)

                          Comment

                          • Alexei
                            Founder, CEO
                            Zabbix Certified Trainer
                            Zabbix Certified SpecialistZabbix Certified Professional
                            • Sep 2004
                            • 5654

                            #14
                            There are two possible conflicts between templates linked to a host and ZABBIX checks that:

                            - templates contain items having the same keys
                            - templates contain applications having the same names

                            Otherwise new template can be linked to a host.
                            Alexei Vladishev
                            Creator of Zabbix, Product manager
                            New York | Tokyo | Riga
                            My Twitter

                            Comment

                            • bobrivers
                              Senior Member
                              • Feb 2007
                              • 115

                              #15
                              [1.4.2] Conflict between selected templates

                              Hi,

                              I linked a host to 3 templates: windows, dell poweredge and dell open manage. Everything worked fine.

                              But, the Dell items were not tied with an application. So I created one application called "Dell" and linked it with dell poweredge template. Them I created another application "Dell" and linked it with dell open manage.

                              So, into the monitoring screen, everything was grouped under "Dell".

                              But when I tried to include another host, I received the Conflict between selected templates error message.

                              I thought that the problem was related due to the fact that I used the same name. So I deleted one application (the one that was linked with the power edge template).

                              After that, the error was gone, but the "Dell" application doesn't work anymore. All my items appears as "others"... I tried to update the items, but it seems that I'm not able to use it anymore.

                              Seems that zabbix is reffering to applications as names, not codes.

                              Att.,

                              Bob

                              Comment

                              Working...