albin-lindstrom / zabbix-edgemax-template

Zabbix template for Ubiquiti EdgeMAX devices, monitored with SNMPv2.
MIT License
26 stars 11 forks source link

Import 5.2, "Template Net Network Generic Device SNMP" Missing #6

Closed johnsoncarlp closed 2 years ago

johnsoncarlp commented 3 years ago

On import of the 5.0 template into 5.2 the error is thrown:

Cannot import template "Template EdgeMAX SNMPv2", linked template "Template Net Network Generic Device SNMP" does not exist.

Looked at template and default templates in 5.2, it appears the new name for this template is now:

Network Generic Device SNMP

albinbatman commented 3 years ago

Yep, feels like it get changed sporadically. I'll push a commit to sort this.

Thanks for reporting, @johnsoncarlp.

antonio-leblanc commented 3 years ago

Same problem here, thanks for reporting

vincent1890 commented 3 years ago

same error here thank Échec import Non-static method C50ImportConverter::convertPreprocessingSteps() should not be called statically [conf.import.php:91 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → C50ImportConverter->convert() → C50ImportConverter::convertTemplates() → C50ImportConverter::convertItems() in include/classes/import/converters/C50ImportConverter.php:113] Non-static method C50ImportConverter::convertPreprocessingSteps() should not be called statically [conf.import.php:91 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → C50ImportConverter->convert() → C50ImportConverter::convertTemplates() → C50ImportConverter::convertItems() in include/classes/import/converters/C50ImportConverter.php:113] Non-static method C50ImportConverter::convertPreprocessingSteps() should not be called statically [conf.import.php:91 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → C50ImportConverter->convert() → C50ImportConverter::convertTemplates() → C50ImportConverter::convertItems() in include/classes/import/converters/C50ImportConverter.php:113] Non-static method C50ImportConverter::convertPreprocessingSteps() should not be called statically [conf.import.php:91 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → C50ImportConverter->convert() → C50ImportConverter::convertTemplates() → C50ImportConverter::convertItems() in include/classes/import/converters/C50ImportConverter.php:113] Non-static method C50ImportConverter::convertPreprocessingSteps() should not be called statically [conf.import.php:91 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → C50ImportConverter->convert() → C50ImportConverter::convertTemplates() → C50ImportConverter::convertItems() in include/classes/import/converters/C50ImportConverter.php:113] Non-static method C50ImportConverter::convertPreprocessingSteps() should not be called statically [conf.import.php:91 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → C50ImportConverter->convert() → C50ImportConverter::convertTemplates() → C50ImportConverter::convertDiscoveryRules() → C50ImportConverter::convertItemPrototypes() in include/classes/import/converters/C50ImportConverter.php:157] Non-static method C50ImportConverter::convertPreprocessingSteps() should not be called statically [conf.import.php:91 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → C50ImportConverter->convert() → C50ImportConverter::convertTemplates() → C50ImportConverter::convertDiscoveryRules() → C50ImportConverter::convertItemPrototypes() in include/classes/import/converters/C50ImportConverter.php:157] Non-static method C50ImportConverter::convertPreprocessingSteps() should not be called statically [conf.import.php:91 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → C50ImportConverter->convert() → C50ImportConverter::convertTemplates() → C50ImportConverter::convertDiscoveryRules() → C50ImportConverter::convertItemPrototypes() in include/classes/import/converters/C50ImportConverter.php:157] Impossible d'importer le modèle "Template EdgeMAX SNMPv2", le modèle lié "Template Net Network Generic Device SNMP" n'existe pas.

Krumbelfix commented 3 years ago

i had the same problem. I've an ER-Pro (8 Port) which is not (yet?) covered by this template.

i just "fixed" this by changing the line 16: was: <name>Template Net Network Generic Device SNMP</name> to <name>Template Net Network Generic Device SNMPv2</name>

the import was sucessfull. Would be great if anyone can validate if this is working!

vincent1890 commented 3 years ago

is there a solution to this incompatibility ?

peterfigure commented 2 years ago

I had the same problem, brand new Zabbix 5.4 installation, just look search in the list for existing templates, I found Network Generic Device SNMP there and renamed the template on line 15 of the edgemax template to match and then it imported without a problem

albinbatman commented 2 years ago

Hi @johnsoncarlp & @vincent1890,

as pointed out by @Krumbelfix and @peterfigure, you may manually replace the incompatible linked template. Unfortunately, it was changed some time during 4.x-5.x which raised this incompatibility.

Please open a PR and I can merge it with master; I do not run 5.x anymore but I might attempt a backport.