Ad Widget

Collapse

How to update the Template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Crypty
    Member
    • Jul 2012
    • 80

    #1

    How to update the Template

    Hi,

    I am using two templates based on the firmware in the watched equipment.

    I have a lot of data captured, but the equipment needs to be upgraded and the template too. I have an updated template, e.g. new_template. The equipment uses an old_template.

    Now... If I unlink and clear the old_template and use the new_template, I lose the data. Is there any way how to change the template but not lose all the data? Because some of the items are the same, but not all of them. And there are many new items. I would like to merge them somehow or ...

    Does anybody have any idea?

    The only way I can see now is to backup the old template and manually add all new values, edit the existing ones, change applications, delete unused ones, ... But that's gonna be pretty exhausting due to many items.

    Thanks!
    Last edited by Crypty; 03-03-2016, 13:34. Reason: Marked as solved.
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by Crypty
    Does anybody have any idea?
    As long as there is no conflicts you can dump to xml new template -> rename in xml file template name to name used by old template -> import xml file.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • Crypty
      Member
      • Jul 2012
      • 80

      #3
      Hi,

      So I've figured it out.

      1st - I unlinked (not cleared) the template from the host
      2nd - I edited one Item due to some item name issue
      3nd - I linked a new updated template to this host
      4th - I deleted all items which were not part of the new template


      So now, I have two templates (based on the current firmware in the unit) and if upgraded, I can also upgrade the template which is used without losing data (data which are supported in the new firmware too).

      (2nd step is just because of an extra issue, but other steps should be possible for other users too)

      Comment

      • Crypty
        Member
        • Jul 2012
        • 80

        #4
        Originally posted by kloczek
        As long as there is no conflicts you can dump to xml new template -> rename in xml file template name to name used by old template -> import xml file.
        Thanks for this also! I tried something like this, but there wre those conflicts... I solved them and could use it, but eventually, it was not "my way". See my previous post.

        Comment

        Working...