Ad Widget

Collapse

Zabbix 3.4 XML Multiple Hosts Import - Invalid tag unexpected tag "version4"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gadkins
    Junior Member
    • Jul 2018
    • 6

    #1

    Zabbix 3.4 XML Multiple Hosts Import - Invalid tag unexpected tag "version4"

    Greetings to all, I'm hoping there is a simple fix for my XML import problem. I have an XML file structured similarly to this for simple host imports:

    <?xml version="1.0" encoding="UTF-8"?>
    <version>3.4</version>
    <date>2018-07-23T16:31:53Z</date>
    <groups>
    <group>
    <name>*****</name>
    </group>
    </groups>
    <hosts>
    <host>
    <host>x.x.x.x</host>
    <name>*****</name>
    <description>****</description>
    <proxy></proxy>
    <status>0</status>
    <ipmi_authtype>-1</ipmi_authtype>
    <ipmi_privilege>2</ipmi_privilege>
    <ipmi_username></ipmi_username>
    <ipmi_password></ipmi_password>
    <tls_connect>1</tls_connect>
    <tls_accept>1</tls_accept>
    <tls_issuer></tls_issuer>
    <tls_subject></tls_subject>
    <tls_psk_identity></tls_psk_identity>
    <tls_psk></tls_psk>
    <templates>
    <template>
    <name>Template Module ICMP Ping</name>
    </template>
    </templates>
    <groups>
    <group>
    <name>*****</name>
    </group>
    </groups>
    <interfaces>
    <interface>
    <default>1</default>
    <type>1</type>
    <useip>1</useip>
    <ip>x.x.x.x</ip>
    <dns></dns>
    <port>10050</port>
    <bulk>1</bulk>
    <interface_ref>if1</interface_ref>
    </interface>
    </interfaces>
    </host>
    </hosts>
    <version>3.4</version>
    <date>2018-07-23T16:31:53Z</date>
    <groups>
    <group>
    <name>*****</name>
    </group>
    </groups>
    <hosts>
    <host>
    <host>x.x.x.x</host>
    <name>****</name>
    <description>****</description>
    <proxy></proxy>
    <status>0</status>
    <ipmi_authtype>-1</ipmi_authtype>
    <ipmi_privilege>2</ipmi_privilege>
    <ipmi_username></ipmi_username>
    <ipmi_password></ipmi_password>
    <tls_connect>1</tls_connect>
    <tls_accept>1</tls_accept>
    <tls_issuer></tls_issuer>
    <tls_subject></tls_subject>
    <tls_psk_identity></tls_psk_identity>
    <tls_psk></tls_psk>
    <templates>
    <template>
    <name>Template Module ICMP Ping</name>
    </template>
    </templates>
    <groups>
    <group>
    <name>*****</name>
    </group>
    </groups>
    <interfaces>
    <interface>
    <default>1</default>
    <type>1</type>
    <useip>1</useip>
    <ip>x.x.x.x</ip>
    <dns></dns>
    <port>10050</port>
    <bulk>1</bulk>
    <interface_ref>if1</interface_ref>
    </interface>
    </interfaces>
    </host>
    </hosts>
    </zabbix_export>

    If I take out the second entry and import this file, it works fine. If I use my XML file that I exported from Excel that has multiple entries that are just one after another similar to this, I get the error message stated in the subject Invalid tag "/zabbix_export": unexpected tag "version4". Any suggestions would be most appreciated.
Working...