Creating templates

In this recipe, we will show you how you can create templates in Zabbix. It's always advised to use templates as much as possible.

Getting ready

For this recipe, we need a Zabbix server and access to the server with a Zabbix administrator or super administrator account.

How to do it ...

  1. From the menu, go to Configuration | Templates.
  2. Click on the Template button on the upper right corner.
  3. In the field Template name, you can write the name of your template, example. PostgreSQL template.
  4. In the box Visible name, you can add a name that will be visible in Zabbix in case that the name of your template is too long or too cryptic for some reason.
  5. In Groups, we will choose the group to which our template belongs. Here we select Templates as group.
  6. In the Description box we can write a note. This can be handy for later if the name of your template is not informative enough to know what you monitor.
  7. Next we click Add to save our templates.
    How to do it ...
  8. From the Configuration | Templates page, we can now see our template in the list of templates.
  9. As you can see each template has the option to add applications, items, triggers, graphs, screens, and so on, just like we had on our hosts.

How it works

Templates are just a collection of items, triggers, applications, and so on, that we can reuse. Instead of creating each item or trigger and so on on every host, we just create a template. Then we make everything in our template and link it to a bunch of hosts so that we can reuse our work.

There's more...

Templates are often used to link servers with the same service or application such as PostgreSQL, Apache, Zabbix agent, Red Hat, Ubuntu, proxies, and so.

Since Zabbix 2.2, web scenarios were added to the template. When you edit a already saved template, you will see some extra buttons at the end of the page. The Update button will, of course, update any changes made. The Clone button will duplicate your template into a new template and copy all entities like triggers, items, and so on inherited from linked templates. The Full clone will do the same as the Clone button but also copy directly attached items, triggers, and so on, from the template to the new template. Delete will obviously delete your template but all items will remain with the host while Delete and clear will remove all items from the linked hosts.

Tip

You cannot link a template to a host, if the template has items that are already on the host as each item on a host has to be unique.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.190.217.134