Steps to reproduce:
1. Create template in 7.0:
Template name = Template Basic
Item 1: Type = Zabbix trapper
Key = trap
Trigger 1: Expression = last(/Template Basic/trap)=0
Item 2: Type = Zabbix agent
Key = agent.ping
Trigger 2: Expression = last(/Template Basic/agent.ping)=1
Discovery: Type = Zabbix agent
Key = net.if.discovery
Item prototypes: Type = Zabbix agent
Key =
net.if.in[{#IFNAME}]
2. Export template
3. Import template in master
4. Check PHP errors
Observed:
Three different PHP errors are received:
Undefined array key "type" [zabbix.php:17 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> CController->run() -> CControllerPopupImportCompare->doAction() -> CApiWrapper->__call() -> CFrontendApiWrapper->callMethod() -> CApiWrapper->callMethod() -> CApiWrapper->callClientMethod() -> CLocalApiClient->callMethod() -> CConfiguration->importcompare() -> C74ImportConverter->convert() -> C74ImportConverter::convertTemplates() -> C74ImportConverter::convertDiscoveryRules() -> C74ImportConverter::convertItems() -> C74ImportConverter::shouldAssignDefaultTrapperHosts() -> CConfigFile->{closure}() in include/classes/import/converters/C74ImportConverter.php:118]
Undefined array key "type" [zabbix.php:17 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> CController->run() -> CControllerPopupImportCompare->doAction() -> CApiWrapper->__call() -> CFrontendApiWrapper->callMethod() -> CApiWrapper->callMethod() -> CApiWrapper->callClientMethod() -> CLocalApiClient->callMethod() -> CConfiguration->importcompare() -> C74ImportConverter->convert() -> C74ImportConverter::convertTemplates() -> C74ImportConverter::convertDiscoveryRules() -> C74ImportConverter::shouldAssignDefaultTrapperHosts() -> CConfigFile->{closure}() in include/classes/import/converters/C74ImportConverter.php:118]
Undefined array key "type" [zabbix.php:17 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> CController->run() -> CControllerPopupImportCompare->doAction() -> CApiWrapper->__call() -> CFrontendApiWrapper->callMethod() -> CApiWrapper->callMethod() -> CApiWrapper->callClientMethod() -> CLocalApiClient->callMethod() -> CConfiguration->importcompare() -> C74ImportConverter->convert() -> C74ImportConverter::convertTemplates() -> C74ImportConverter::convertItems() -> C74ImportConverter::shouldAssignDefaultTrapperHosts() -> CConfigFile->{closure}() in include/classes/import/converters/C74ImportConverter.php:118]
Expected:
No PHP runtime errors should appear
Template example attached: zbx_export_templates_Template_Basic.yaml![]()
- caused by
-
ZBXNEXT-10468 Improve default value for Allowed hosts of Trapper items
-
- Closed
-