Hi Guys,
I'm running into a whole host of import issues from Zabbix 6.2 (mySQL) to Zabbix 7.4 (Postgres+Timescale DB). Is there any guidance on export/import procedures to make this upgrade? I'm attempting to use API scripting to make this happen.
The export files I did were below.
templates.json
hosts.json
maps.json
images.json
template_groups.json
host_groups.json
I changed the apache settings to allow for the larger input
memory_limit=4096M
post_max_size=1024M
upload_max_filesize=1024M
max_execution_time=1800
max_input_time=1800
max_input_vars=300000
Here is the summary of the issues faced:
1. Image import/compare issues
images_all_from_62.json was very large. Images were eventually handled by skipping already-existing target image names. This was acceptable because the target already had 683 matching image names.
2. Map import issue
Some map elements, especially static/icon-style elements, were missing/empty element references in a way 7.4 import did not like. We normalized map selement structure instead of treating those as broken functional host links.
3. LLD item prototype validation issue
Zabbix 7.4 rejected item prototypes whose keys did not include an LLD macro. The problem examples were:
net.if.speed[nic1]
mimoPowerLevelHorizontal.0
mimoPowerLevelVertical.0
We determined these were not simply disposable. For example, net.if.speed[nic1] belonged to a discovery rule filtered to {#IFNAME}=nic1, so the better remediation was:
net.if.speed[{#IFNAME}]
For Cambium PMP 450 Mimo items, we remediated to keys/OIDs using {#CUMBSITENAME}, {#CUMBMAC}, and {#SNMPINDEX}.
4. LLD graph prototype dangling references
After initially removing bad item prototypes, graph prototypes failed because they referenced the removed item keys. That proved we should not remove isolated items without handling dependent graph/trigger/dependent prototypes.
5. Morningstar graph prototype issue
Three Morningstar graph prototypes referenced:
load.voltage[loadVoltage.0]
but that item prototype did not exist in the discovery rule. We treated this as a dangling graph item reference, not a reason to invent a new item.
6. Dashboard graph reference issue caused by batching
The dashboard error was:
Cannot find graph "Wireless MAC Speed Total" used in dashboard "C5C MAC"
This turned out not to be a missing graph export. The graph existed as a top-level zabbix_export.graphs[] object, while the dashboard was nested under the template. Batching templates without carrying related top-level graphs split the relationship.
Conclusion: full template import is better than template batching when possible, because templates.json contains:
templates[]
graphs[]
triggers[]
as related top-level sections.
7. Diagnostic batching found trigger dependency failure
The diagnostic v3 batching exposed the specific issue:
Trigger "Unavailable by ICMP ping" depends on trigger "Unavailable by ICMP ping", which does not exist.
The export contains many trigger dependencies by name/expression. Examples show ICMP triggers depending on other triggers with similar or identical names, often across host/template references.
8. Preflight result
Our local preflight found:
blockers: 0
warnings: 6274
trigger_dependency warnings: 6166
trigger_prototype warnings: 108
So the package is internally clean for obvious missing graph/item/LLD problems, but trigger dependency resolution remains the main risk.
Please advise,
Dan
I'm running into a whole host of import issues from Zabbix 6.2 (mySQL) to Zabbix 7.4 (Postgres+Timescale DB). Is there any guidance on export/import procedures to make this upgrade? I'm attempting to use API scripting to make this happen.
The export files I did were below.
templates.json
hosts.json
maps.json
images.json
template_groups.json
host_groups.json
I changed the apache settings to allow for the larger input
memory_limit=4096M
post_max_size=1024M
upload_max_filesize=1024M
max_execution_time=1800
max_input_time=1800
max_input_vars=300000
Here is the summary of the issues faced:
1. Image import/compare issues
images_all_from_62.json was very large. Images were eventually handled by skipping already-existing target image names. This was acceptable because the target already had 683 matching image names.
2. Map import issue
Some map elements, especially static/icon-style elements, were missing/empty element references in a way 7.4 import did not like. We normalized map selement structure instead of treating those as broken functional host links.
3. LLD item prototype validation issue
Zabbix 7.4 rejected item prototypes whose keys did not include an LLD macro. The problem examples were:
net.if.speed[nic1]
mimoPowerLevelHorizontal.0
mimoPowerLevelVertical.0
We determined these were not simply disposable. For example, net.if.speed[nic1] belonged to a discovery rule filtered to {#IFNAME}=nic1, so the better remediation was:
net.if.speed[{#IFNAME}]
For Cambium PMP 450 Mimo items, we remediated to keys/OIDs using {#CUMBSITENAME}, {#CUMBMAC}, and {#SNMPINDEX}.
4. LLD graph prototype dangling references
After initially removing bad item prototypes, graph prototypes failed because they referenced the removed item keys. That proved we should not remove isolated items without handling dependent graph/trigger/dependent prototypes.
5. Morningstar graph prototype issue
Three Morningstar graph prototypes referenced:
load.voltage[loadVoltage.0]
but that item prototype did not exist in the discovery rule. We treated this as a dangling graph item reference, not a reason to invent a new item.
6. Dashboard graph reference issue caused by batching
The dashboard error was:
Cannot find graph "Wireless MAC Speed Total" used in dashboard "C5C MAC"
This turned out not to be a missing graph export. The graph existed as a top-level zabbix_export.graphs[] object, while the dashboard was nested under the template. Batching templates without carrying related top-level graphs split the relationship.
Conclusion: full template import is better than template batching when possible, because templates.json contains:
templates[]
graphs[]
triggers[]
as related top-level sections.
7. Diagnostic batching found trigger dependency failure
The diagnostic v3 batching exposed the specific issue:
Trigger "Unavailable by ICMP ping" depends on trigger "Unavailable by ICMP ping", which does not exist.
The export contains many trigger dependencies by name/expression. Examples show ICMP triggers depending on other triggers with similar or identical names, often across host/template references.
8. Preflight result
Our local preflight found:
blockers: 0
warnings: 6274
trigger_dependency warnings: 6166
trigger_prototype warnings: 108
So the package is internally clean for obvious missing graph/item/LLD problems, but trigger dependency resolution remains the main risk.
Please advise,
Dan
Comment