[ZBX-23933] Linking templates Created: 2024 Jan 12  Updated: 2024 Mar 18  Resolved: 2024 Mar 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 6.4.9, 6.4.10
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Andrey Assignee: Edgar Akhmetshin
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

openSUSE Leap 15.5
postgresql 14.10


Attachments: File B_wing.json     PNG File Linking template error.png     PNG File Linking template error2.png     PNG File Linking template error3.png     File Main_spaceship_templates.json     PNG File Temlate updated.png     File orion_claster01_hosts.json     PNG File script result.png    

 Description   

When linking a template to a template to which more than 100 hosts are connected, it issues a duplicate item error at host number 100 and does not connect the template. You have to use the methods configuration.export(hosts), delete posts, link template, configuration.import(hosts) to get the desired result



 Comments   
Comment by Edgar Akhmetshin [ 2024 Jan 15 ]

Hello Andrey,

Provide exact steps to reproduce the issue with templates example, we are not able to reproduce the issue.

Regards,
Edgar

Comment by Andrey [ 2024 Jan 23 ]

Hello, to reproduce the problem, I generated test groups of hosts and templates to understand how my script for detecting and adding hosts works.

Basic working templates have already been created in Zabbix Main_spaceship_templates.json

Steps to reproduce:{}

  1. Run script in subnets 10.13.11-15
  2. Script creates groups using the API (SpaceShips/Orion/Claster#01/10.13.11.0,SpaceShips/Orion/Claster#01/10.13.12.0,SpaceShips/Orion/Claster#01/10.13.13.0,SpaceShips/Orion/Claster#01/10.13.14.0,SpaceShips/Orion/Claster#01/10.13.15.0)
  3. When hosts are detected, script finds out the model and creates a template based on the model B_wing.json
  4. Generates an import file of detected hosts and imports it into Zabbix orion_claster01_hosts.json
    result of the script
  5. II check the ship class in the registry and link the class template to the model template, I get an error (337 hosts on template)
     
    after deleting the host on which the error occurred and above (326 hosts on template)

    error with 201 host on the template

Result:
The template was updated only with 200 hosts on the template, in earlier versions 6.4.х the template was updated with no more than 100 hosts on the template

Comment by Edgar Akhmetshin [ 2024 Feb 28 ]

Please share the script also.

Generated at Mon Apr 07 12:50:41 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.