[ZBX-21470] Import Templates failed Created: 2022 Aug 13 Updated: 2022 Aug 15 Resolved: 2022 Aug 15 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | None |
Affects Version/s: | 6.2.0 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Muhtasin Haque Navid | Assignee: | Antons Sincovs |
Resolution: | Duplicate | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
OS: CentOS Stream release 8 |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() |
||||||||
Issue Links: |
|
Description |
Hello!
I am trying to migrate template and host file from zabbix 5.0.7 to 6.2 . After exporting from 5.0.2 the xml file failed to import to zabbix 6.2. Please help me out. Also, attached the export template file. previous 5.0.2 zabbix version i was using redhat 8 and postgresql 11 and timescaledb 1.6. |
Comments |
Comment by Antons Sincovs [ 2022 Aug 15 ] |
Hello and thank you for reporting the ZBX. It is quite a large template (a set of templates to be precise) - that you are trying to import at once in terms of this one file. When first trying to import the template you attached - I observed the error displayed in the Zabbix web interface itself: This is regulated by the variable defined in the "/etc/php-fpm.d/zabbix.conf" php_value[upload_max_filesize] which is by default set to the value of "2M" - 2 megabytes and your template is more than 4MB big. When adjusting the value to, let's say, "16M", saving the configuration file and restarting the "php-fpm.service" - at the template import I now get the error you described: If you look into the web server engine error logs, in my case I have an Apache Web Server + PHP-FPM process manager, you most likely will see the following entries ("/var/log/httpd/error_log"):
AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /usr/share/zabbix/include/classes/html/CObject.php on line 69'
The parameter that regulates the allowed memory size is: php_value[memory_limit] and by default it is set to "128M" which is apparently not enough to process the template being imported, set it to some higher value, "256M" was sufficient in my case, here are the two adjusted parameters: php_value[memory_limit] = 256M php_value[upload_max_filesize] = 16M Now you will be able to proceed with importing, however in my case the import eventually failed with: This is a known error and described in What I tried in my test environment - was:
Please, try the suggested workaround with caution, in a test environment first. |
Comment by Muhtasin Haque Navid [ 2022 Aug 15 ] |
@asincovs thanks for your response. I really appreciate it. I have already solved the php issue.so what i have tried.-
though the issue is that i can not using the updated templates nd as you are giving screenshot of conflicting item/trigger when i will upload the 6.0 templates. |
Comment by Antons Sincovs [ 2022 Aug 15 ] |
Thank you for the feedback, will close this ZBX as a duplicate for |