PDA

View Full Version : import/export not working in 1.9.9


Maximum
02-02-2012, 15:25
When I create the following host and then export it, the SNMP interface information is missing in the export file.

Created host with the following:
Host name:core1
Groups:#Core network
SNMP Interfaces IP=10.0.0.1, DNS name=Core1.labnet.local,Connect to=IP, Port=161

The export file of the newly created host(SNMP IP/port missing):

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export version="1.0" date="02.02.12" time="15.09">
<hosts>
<host name="core1">
<name>core1</name>
<proxy_hostid>0</proxy_hostid>
<useip></useip>
<dns></dns>
<ip></ip>
<port></port>
<status>0</status>
<useipmi></useipmi>
<ipmi_ip></ipmi_ip>
<ipmi_port></ipmi_port>
<ipmi_authtype>-1</ipmi_authtype>
<ipmi_privilege>2</ipmi_privilege>
<ipmi_username></ipmi_username>
<ipmi_password></ipmi_password>
<groups>
<group>#Core Network</group>
</groups>
<triggers/>
<items/>
<templates/>
<graphs/>
<macros/>
</host>
</hosts>
<dependencies/>
</zabbix_export>


What tags should I use to manually create an xml file for the host above ?

Best regards!

richlv
06-02-2012, 18:46
that would be https://support.zabbix.com/browse/ZBX-3531 and https://zabbix.org/wiki/Docs/specs/ZBX-3531 :)

frater
14-02-2012, 20:42
Does the Import/Export work for 1.9.9 for non-SNMP?

I have done several upgrades since 1.8.4 and don't really trust my database anymore.
Today I added a trigger and got an error message....

I want to export all my hosts and templates, start with a clean MySQL-database and then import the hosts and templates again...

richlv
14-02-2012, 21:20
Does the Import/Export work for 1.9.9 for non-SNMP?


not yet - you can follow the progress in the issue above


I have done several upgrades since 1.8.4 and don't really trust my database anymore.
Today I added a trigger and got an error message....


you could create a fresh database of trunk (or 1.9.9, depending on which one you use) and compare the schema to your existing db, then fix any differences.

note that errors could be coming also just by trunk being buggy ;)

frater
14-02-2012, 22:57
I did the following....


I created the database zabbixtest and imported the schema:
cd /opt/zabbix-1.9.9/database/mysql
mysql -uadmin -p -e"create database zabbixtest;"
mysql -D zabbixtest -uadmin -p <schema.sql
mysqldump --no-data --tables -uadmin -p zabbixtest >schema.1.9.9.sql
I exported my running schema with this command:
mysqldump --no-data --tables -uadmin -p zabbix >>curschema.sql

I then compared both SQL files with ExamDiff

I only discovered some swapped lines.
Have I done enough comparisons?

richlv
14-02-2012, 23:38
i guess the swapped ones were indexes etc. sounds like your db schema is ok then and, assuming frontend is of the same version, you have actually found a bug. please, search the issue tracker - if nothing is found, register a new one

ahowell
16-02-2012, 12:46
There is a bug in 1.9.9 when creating trigger prototypes.

https://support.zabbix.com/browse/ZBX-4647