Ad Widget

Collapse

Create Your Own Template: How To

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MrKen
    Senior Member
    • Oct 2008
    • 652

    #1

    Create Your Own Template: How To

    I was asked in another thread how to do this, so I'm posting it here for all to see. (This is for Zabbix 1.6.x)

    Creating a Template

    Go to Configuration -> Hosts -> Templates -> Create Template

    Let's call it MyNewTemplate. Add it to the group 'Templates'. Save

    Go to Configuration -> Items Group = Templates, look for MyNewTemplate. It has no items attached, right?

    For simplicities sake we are going to create a new Linux Template. So select Template_Linux. There are lots of items, but we don't want all of them. Select the box next to:
    Processor load15
    Processor load
    Processor load5
    Host uptime

    Ok, only 4 items, this is just an example.

    At the bottom of the screen, select 'Copy Selected To ...'

    In the next box, select MyNewTemplate, then click Copy.

    Now on Configuration -> Items Group = Templates, select MyNewTemplate. There are now 4 items attached to your template.

    Now in Configuration -> Hosts, Template Linkage, select MyNewTemplate and link it to a host.

    Your New Template now has items that you copied from another template. You can repeat that procedure to add Triggers and Graphs to your new template as well.

    * If you want to create your own items, you can do that too, but this is just a quick walkthrough on creating templates not creating items.

    Importing a Template

    There are many templates on the wiki. When you download a template to your desktop, the next thing is to import it into Zabbix.
    Go to Configuration -> Export/Import -> Import

    Use the 'Browse' button to find the template on your desktop, then click Import. Go to Configuration -> Items Group = Templates, the new imported template should be in the list ready to use. (Refresh if necessary)

    Exporting a Template

    You want to share your new template with everyone, so you need to export it.
    Go to Configuration -> Export/Import -> Export

    First, uncheck all the ticks across the top. Then look for MyNewTemplate and check the box next to the name, items, triggers and graphs (if any).
    At the bottom of the page click on Export. It will be copied in .xml format to your desktop.

    Too Easy!!

    MrKen
    Disclaimer: All of the above is pure speculation.
  • sjbalaji
    Member
    • Aug 2008
    • 33

    #2
    Thankyou very much,
    I will check this and let you know.
    Thanks again

    Comment

    • janb
      Junior Member
      • Aug 2008
      • 2

      #3
      I tried to do the 'copy to' with a trigger from 1 host to the other. It is not working. I ger the message 'missing key'.

      Do I do something wrong, or is this a bug?

      Comment

      • MrKen
        Senior Member
        • Oct 2008
        • 652

        #4
        Hi janb,

        'Missing key' would suggest that you don't have an Item configured with the same key as is in the template.

        A Trigger such as this: {My_Server:vfs.file.cksum[/etc/passwd].diff(0)}>0

        would require an Item with a key such as this: vfs.file.cksum[/etc/passwd]

        MrKen
        Disclaimer: All of the above is pure speculation.

        Comment

        Working...