Ad Widget

Collapse

import/export not working in 1.9.9

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maximum
    Junior Member
    • Sep 2006
    • 16

    #1

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

    #2
    that would be https://support.zabbix.com/browse/ZBX-3531 and https://zabbix.org/wiki/Docs/specs/ZBX-3531
    Zabbix 3.0 Network Monitoring book

    Comment

    • frater
      Senior Member
      • Oct 2010
      • 340

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

        #4
        Originally posted by frater
        Does the Import/Export work for 1.9.9 for non-SNMP?
        not yet - you can follow the progress in the issue above

        Originally posted by frater
        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
        Zabbix 3.0 Network Monitoring book

        Comment

        • frater
          Senior Member
          • Oct 2010
          • 340

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

            Comment

            • ahowell
              Member
              • Jan 2011
              • 66

              #7
              There is a bug in 1.9.9 when creating trigger prototypes.

              Comment

              Working...