[ZBX-3328] can't import 1.8 host in trunk: "No interfaces" Created: 2010 Dec 22  Updated: 2017 May 30  Resolved: 2011 Jan 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.9.1 (alpha)
Fix Version/s: 1.9.2 (alpha), 2.0.0

Type: Incident report Priority: Blocker
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: xml
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File _zbx_hosts_export.xml     XML File atesthost_zabbix_export.xml     XML File cisco_vpn3000.xml     XML File undefined_index_useipmi.xml     XML File zbx_hosts_export_1.xml     XML File zbx_templates_export.xml     XML File zbx_templates_export_1.xml     XML File zbx_templates_export_2.xml     XML File zbx_templates_export_9.xml     XML File zbx_templates_export_moeb.xml     XML File zbx_templates_export_trigger_test_template.xml    

 Description   

a host that is exported from 1.8 can not be imported in trunk :

No interfaces for host [ availability test ]



 Comments   
Comment by Konstantin Buravcov (Inactive) [ 2011 Jan 07 ]

Must make sure that all data exported from 1.8 can be imported to 2.0

Comment by Konstantin Buravcov (Inactive) [ 2011 Jan 13 ]

Known problem: applications not used in items are not exported. ZBX-3418

Comment by Konstantin Buravcov (Inactive) [ 2011 Jan 13 ]

Done in dev branch: ZBX-3328

Comment by richlv [ 2011 Jan 13 ]

dev branch rev 16878

1. (FIXED) see undefined_index_useipmi.xml :
Undefined index: useipmi[/usr/local/apache2/htdocs/dev/ZBX-3328/include/export.inc.php:854]

Comment by richlv [ 2011 Jan 13 ]

2. (FIXED) see cisco_vpn3000.xml

Undefined index: ip[/home/main/usr/local/apache2/htdocs/dev/ZBX-3328/include/export.inc.php:836]
Undefined index: useip[/home/main/usr/local/apache2/htdocs/dev/ZBX-3328/include/export.inc.php:847]
Undefined index: dns[/home/main/usr/local/apache2/htdocs/dev/ZBX-3328/include/export.inc.php:849]
Undefined index: useipmi[/home/main/usr/local/apache2/htdocs/dev/ZBX-3328/include/export.inc.php:854]

Undefined index: ymin_type[/home/main/usr/local/apache2/htdocs/dev/ZBX-3328/include/export.inc.php:1449]
Undefined index: ymax_type[/home/main/usr/local/apache2/htdocs/dev/ZBX-3328/include/export.inc.php:1462]
Undefined index: graphtype[/home/main/usr/local/apache2/htdocs/dev/ZBX-3328/api/classes/class.cgraph.php:1102]

Comment by richlv [ 2011 Jan 13 ]

3. empty errors : see _zbx_hosts_export.xml

[ CItem::syncTemplates ] Cannot find host interface on host [Server 212] for item key []
[ CTemplate::massAdd ] Cannot sync items
[ CHost::massAdd ]
[ CHost::create ]

Comment by richlv [ 2011 Jan 13 ]

4. see zbx_templates_export.xml
Undefined index: interfaces[/home/main/usr/local/apache2/htdocs/dev/ZBX-3328/include/export.inc.php:929]
Invalid argument supplied for foreach()[/home/main/usr/local/apache2/htdocs/dev/ZBX-3328/include/export.inc.php:929]

and it still says "Imported successfully"

Comment by richlv [ 2011 Jan 13 ]

5. [ CHostInterface::update ] Interface with IP " 0.0.0.0 " can not have empty DNS name.

this should be allowed (for example, if host only has web scenarios, trapper items etc and that is the only interface)

Comment by richlv [ 2011 Jan 13 ]

6. see atesthost_zabbix_export.xml
importing xml attempts to delete an interface :
[ CHostInterface::delete ] Interface is linked to item "A Test Host 2:a"

maybe have to import several times, maybe only reproducible on my setup - ready to provide more info

Comment by richlv [ 2011 Jan 13 ]

7. see zbx_templates_export_trigger_test_template.xml

Undefined index: dependencies[/home/main/usr/local/apache2/htdocs/dev/ZBX-3328/api/classes/class.ctrigger.php:1663]

Comment by richlv [ 2011 Jan 13 ]

8. see zbx_templates_export_moeb.xml

error message does not specify which graph is that, thus making it very hard to solve the issue

[ CGraph::create ] Incorrect item for axis value item

Comment by richlv [ 2011 Jan 20 ]

ping. what about this issue ?
would be great to fix obvious issues & get it finally merged...

Comment by Konstantin Buravcov (Inactive) [ 2011 Jan 21 ]

1. Fixed

2. Allowed importing templates with missing 'ip' field, but could not understand how come graphs in your XML have no <ymin_type> element. Tried exporting the very same template from 1.8, and I have this parameter in place. I think not having this parameter must reject the import.

Comment by richlv [ 2011 Jan 24 ]

dev branch rev 17118.
see zbx_templates_export_1.xml

note that problems might be related to some of the entities (templates or hosts) already present in the database

Application [zas] unlinked.
[ CApplication::massAdd ] Empty input parameter

9. multiple applications are unlinked - not sure why is this happening during import

10. unlink message is quite... non-helpful
if easy enough to do, printing out host & item name would be great

11. (FIXED) fails with "Empty input parameter" (which without debug enabled would be a totally uninformative message...)

Comment by richlv [ 2011 Jan 24 ]

12. (FIXED) see zbx_templates_export_2.xml

DBcondition Error: [1] incorrect value for numeric field

should import as it was exported from 1.8 & message also is missing details

Comment by richlv [ 2011 Jan 25 ]

13. (FIXED) see zbx_templates_export_9.xml
dev branch rev 17143.

Error in query [INSERT INTO items_applications (itemid,applicationid,itemappid) VALUES (10109,31,9245)] [Duplicate entry '31-10109' for key 'items_applications_1']
[ CApplication::massAdd ] DBEXECUTE_ERROR

Comment by richlv [ 2011 Jan 25 ]

14. see zbx_hosts_export_1.xml

[ CItem::update ] Item [testitem2:GetAndSaveRegistredGateways2.pl["

{HOSTNAME}

"]] has invalid port: "0".

Comment by richlv [ 2011 Jan 27 ]

parts concerning 1.8 xml import should be fixed. code review time

Comment by Konstantin Buravcov (Inactive) [ 2011 Jan 28 ]

Merged to trunk rev 17267.

Leaving issue open, planning to add some basic unit tests.

Generated at Fri Mar 29 10:37:00 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.