Ad Widget

Collapse

using templates in beta5 - no triggers?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bbrendon
    Senior Member
    • Sep 2005
    • 870

    #1

    using templates in beta5 - no triggers?

    The main problem i've found so far, is that i can't seem to figure out a way to add tremplated triggers to a new host.

    okay, so I'm adding a new host to zabbix using the gui...

    I goto config -> hosts, enter the information. Although i don't think it matters if you fill this in, i did anyway ...for "use templates of this host", i enter a template that has items and triggers associated to it.

    Then i see the host doesn't have any template items associated to it as expected so i link it to a template. Still nothing. Then I manully add the items from the template to the host. Unfortunately this only adds items, and not triggers.

    Now, can someone tell me how to add triggers from a template to a host?
    Unofficial Zabbix Expert
    Blog, Corporate Site
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Briefly it works like this.

    1. Create a host "template"
    2. Link this host to one on many hosts (for example, "template_linux" and "template_mysql")
    3. When you create a new host, use "template" in "Use templates of this hosts" to have both "template_linux" and "template_mysql" linked to the new host.

    Do not use "template_linux" or "template_mysql" directly! They do not have anything linked. It just makes no sense.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • bbrendon
      Senior Member
      • Sep 2005
      • 870

      #3
      I didn't figure that out, but thanks for the explanation. That did it!
      Unofficial Zabbix Expert
      Blog, Corporate Site

      Comment

      • [cc]smart
        Junior Member
        • May 2005
        • 25

        #4
        Hi.
        I've got the same problem, but i don't understand a single word of the explanation.

        1. Create a host "template"

        Ok, fine. Anything specific ?


        2. Link this host to one on many hosts (for example, "template_linux" and "template_mysql")


        What is linking ?
        I know copying triggers by "add items from template", but this is'nt the idea if i get it right. Is "linking" using templates ? If so, i don't see how you could select more than one template. What does "to one on many" mean then ?



        3. When you create a new host, use "template" in "Use templates of this hosts" to have both "template_linux" and "template_mysql" linked to the new host.

        Ok, advice understood in part one of sentence. Now this would say "link" equals to "use template" what get's me back to previous question. Linking to many ? How ?
        Then, what is different when i use a second level emplate over a first level template ?

        Sorry. But i really don't understand the meaning of the given combination of words.

        Comment

        • sterno
          Junior Member
          • Jan 2006
          • 24

          #5
          It's a little obscure and not entirely intuitive (at least to me), and unfortunately the documentation hasn't caught up to the new functionality. I just figured this out the other day.

          1. Create a new template in the "Hosts" screen. Put it in the templates group and set the status to "template". Do not add any items to this template.

          2. From the drop-down menu at the upper-right, select "Hosts/templates Linkage". You should get an empty screen.

          3. There will be a second row of menus to select a host. Select the template you just created.

          4. In the middle of the page you'll see a box labeled "Template". Pick an existing template with real items, such as "Host.Unix", and click "add linkage". Optionally, add more templates in the same way.

          5. Go back to the hosts screen (top-right menu).

          6. Create a new host for a real machine. In the "use templates of this host" field, select the template you created in step 1.


          The part that I found confusing was the multiple layers of templating required - first you create a template with the things you want to monitor, then you create another template that just links to that, and then you create a real host connected to that second template. You can't directly link a host to that first template, though you can copy all of its items to a host.

          Maybe this could be simplified by defining some naming conventions or other organization for the different types of template....

          Comment

          • sterno
            Junior Member
            • Jan 2006
            • 24

            #6
            I suspect that it's really supposed to work as you describe. However, I've found that no changes I make to the linked template list on an existing host have any effect. It only seems to work when I create a new host. Oh well, maybe in the next beta....

            Comment

            • [cc]smart
              Junior Member
              • May 2005
              • 25

              #7
              I have not actually started playing with it, by for now i'll try to use this thread to start a kind of pseudo wiki style documentation component. I'll call it

              >>

              Best practices: Configuring Hosts

              Hosts are configured in a layered system.

              The lowest is used to define sets of items (probes) and triggers.
              The middle layers are link layers which contain groups and are used to combine 1 or more sets and/or 1 or more lower level groups.
              The topmost layer defines actual hosts combining one or more groups.

              sets

              Sets are of type "template". The items and triggers to combine into a given set are best chosen to allow for optimized combination on the groups layer. The suggested sets are:

              <<

              Here, i want to spawn a discussion about this set. Since the default delivered templates are misleading in the concept of how to configure hosts correctly, they should be replaced by a set such as this. My suggestion is:

              >>

              set.os.basic.common
              set.os.basic.linux
              set.os.basic.windows

              set.storage.scsi.sda

              set.tamper.basic.linux
              set.tamper.basic.windows

              <<

              etc., input welcome

              >>

              groups

              Groups are of type "template". The suggested basic groups are:

              group.linux.basic : set.os.basic.common, set.os.basic.linux, set.tamper.basic.linux
              group.windows.basic : set.os.basic.common,set.os.basic. windows,set.tamper. basic.windows

              hosts

              Hosts should point to a single set and optionally only add specific private items and/or triggers.


              Version 0.1

              Comment

              • bbrendon
                Senior Member
                • Sep 2005
                • 870

                #8
                Originally posted by gyratedotorg
                sterno, im a little bit confused by your post. all of my hosts are linked directly to templates with no problems (ie: i am not using the 'intermediate' templates that you speak of).
                Basically when adding a NEW host, it needs to understand what template linkages to use to autmatically add items, triggers and linkages. Thats why you need to create a template with just linkages and not necessarily items or triggers associated to it. Then when you create a new host, it takes the template with assoicated linkages, adds the links AND adds the associated items/triggers to the new host you're creating.

                Does that help?
                Unofficial Zabbix Expert
                Blog, Corporate Site

                Comment

                • [cc]smart
                  Junior Member
                  • May 2005
                  • 25

                  #9
                  What i don't like with these "links" is that they aren't links. They are reminders to copy. In effect, when i change sth. in a template that has been "linked", except for additions, the changes aren't resembled on items (probes) already copied. Update: Seems to depend on what actually changed. Some things propagate, some don't.

                  A bug seems to be, that if you add another "set" to a link layer template ("group") after this link layer template as been added as a link to a host, the addition is not propagated to the host.

                  Another bug seems to be, that when you add an item (probe) to a set that has previously been linked by a linklayer template, this linklayer template is converted from a template into a monitored object and the item added to it. In contrast to this, triggers seem to work correctly.
                  Last edited by [cc]smart; 09-01-2006, 13:50.

                  Comment

                  • TheFalken
                    Junior Member
                    • Jan 2006
                    • 3

                    #10
                    Originally posted by [cc]smart
                    What i don't like with these "links" is that they aren't links. They are reminders to copy.
                    Very, and the fact that templates aren't really templates is one of the reason's I'm looking at alternatives to Cacti.
                    Templated things must be updated when the template (or links) are.

                    Comment

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

                      #11
                      They ARE real templates! When you modify or delete an item or a trigger in a template, linked hosts get updated. You may have several templates linked to one host if you want even more control and flexibility.
                      Alexei Vladishev
                      Creator of Zabbix, Product manager
                      New York | Tokyo | Riga
                      My Twitter

                      Comment

                      • bbrendon
                        Senior Member
                        • Sep 2005
                        • 870

                        #12
                        Originally posted by TheFalken
                        Very, and the fact that templates aren't really templates is one of the reason's I'm looking at alternatives to Cacti.
                        Templated things must be updated when the template (or links) are.
                        You mean you're looking at Cacti as an alternative to zabbix?

                        Let me tell you, you can't win!! I've used cacti for a long time, and as much as i love it, I use cacti and zabbix. There are really cool features about both products. Long term, I think Zabbix has the capacity to win over Cacti, but I probably won't be Zabbix only till maybe 2.0...

                        I won't comment on the template thing. I just know there are still bugs in the template system, but it is improving. Zabbix 1.1 is still beta.
                        Unofficial Zabbix Expert
                        Blog, Corporate Site

                        Comment

                        • bbrendon
                          Senior Member
                          • Sep 2005
                          • 870

                          #13
                          Originally posted by Alexei
                          They ARE real templates! When you modify or delete an item or a trigger in a template, linked hosts get updated. You may have several templates linked to one host if you want even more control and flexibility.
                          One thing I did notice is that after creating a host, I would like to add say, the mysql application template. It doesn't seem possible to merge the new triggers and items from the mysql application template into an existing host with already linked templates.

                          But i can associate a template to an exisinting host and add items to the template and have them appear in the host.

                          Does this make sense? I'm assuming its in the fix list or I'm missing something.
                          Unofficial Zabbix Expert
                          Blog, Corporate Site

                          Comment

                          • TheFalken
                            Junior Member
                            • Jan 2006
                            • 3

                            #14
                            Originally posted by bbrendon
                            You mean you're looking at Cacti as an alternative to zabbix?
                            Yeah, we currently use Cacti for the graphs and Mon (with an rrd-monitor script) for altering. I'd much prefer a single intergrate point-n-drool system. Nagios, for instance, still requires by-hand edits of text files to add a host.

                            I agree, a few(!) more months and Zabbix may be 'there'.

                            Comment

                            • [cc]smart
                              Junior Member
                              • May 2005
                              • 25

                              #15
                              Originally posted by Alexei
                              They ARE real templates!
                              Pardon ? Then what are the differing IDs in between templates and hosts good for ?


                              Originally posted by Alexei
                              When you modify or delete an item or a trigger in a template, linked hosts get updated.
                              Replace "get updated" with "should get updated" as i've seen it not happen, just was not in the mood to hunt down which cases they really are. In a situation where you emulate templates by trying to keep things in sync by repeating copyies you get into several problems:

                              - You must never forget to do these updates
                              - You must track which Objects really are based on a template, and which have been modified locally. Once they are meant to be real copies, you must remember to stop copying.
                              - All in all, complexity for the program will quickly become higher with copying than with real templates (given you use an API and not SQL directly from your clients).



                              Originally posted by Alexei
                              You may have several templates linked to one host if you want even more control and flexibility.
                              Done that. And as described, there is another issue in that, which also is based on the copying principle. Which is if you add another template on a template used by a host, predefined objects in that template won't appear in the host. Which probably just means that again, copying was forgotten. If they were real templates, this kind of issues wouldn't arise at all.
                              Basically, see issue report earlier in the thread.


                              In effect, without actually checking the DB, i would tend to think based on the external indicators, there is no chance i believe you saying there are real templates at work. In effect, i should probably have a look at that stuff and help get it really done with templates, because in the core principle, collecting <values> instead of states from clients, evaluating them server side and have highly felxible actions and alerting are superior features of Zabbix that can be taken even further in comming evolution steps. So care should be taken that it's not the small things, that take it down despite that. I would really hate that.

                              Comment

                              Working...