Hello,
I have a script that my colleagues and I use for adding hosts to Zabbix. The script prompts for specific host details and then uses the API to create or update hosts and groups based on user input.
Now, I want to extend its functionality to handle maps. Currently, the script can create a map for a specific group. My next goal is to add hosts (selements) to an existing map.
The challenge I'm facing is that when I use the selements block, it overwrites all existing selements in the map instead of adding new ones. which is indeed logical when looking at the existing API-methods
Is there a way to update a map via the API to add new selements without overwriting the existing ones? I thought about retrieving the current map with map.get first, but I believe that approach might only allow updating existing selements rather than adding new ones.
Any suggestions or alternative methods to achieve this would be greatly appreciated.
Thank you!
I have a script that my colleagues and I use for adding hosts to Zabbix. The script prompts for specific host details and then uses the API to create or update hosts and groups based on user input.
Now, I want to extend its functionality to handle maps. Currently, the script can create a map for a specific group. My next goal is to add hosts (selements) to an existing map.
The challenge I'm facing is that when I use the selements block, it overwrites all existing selements in the map instead of adding new ones. which is indeed logical when looking at the existing API-methods
Is there a way to update a map via the API to add new selements without overwriting the existing ones? I thought about retrieving the current map with map.get first, but I believe that approach might only allow updating existing selements rather than adding new ones.
Any suggestions or alternative methods to achieve this would be greatly appreciated.
Thank you!
Comment