Ad Widget

Collapse

Something unclear with Host_Groups and Templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simonquentel
    Member
    • Mar 2013
    • 49

    #1

    Something unclear with Host_Groups and Templates

    Hi everyone,

    I found something which looks like a bug, or at least a misbehaviour.

    I created a template controlling the status of a windows service and I associated this template to a windows server. In my example the service is down.

    Then I created a Host_group with no host in and I added the template to this host_group.

    When i create a map with an icon for this host_group, the icons says "no problem" and by clicking on it I have the whole list of triggers for all servers.

    On the other hand, I also created a map with an icon for an other host_group with the windows server in but where I did not add the template. This time the map says "1 problem" and when I click on the icon I see the trigger corresponding to the service saying it is down.

    Is it normal? I assume the reason is that you need to add the hosts to the host_group but in that case why is there an option to link templates to host_groups directly instead of linking hosts( and therefore their associated templates) to a host_group?

    Regards,
  • simonquentel
    Member
    • Mar 2013
    • 49

    #2
    Something strange about it is also that if you link templates to a host_group and then click on this host_group in the administration panel, then all the templates are shown in the "Hosts in" list.

    Comment

    • Heilig
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Mar 2013
      • 366

      #3
      Judging by the description, I did not see anything strange.
      Which version of zabbix are you using?
      Can you put a screenshot of what you think it's strange?

      Comment

      • simonquentel
        Member
        • Mar 2013
        • 49

        #4
        Let me rephrase:

        Let's say you have 2 applications, hosted on several windows servers, one of them (server_a) used for both application.

        Let's say you have a template (template_1) for the windows servers of application_1 (controlling ping, DB named DB_APP_1 availability, windows service Service_X status and fileSystem D: use) and an other (template_2) for application_2 (controlling ping, DB named DB_APP_2 availability, windows service Service_Y status and fileSystem E: use)

        It is quite logical to want to have two host_groups, one for application_1 and one for application_2.

        It is also logical, when creating a map with host_group for application_1, to want to see only the triggers corresponding to application_1 (controlling ping, DB named DB_APP_1 availability, windows service Service_X status and fileSystem D: use).
        In other words, it is logical to want to link the host_group to the template for application_1 on windows servers rather that the windows hosts fro application_1.

        Zabbix gives the impression to allow to do so but this is not the way it trully works:
        - if I link the template_1 to the host_group and no host (As I would like to do), then on the map when clicking on the host_group I get to all triggers of all host_groups (when I would like to see only the triggers of template_1 for windows hosts of application_1)
        - If I add to the host_group configuration all the windows hosts of application_1, then when clicking on the host_group item on the map, i see all the triggers for the hosts of application_1, including the triggers linked to application_2 for the hosts that host both application (which is certainly not what I want!!!!)

        To my opinion, It is confusing to give the option in zabbix to link templates to a host_group since there is in fact no link when using maps, and it can be really confusing.
        I believe that would be a great feature if we could choose between linking templates to host_groups (meaning that the triggers linked to the host_group are those of the templates for all hosts linked to these templates) and linking hosts.

        Is it clearer?

        Comment

        • Heilig
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Mar 2013
          • 366

          #5
          Now understand.
          It seems to me that at the moment, zabbix is working properly and the problem of the lack of flexibility of settings for the maps - you can specify a single host or a trigger, is not possible to specify a template (your case?), etc.

          I see two options:
          1) create a new feature request in "ZABBIX FEATURE REQUESTS" project into a support to the addition of the necessary functions (check by searching that no such request yet).
          2) create two virtual hosts (application_1 and application_2), on them duplicate the necessary items and triggers from real hosts and display their status on the map.

          Comment

          • simonquentel
            Member
            • Mar 2013
            • 49

            #6
            Hi again,

            what do you mean by "create two virtual hosts".

            If i am not wrong a host must be defined "phycally" by its IP adress right?

            Then what do you mean by duplicate "items"? the item is also linked by the hosts it is linked to right?

            Or do you mean that for a host HOST_A, having 2 applications running (Appl_A and Appl_B), I should create two hosts HOST_A_Appl_A and HOST_A_Appl_B, with the corresponding items/triggers of each application?

            In that case note that this is totally unscalable in the case I have several host where at least 2 applications are hosted ( which is quite common, for instance for database servers)

            On the contrary, having the options of linking templates in host_groups (in a way I explained earlier on, not the way it is done today) would solve this issue.

            regards,

            Simon

            Comment

            • Heilig
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Mar 2013
              • 366

              #7
              Originally posted by simonquentel
              what do you mean by "create two virtual hosts".
              If i am not wrong a host must be defined "phycally" by its IP adress right?
              Yes, in zabbix you can create a "virtual" hosts with duplicate or non-existent IP address (Host name thus should be unique). Then, it is possible to add the required items and triggers.
              Example, I have ApplicationA that runs on 3 servers (web, database and application server) and I want to monitor "overall status", "number of clients" and "queue of orders" for my ApplicationA. Additionally, I want to know the overall status of the Web (Web monitoring), DB (Database monitoring) and application servers (port status, process in memory and errors in log file). In this situation, I create a "virtual" host named ApplicationA on it I create items "overall status", "number of clients" and "queue of orders". Other items I create on appropriate physical servers.
              Then what do you mean by duplicate "items"? the item is also linked by the hosts it is linked to right?
              Yes, in zabbix you can duplicate items.
              Example, there is a physical ServerA and it monitored ItemA. You can create a "virtual" ServerB and item with the type - calculated and formula last("ServerA:ItemA_key"). As a result, on virtual ServerB will be duplicated value ItemA from physical ServerA.
              Or do you mean that for a host HOST_A, having 2 applications running (Appl_A and Appl_B), I should create two hosts HOST_A_Appl_A and HOST_A_Appl_B, with the corresponding items/triggers of each application?
              Yes, under option 2 I mean:
              • creating a virtual hosts with a name similar to applications - ApplicationA, ApplicationB, ApplicationC.
              • duplication of items from physical servers on virtual hosts (for example, on host ApplicationA create the item last("Physical_ServerA:ItemA_key"), last("Physical_ServerB:ItemA_key"), last("Physical_ServerC:ItemA_key")), etc.
              • creating triggers for virtual hosts (in this case, on physical servers create a triggers is not needed).
              • creating maps with virtual hosts ApplicationA, ApplicationB, ApplicationC status.

              Yes, it is laborious process, but in some situations we have to "reinvent the wheel".
              I do not know far as it applies to your situation, I just described zabbix possibilities.

              Comment

              • simonquentel
                Member
                • Mar 2013
                • 49

                #8
                It would definitelly apply for my applications modelization.

                What I can't assess still is how long it would last to duplicate the item but I will try it soon.

                Thank you very much for your help, I'll let you know if it worked.

                Comment

                • simonquentel
                  Member
                  • Mar 2013
                  • 49

                  #9
                  I just performed a few tests and that's exactly what I need apparently.

                  Thanks a lot,

                  Simon

                  Comment

                  Working...