[ZBX-14997] Applying new templates erased the data on existing screens Created: 2018 Oct 11 Updated: 2018 Nov 06 Resolved: 2018 Nov 06 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A), Frontend (F), Templates (T) |
Affects Version/s: | 3.4.13 |
Fix Version/s: | None |
Type: | Documentation task | Priority: | Minor |
Reporter: | Yordan Palikov | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | Screen | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() |
Description |
Hello all, After applying new templates on the hosts which we are monitoring, all the existing data on the screens created for performance tracking of different VMs was erased. It's a pity cause we put in so much effort to create every single screen for every host manually. Could you please advise how can we re-populate the missing data? Could this be automatically proceeded with a script? Thanks in advance! Kind regards, |
Comments |
Comment by Aigars Kadikis [ 2018 Oct 12 ] |
Hello, Yordan, Are you aware what does the checkbox "Dynamic item" do when you design a screen? This practically means if one template gets applied to multiple hosts it may be possible that we can create one screen, create multiple graphs and later you can do a graph overview across all hosts just because we got a similar item set from a particular template. Kind regards, |
Comment by Ingus Vilnis [ 2018 Oct 12 ] |
There are very many things that can go wrong in the described process of template linkage. One that particularly comes in mind is that the templates were linked using Mass update feature having Replace and Clear when unlinking selected. Then all the existing items from hosts got removed and created again with other item IDs, of course not matching the ones in the graphs and screens anymore. Or another typical one could be that the new templates although meant as replacement are very different from the old ones thus again breaking all the previously configured functionality. Really hard to tell what has happened without knowing what was in the original templates, what was in the new and what steps were taken in the update. Database backup can be helpful to revert the changes back to how it was with the screens. Loss of collected after the backup is a downside of this approach though. |
Comment by Yordan Palikov [ 2018 Oct 12 ] |
Hey guys, Thank you for the quick response! @Ingus Mass update feature was performed and new template was added. @Aigars all the items which were added to the screen were marked as "Dynamic item". I guess the old data is missing already, so could you please advise if we should create a script for automatically implementing the new data on the screens via Zabbix API? Best regards, |
Comment by Aigars Kadikis [ 2018 Oct 23 ] |
Hello Yordan, API call can be a way to go. Please study: For zero python knowledge here are some samples: Still, I cannot understand what type of screen situation we are dealing here. With a host count of 1500, I can imagine no more than 20 screens. I think the screen count should be very similar to the template count you are using. Are you using hundreds of templates? Kind regards, |
Comment by Aigars Kadikis [ 2018 Nov 06 ] |
Hello Yordan, In a meantime I suggesting to play carefully when updating templates. One way how to approach it is:
Right now I will close this ticket as won't fix. If you see a better perspective on how to handle the scenario please share your thoughts via ZBXNEXT feature request. Kind regards, |
Comment by Yordan Palikov [ 2018 Nov 06 ] |
Hi guys, Thank you so much for the effort! Kind regards, |