View Full Version : 1.9.6 import templates problem
when I export template from 1.9.6 and import another zabbix system(1.9.6) get this error :
Incorrect item key "Template_Tru64:vm.memory.size[free]" provided for trigger expression.
Cannot implode expression "{Template_Tru64:vm.memory.size[free].last(0)}<10000".
I export system default template and delete what I export and import this template again,also report this error . How to resolve it?
xml import/export not working in current trunk is a known issue :
https://support.zabbix.com/browse/ZBX-3531
I just did a new setup and found out the hard way :-(
What are the alternatives?
I guess a database import?
I don't understand why this isn't a priority...
I'm not trying to push here and I know it's beta software and have only myself to blame...
My server is running fine, but I now want to migrate it to another machine outside the office..
My database is at 50GB now and that's way to much to transfer over a 1 MBit line....
I don't need the historical data....
Is there a recipe to transfer everything but the kitchen sink?
I don't want to recreate all the templates and hosts by hand (again)...
They are so well balanced as they are.
import/export is definitely important, but what you could try for now - dump all tables except history*, trends*, events, alerts. import them, then patch the db.
I haven't done much with mysqldump and I'm having problems importing the dump.
I gave this command to transfer the mysqldump to the remote machine...
mysqldump --user=zabbix --password=**** --ignore-table=zabbix.history --ignore-table=zabbix.history_log --ignore-table=zabbix.history_str --ignore-table=zabbix.history_str_sync --ignore-table=zabbix.history_text --ignore-table=zabbix.history_str --ignore-table=zabbix.history_text --ignore-table=zabbix.history_uint --ignore-table=zabbix.history_uint_sync --ignore-table=zabbix.alerts --ignore-table=zabbix.events --ignore-table=zabbix.trends_uint --ignore-table=zabbix.trends zabbix | gzip -c | ssh root@23.123.123.12 'cat > /var/zabbix.sql.gz'
On the remote machine the database has a different name than zabbix (admin_Zabbix) and also the username/password are different.
I'm using the credentials that zabbix itself is using....
cd /var
gunzip zabbix.sql.gz
mysqlimport -p -u mr_zabbix admin_Zabbix zabbix.sql
Enter password:
mysqlimport: Error: 1045, Access denied for user 'mr_zabbix'@'%' (using password: YES), when using table: zabbix
I think it's something silly....
AFAIK the database 'admin_Zabbix' doesn't contain a table named zabbix
I do hope you or someone else can help me.
Do I maybe need to patch the SQL-file?
never used mysqlimport, i usually just run mysql db < file
if it's compressed, you don't have to uncompress it separately - zcat file.gz | mysql will work
in this case it's mysql permissions - after creating the database, make sure to
grant all privileges on admin_Zabbix.* to mr_hrhr :)