Ad Widget

Collapse

1.9.6 import templates problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vnline
    Junior Member
    • Oct 2011
    • 18

    #1

    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?
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    xml import/export not working in current trunk is a known issue :
    Zabbix 3.0 Network Monitoring book

    Comment

    • vnline
      Junior Member
      • Oct 2011
      • 18

      #3
      thanks a lot!

      Comment

      • frater
        Senior Member
        • Oct 2010
        • 340

        #4
        I just did a new setup and found out the hard way :-(
        What are the alternatives?

        I guess a database import?
        Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

        Comment

        • frater
          Senior Member
          • Oct 2010
          • 340

          #5
          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.
          Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

          Comment

          • richlv
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2005
            • 3112

            #6
            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.
            Zabbix 3.0 Network Monitoring book

            Comment

            • frater
              Senior Member
              • Oct 2010
              • 340

              #7
              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...


              Code:
              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 [email protected] '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....

              Code:
              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?
              Last edited by frater; 13-10-2011, 17:09.
              Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

              Comment

              • richlv
                Senior Member
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Oct 2005
                • 3112

                #8
                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
                Zabbix 3.0 Network Monitoring book

                Comment

                Working...