Ad Widget

Collapse

Why hostgroup has "Templates" ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MaximVeksler
    Junior Member
    • Jun 2011
    • 9

    #1

    Why hostgroup has "Templates" ?

    Hello,

    New to Zabbix trying to understand the modeling.

    Looking at a fresh 1.8.2 install on Ubuntu I see that in the web UI under Configuration > Host Groups I see that each hostgroup can optionally have Templates associated with it, in fact the hostgroup that called "Templates" has 42 templates associated with it - Why?

    I think some clearing up could prove to valuable here... let me describe what I understand a host, hostgroup and template; Please correct me if I'm wrong.

    Host is a machine on the network that is being monitored for various items.
    HostGroup is a logical grouping of hosts, to allow graphing and co. on the host group level (think a cluster of web servers...)
    Template is a predefined collection of items to be collected about a host.

    so following this logic, why a hostgroup has templates? The only rational I can think of is that if in creation a host is being added to a hostgroup that all templates associated with this hostgroup apply to the host, i.e. a template association with a hostgroup only affects hosts that are being created under this hostgroup and only takes action during host adding procedures.

    Would appreciate comments on this, to make sure I'm on the right path. I'm planning to integrate zabbix into our EC2 based environment; In which case hosts will be added / removed dynamically plus host groups will be created dynamically using the python API, based on the security groups under which the instance has been launched with.

    Maxim.
  • ghoz
    Senior Member
    • May 2011
    • 204

    #2
    Hi

    A hostgroup is just a way to group hosts or templates in orger to organize a bit your configuration .

    You can apply a template to a host in order to generate items/triggers/graphs for your host .

    You can group hosts in hostgroups to somehow organize the views and searching for data / graphs

    You can group templates to find them easily in the gui. On my setup, I moved all the unused tempaltes in a _unused_templates group, that way i can find the templates i use quickly, and keep the old ones for reference.

    the way you see hostgroup make me think you come from a nagios background. in zabbix, you have to play with templates and hiearchy of templates, the hostgroups are only cosmetical as far as i saw...

    Comment

    • MaximVeksler
      Junior Member
      • Jun 2011
      • 9

      #3
      Hey ghoz, thanks for the reply.

      So you say templates can form an hierarchy where for example I can have all my templates inherit from Template_Linux ? If so how do I do that, because I haven't found an option for this in the UI / API for Template.

      Oh and I'm not coming from anywhere, I've played with ganglia a bit but nothing profound, never touched nagios beyond basic reading. We're a startup so we get all try all new things. Now it's zabbix's turn

      Comment

      • ghoz
        Senior Member
        • May 2011
        • 204

        #4
        when editing a template , you have a "link with template" at the botom.. at least on 1.8.5

        the way i use it is a low level template (with pings) an OS specific template linked to the lowlevel one,
        and independant templates by application.
        Some people prefer to include theses in the hierarchy, i find it simpler to keep them separate, as the servers i'm monitoring don't have the same configuration.

        If you have a farm of webservers with the same apps running on top, it make sense to create a template_linux_apache_tomcat_myapp template...

        In my setup a host hast multiple templates associated... T_OS_Linux and T_app_mysql for instance...

        One thing to watch for is that you cant have a host linked to multiple templates that have the same items either directly or throu hierarchy...

        Another thing I haven't played with yet is using Macros at the template level. That way you're supposed to be able to setup generic templates with default values for triggers , and more specific templates that depend on them, having different trigers values for instance...
        Last edited by ghoz; 03-06-2011, 15:10. Reason: added zabbix version

        Comment

        • MaximVeksler
          Junior Member
          • Jun 2011
          • 9

          #5
          Your reply is awesome and I will be trying your suggestions.

          We don't have "machine types", we are running on AWS and taming Zabbix to work in a dynamic environment... I already have hosts that on first boot add host groups to zabbix server if they don't exists (based on instance security groups) and then having the host add it self to the zabbix server to be monitored. All the EC2 instances are auto deployed, based on the same base ami (vm machine image) to which we pass startup parameters describing what application to install once the instance comes to live so yeah, having several templates for "functionality types" sounds a very good idea to me. This AWS setup is pretty cool and zabbix seems to fit perfectly.

          Thanks for your reply, I will be testing all of your suggestions.
          Maxim.
          Last edited by MaximVeksler; 03-06-2011, 16:13.

          Comment

          Working...