Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-2061

API: linkTemplates() removes currently linked templates, removing history and trends along with it...

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 1.8.1
    • API (A)

      I am using the function linkTemplates() from class.ctemplate.php to add new/remove old templates from my hosts. As far as i can see that's the only way to add or remove templates from a host. However, instead of leaving the templates alone that already exist, they get removed and re-added, removing all stored trends and history along with them, which is very bad! I really hope this shouldn't be the case?

      I opened a host which had several templates attached to it in the web gui on the "Latest data" page. All looked fine. I started the template.linkTemplates API call on that host, providing a list that adds/removes some templates, and also contains a few already-linked ones. While the API call was running, i refreshed the latest data page. All items were gone and started to slowly re-appear.. without any of the trens or history it had before. Very bad mojo!

            Unassigned Unassigned
            verwilst Bart Verwilst
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: