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!
- duplicates
-
ZBX-7700 Adding templates to hosts is incredibly slow in large environments
- Open