ZABBIX Forums  
  #1  
Old 02-02-2012, 15:25
Maximum Maximum is offline
Junior Member
 
Join Date: Sep 2006
Posts: 16
Default import/export not working in 1.9.9

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!
Reply With Quote
  #2  
Old 06-02-2012, 18:46
richlv richlv is offline
Administrator
Zabbix Certified Specialist
 
Join Date: Oct 2005
Posts: 2,982
Default

that would be https://support.zabbix.com/browse/ZBX-3531 and https://zabbix.org/wiki/Docs/specs/ZBX-3531 :)
Reply With Quote
  #3  
Old 14-02-2012, 20:42
frater frater is offline
Senior Member
 
Join Date: Oct 2010
Posts: 245
Default

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...
Reply With Quote
  #4  
Old 14-02-2012, 21:20
richlv richlv is offline
Administrator
Zabbix Certified Specialist
 
Join Date: Oct 2005
Posts: 2,982
Default

Quote:
Originally Posted by frater View Post
Does the Import/Export work for 1.9.9 for non-SNMP?
not yet - you can follow the progress in the issue above

Quote:
Originally Posted by frater View Post
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 ;)
Reply With Quote
  #5  
Old 14-02-2012, 22:57
frater frater is offline
Senior Member
 
Join Date: Oct 2010
Posts: 245
Default

I did the following....


I created the database zabbixtest and imported the schema:
Code:
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:
Code:
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?
Reply With Quote
  #6  
Old 14-02-2012, 23:38
richlv richlv is offline
Administrator
Zabbix Certified Specialist
 
Join Date: Oct 2005
Posts: 2,982
Default

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
Reply With Quote
  #7  
Old 16-02-2012, 12:46
ahowell ahowell is offline
Member
 
Join Date: Jan 2011
Location: Perth, Australia
Posts: 61
Default

There is a bug in 1.9.9 when creating trigger prototypes.

https://support.zabbix.com/browse/ZBX-4647
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:55.