Ad Widget

Collapse

Zabbix export working, import not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fraenki
    Junior Member
    • May 2008
    • 6

    #1

    Zabbix export working, import not working

    Hi,

    today I tried to use the export feature on my old Zabbix 1.4 Server. The export succeeded, but I had some problems importing the XML-Data to my new Zabbix 1.6 Server. I always got "ERROR: Import failed" while trying to import the file.

    The reason was not so complicated: the XML file contains special characters (german Umlaut, and more), but the xml encoding is not defined in the file.

    Code:
    $ xmlstarlet val -e zabbix_export.xml
    zabbix_export.xml:1068: parser error : Input is not proper UTF-8, indicate encoding !
    Bytes: 0xD6 0x73 0x74 0x65
                                            <description>This contains a german Umlaut: Österreich.</description>
                                                                                        ^
    zabbix_export.xml - invalid
    I just added an encoding to the first line of the XML file and the import worked immediately:
    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    Maybe the Zabbix developers should set the encoding in the XML export file. Possibly this problem does not exist with Zabbix 1.6. A little more debug output during the Import would help a lot.


    Kind regards
    - Frank
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    Hmmm. Not working in 1.6 either. I was able to export from a 1.6 server, but was unable to import into a 1.6.1 system.

    Only error message I find is this: could not open XML input

    Comment

    • xaeth
      Member
      • Nov 2004
      • 67

      #3
      not working, but enhanced error patch

      on 1.6.4. Fresh install. All I'm getting is:

      could not open XML input

      I traced it back a bit and realized that $_FILES['import_file']['tmp_name'] is not being populated. Here is $_FILES:

      Array ( [import_file] => Array ( [name] => zabbix_export.20090518.xml [type] => [tmp_name] => [error] => 1 [size] => 0 ) )

      I think it must be size because I have an old one thats 22k that imports fine, but this 16M one falls on its face. My post_max_size is 20M, and I'm not seeing errors anywhere so I'm not sure what the fix is.

      Regardless, it would be nice if something like the following patch was applied, although I'm sure it might need a bit more work to make sure it covers things appropriately.
      Attached Files

      Comment

      • xaeth
        Member
        • Nov 2004
        • 67

        #4
        got it imported

        Took changing the php.ini to these settings:

        max_execution_time = 300
        post_max_size = 20M
        upload_max_filesize = 20M

        Comment

        Working...