[ZBX-7654] Import versioning Created: 2014 Jan 15  Updated: 2017 May 30  Resolved: 2017 Jan 09

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 2.2.2rc1, 2.3.0
Fix Version/s: 2.5.0

Type: Incident report Priority: Major
Reporter: Pavels Jelisejevs (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: api, import
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File Full_EXPORT.xml     XML File host_and_templates_1.8.xml     XML File map_and_screen.xml     XML File new_issue_zbx_hosts_export.xml     PNG File xml_error.png     XML File zbx_export_hosts (10).xml     XML File zbx_export_hosts (4).xml     XML File zbx_export_hosts (7).xml     XML File zbx_export_templates (1).xml     XML File zbx_hosts_export.xml     XML File zbx_maps_export (1).xml     XML File zbx_maps_export.xml     XML File zbx_screens_export (6).xml    
Issue Links:
Duplicate
duplicates ZBX-4853 xml import messages should provide co... Closed
duplicates ZBX-5343 Importing images through xml doesn't ... Closed
duplicates ZBX-7381 invalid item key message for xml impo... Closed
duplicates ZBX-5692 Errors when importing a template with... Closed
duplicates ZBX-5815 Undefined index in screen import Closed
is duplicated by ZBX-8689 Host import from 2.4 to 2.2 Closed

 Description   

Currently files from 2.0, 2.2 and 2.4 are exported with import version set to 2.0. This is incorrect, since the data exported in different versions is different and we shouldn't be able to import files from newer versions to older ones. The version of the import should be bumped with every major release and we'll also need to develop a framework for handling imported files from various versions and maintaining compatibility.



 Comments   
Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 15 ]

This should be done after ZBXNEXT-581 is finished.

Comment by richlv [ 2014 Jan 15 ]

i assume we bump version to 2.4 in trunk but do not do it for 2.2 branch.
also, just in case 2.6 ends up not requiring any changes to xml, do we keep numbering at 2.4 or do we bump it always ?

jelisejev It's unlikely that the XML file won't change, so I think we should bump it with each release, to keep things simple.

Comment by richlv [ 2014 Jan 15 ]

(1) to be documented in appropriate location for 2.4 docs (https://www.zabbix.com/documentation/2.2/manual/xml_export_import)

iivs Seems like we already have these sections created. Marking this as resolved, but just in case, please, take a look if anything is missing.

RESOLVED

sasha <version> tag is incorrect on 2.2 and 2.4 pages.

RESOLVED

iivs Thanks. If nothing else, then
CLOSED

Comment by Pavels Jelisejevs (Inactive) [ 2014 Nov 27 ]

(3) There's one functional change that should be discussed. In 2.2 and earlier versions it was possible to save an LLD rule with a filter regex but an empty macro. In the current trunk, when importing such a rule the filter is silently discarded. Now it triggers an error. What should be the correct behavior?

alexei We should produce an error message, so it works correctly. WON'T FIX

Comment by Pavels Jelisejevs (Inactive) [ 2014 Nov 27 ]

(4) I've added a new ZABBIX_EXPORT_VERSION constant in defines.inc.php. If it's accepted, it should be added to the spec and documented.

alexei The constant should be used for export. CLOSED

<richlv> seems to be missing from the spec still, if i didn't mix things up badly

sasha This change is too low-level for the specification.

CLOSED

Comment by Pavels Jelisejevs (Inactive) [ 2014 Nov 27 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-7654.

Specification available at http://zabbix.org/wiki/Docs/specs/ZBX-7654.

Comment by Oleg Egorov (Inactive) [ 2015 Jan 30 ]

(5) String changes:

Added strings:

  • "%1$s" is expected
  • DD.MM.YY context: "XML date format"
  • hh.mm context: "XML time format"
  • YYYY-MM-DDThh:mm:ssZ context: "XML date and time format"
  • Invalid XML tag "%1$s": %2$s.
  • a character string is expected
  • an array is expected
  • the tag "%1$s" is missing
  • unexpected tag "%1$s"
  • unsupported version number

Removed strings:

  • Cannot create map "%s".
  • Cannot find map "%1$s" used in exported map "%2$s".
  • Cannot update map "%s".
  • Graph "%1$s" skipped - user rule.
  • Host "%s" has "useipmi" parameter checked, but has no "ipmi_ip" parameter! Using host IP address as an address for IPMI interface.
  • Incorrect y max item for graph "%1$s".
  • Incorrect y min item for graph "%1$s".
  • Item "%1$s" does not exist.
  • Item "%1$s" skipped - user rule.
  • Map "%1$s" skipped - user rule.
  • Map "%s" created.
  • Map "%s" updated.
  • Missing item "%1$s" for host "%2$s".
  • No "ymax_type" field for graph "%s".
  • No "ymin_type" field for graph "%s".
  • No permission for graph "%1$s".
  • No permission for host "%1$s".
  • No permission for item "%1$s".
  • No permission for template "%1$s".
  • No permission for trigger "%1$s".
  • No permissions for host group "%1$s".
  • No permissions for map "%1$s".
  • No permissions for screen "%1$s".
  • Screen "%1$s" added.
  • Screen "%1$s" skipped - user rule.
  • Screen "%1$s" updated.
  • Trigger "%1$s" skipped - user rule.
  • XML file contains errors

sasha RESOLVED

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 Feb 03 ]

(6) Export from zabbix 1.8
If implode xmls (hosts, templates, screens and maps)
And don't remove: <dependencies/>

XMLReader::XML(): Empty string supplied as input [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CXmlImportReader->read() → XMLReader->XML() in C:\xampp\htdocs\trunk\frontends\php\include\classes\import\readers\CXmlImportReader.php:62]
XMLReader::read(): Load Data before trying to read [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CXmlImportReader->read() → CXmlImportReader->xmlToArray() → XMLReader->read() in C:\xampp\htdocs\trunk\frontends\php\include\classes\import\readers\CXmlImportReader.php:77]
DOMDocument::loadXML(): Empty string supplied as input [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CXmlImport18::import() → DOMDocument->loadXML() in C:\xampp\htdocs\trunk\frontends\php\include\classes\import\CXmlImport18.php:388]

Happens in 2.5.0(trunk) and should be fixed and retested under this issue.

oleg.egorov IN ZBX-7654 this issue now don't exist

sasha CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 Feb 03 ]

(7) Host and template import problems from Zabbix 1.8

See host_and_templates_1.8.xml

Displayed error message:
Item "1" on "1.8": application "1" does not exist.

But item 1 - exist

Don't work host import, if host contains application

Same issue in templates

oleg.egorov RESOLVED IN r52077

sasha CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 Feb 04 ]

(8) Export from Zabbix 1.8
Map and Screen Import failed:

Error:

Undefined index: iconmap [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processMaps() → CMapImporter->import() → CMapImporter->resolveMapElementReferences() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\importers\CMapImporter.php:304]
Undefined index: background [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processMaps() → CMapImporter->import() → CMapImporter->resolveMapElementReferences() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\importers\CMapImporter.php:314]
Undefined index: label_format [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processMaps() → CMapImporter->import() → CMap->create() → CMap->checkInput() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\api\services\CMap.php:400]
Array to string conversion [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processMaps() → CMapImporter->import() → CMap->create() → DB::insert() → DB::checkValueTypes() → zbx_ctype_digit() → strval() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\func.inc.php:803]
Array to string conversion [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processMaps() → CMapImporter->import() → CMap->create() → DB::insert() → DB::checkValueTypes() → _s() → _params() → vsprintf() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\gettextwrapper.inc.php:189]

Incorrect value "Array" for unsigned int field "backgroundid".

See map_and_screen.xml

oleg.egorov RESOLVED IN r52105

sasha "Undefined index: label_format" must be fixed in API

REOPENED

oleg.egorov RESOLVED IN r53172

sasha CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 Feb 05 ]

(9) Unnecessary folder include\classes\import\formatters

oleg.egorov Resolved in r52007

oleg.egorov Fixed copyright year in r52006

sasha CLOSED

Comment by Alexander Vladishev [ 2015 Feb 18 ]

(10) Unit tests are broken.

include/classes/import/CImportDataAdapterTest.php
1) CImportDataAdapterTest::testConversion
Use of undefined constant DATE_TIME_FORMAT_SECONDS_XML - assumed 'DATE_TIME_FORMAT_SECONDS_XML'

sasha RESOLVED in r52286.

include/classes/import/converters
EEEEEEEEEEEEEE................................................... 65 / 95 ( 68%)
............................PHP Fatal error:  Call to undefined method Mock_CConverter_3a8cc64c::method() in include/classes/import/converters/CConverterChainTest.php on line 53

oleg.egorov RESOLVED IN r52417

sasha Still reproducible

REOPENED

sasha CLOSED

Comment by Alexander Vladishev [ 2015 Feb 18 ]

(11) DATE_TIME_FORMAT_SECONDS_XML constant should not be localized

sasha RESOLVED in r52286.

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 Feb 18 ]

(12) removed unused functions is_int_range() and granted2move_user() in r52276.

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 Feb 19 ]

(13) C10ImportConverter.convertTriggerExpression() works incorrectly:

{Template_Netware:proc.num[,,run].last(0)}>10             =>   {Template_Netware:proc.num[.last(0)}>10
{Template_Netware:vfs.fs.size[/tmp,pfree].last(0)}<10     =>   {Template_Netware:vfs.fs.size[/tmp.last(0)}<10
{Template_Netware:vfs.fs.size[/,pfree].last(0)}<10        =>   {Template_Netware:vfs.fs.size[/.last(0)}<10

sasha RESOLVED in r52315, r52317.

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 Feb 19 ]

(14) trigger expression converter can not convert expressions with items like "ftp,{$PORT.FTP}"

{Template_Simple:ftp,21.last(0)}#0 | {Template_Simple:ftp,{$PORT.FTP}.last(0)}#0 => {Template_Simple:net.tcp.service[ftp,,21].last(0)}#0 | {Template_Simple:ftp,{$PORT.FTP}.last(0)}#0

sasha RESOLVED in r52317.

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 Feb 19 ]

(15) IPMI interface should be added when <useipmi> tag is equal to 1

XML 1.8
      <useipmi>1</useipmi>
      <ipmi_ip>192.168.3.130</ipmi_ip>
      <ipmi_port>623</ipmi_port>

<ipmi_ip> can contain:

  • IP address
  • DNS name
  • macros {HOSTNAME}, {IPADDRESS}, {HOST.DNS}, {HOST.CONN}, {$MACRO}

oleg.egorov Retested
In ImportConverter exist check for IPMI interface. And it added only if exist IPMI items

sasha CLOSED

Comment by Alexander Vladishev [ 2015 Feb 19 ]

(16) items keys are converted incorrectly (related to (14))

XML 1.8
    <item type="0" key="vfs.fs.size[/,pfree]" value_type="0">

result:
    array(
        'Template_Linux' => array(
            'vfs.fs.size[/' => array(
                ...
                'key_' => 'vfs.fs.size[/'
            )
        )
    )

sasha RESOLVED in r52315

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 Feb 19 ]

(17) lastlogsize field must not be present after conversion

XML 1.8
    <item type="0" key="agent.ping" value_type="0">
        ...
        <lastlogsize>0</lastlogsize>
        ...
    </item>

result:
    array(
        'Template_Linux' => array(
            'agent.ping' => array(
                ...
                'lastlogsize' => '0',
                ...
            )
        )
    )

oleg.egorov RESOLVED IN r52391

sasha CLOSED

Comment by Alexander Vladishev [ 2015 Feb 19 ]

(18) bulk flag should be added only to SNMP interfaces

oleg.egorov RESOLVED r52411

sasha CLOSED

Comment by Alexander Vladishev [ 2015 Feb 20 ]

(19) Only simple checks must be converted to net.tcp.service<.perf>

sasha In trigger expressions we do not know the type of item. It will not be fixed. WON'T FIX

Comment by Alexander Vladishev [ 2015 Feb 20 ]

(20) Empty parameters from converted simple checks should be removed

net.tcp.service[ftp,,]

sasha RESOLVED in r52317.

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 Feb 20 ]

(21) Simple checks during conversion lose additional parameters

tcp,10,20 => net.tcp.service[ftp,,10]

It is better to leave such keys without any changes.

sasha

will be converted only keys:

  • without parameters (ftp => net.tcp.service[ftp])
  • with unquoted empty parameter (ftp, => net.tcp.service[ftp])
  • with unquoted numeric parameter (ftp,21 => net.tcp.service[ftp,,21])
  • with unquoted user macro (ftp,{$MACRO} => net.tcp.service[ftp,,{$MACRO}])

RESOLVED in r52317.

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 Feb 20 ]

(22) take a look at my changes in r52312.

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 Feb 20 ]

(23) take a look at my changes in r52322.

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 Feb 20 ]

(24) [XML 1.8] <show_legend> tag must be ignored for normal and stacked graphs

oleg.egorov RESOLVED IN r52391

sasha CLOSED

Comment by richlv [ 2015 Feb 23 ]

(25) it might be highly helpful if "export changelog" was updated as appropriate : https://www.zabbix.org/wiki/Export_changelog

iivs Export changelog was missing tons of information. Added everything that was added regarding the export. Please, review and report if something is amiss or too much "water".

RESOLVED

sasha Looks good to me. CLOSED

Comment by Alexander Vladishev [ 2015 Feb 26 ]

(26) when importing incorrect XML file a fatal error occurs

PHP Fatal error:  Cannot use string offset as an array in include/classes/import/readers/CXmlImportReader.php on line 89, referer: http://localhost/conf.import.php?rules_preset=template&sid=7f8cc4f8af8ac4f6

Other issues with incorrect format:
Add in XML file after <zabbix_export...>

<script src="URL"></script>

Invalid argument supplied for foreach()

Or change date in export file
For example:

<zabbix_export version="1.0" date="25,02,15" time="16.39">

Result:

Undefined offset: 2 [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CImportDataAdapter->load() → CConverterChain->convert() → C10ImportConverter->convert() → C10ImportConverter->convertTime() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\converters\C10ImportConverter.php:78]
Undefined offset: 1 [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CImportDataAdapter->load() → CConverterChain->convert() → C10ImportConverter->convert() → C10ImportConverter->convertTime() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\converters\C10ImportConverter.php:78]
A non well formed numeric value encountered [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CImportDataAdapter->load() → CConverterChain->convert() → C10ImportConverter->convert() → C10ImportConverter->convertTime() → mktime() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\converters\C10ImportConverter.php:80]

oleg.egorov XML validator fix this issue. CLOSED

Comment by Alexander Vladishev [ 2015 Feb 26 ]

(27) Errors when importing cisco_catalyst_2950

Undefined index: macros [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->gatherReferences() in include/classes/import/CConfigurationImport.php:169]
Invalid argument supplied for foreach() [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->gatherReferences() in include/classes/import/CConfigurationImport.php:169]

oleg.egorov Missed required fields in XML file

oleg.egorov File not found. CLOSED

Comment by Alexander Vladishev [ 2015 Feb 26 ]

(29) Errors when importing Mikrotik CCR1009-8G-1S

    Undefined offset: 2 [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CImportDataAdapter->load() → CConverterChain->convert() → C10ImportConverter->convert() → C10ImportConverter->convertTime() in include/classes/import/converters/C10ImportConverter.php:78]
    Undefined offset: 1 [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CImportDataAdapter->load() → CConverterChain->convert() → C10ImportConverter->convert() → C10ImportConverter->convertTime() in include/classes/import/converters/C10ImportConverter.php:78]
    Undefined index: time [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CImportDataAdapter->load() → CConverterChain->convert() → C10ImportConverter->convert() → C10ImportConverter->convertTime() in include/classes/import/converters/C10ImportConverter.php:79]
...

oleg.egorov RESOLVED

And this XML have incorrect version.
Should be 2.0

sasha CLOSED

Comment by richlv [ 2015 Feb 27 ]

(30) this might depend on ZBX-9346

iivs The problem described in ZBX-9346 is not implemented yet here.

<richlv> sorry, do you mean that the solution for it is not implemented or... ?

iivs I'll rephrase. Ongoing development in this branch is currently without a fix.

oleg.egorov RESOLVED in r53193

sasha

  1. cannot import zbx_hosts_export.xml
    Trigger "trigger" depends on trigger "trigger2", which does not exist.
  1. cannot import zbx_maps_export.xml
    Cannot find trigger "trigger" used in map "Local network2".

REOPENED

oleg.egorov RESOLVED IN r53597, r53606, r53617

sasha CLOSED

zalex_ua Just want to mention another use case which this change supposedly has fixed:
It was reproducible on 2.4.7 and latest 2.2 (disregarding on mentioned ZBX-9346)
Have a template with 2 triggers, 1st of them depends on 2nd;
export the template;
delete dependent 2nd trigger (its dependency in 1st trigger will be deleted automatically);
try to import the template again and get error:
Trigger "1st" depends on trigger "2nd", which does not exist.

Now it's not reproducible on trunk.

Comment by richlv [ 2015 Mar 07 ]

(31) let's make sure ZBX-5692 is fixed as expected

oleg.egorov RESOLVED

sasha Current message:

Invalid XML tag "/zabbix_export/triggers/trigger(1)": the tag "expression" is missing.

CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 Mar 13 ]

(32) Screen import issue.
Screen "4" row span in cell X - 0 Y - 0 is incorrect.
See zbx_screens_export (6).xml

Same issue exist in trunk. If export from 2.0 screen with rowspan or colspan = 0

oleg.egorov RESOLVED IN r52854

sasha CLOSED

Comment by richlv [ 2015 Mar 24 ]

(33) a comment in ZBX-5815 said this issue would solve it, too - let's verify that

oleg.egorov RESOLVED

sasha Current message:

Invalid XML tag "/zabbix_export/screens/screen(1)/screen_items/screen_item(1)": the tag "resource" is missing.

CLOSED

Comment by richlv [ 2015 Mar 24 ]

(34) it was also mentioned that this issue should fix ZBX-7381 - let's verify that

oleg.egorov RESOLVED

sasha Current message:

Invalid key "agent.ping[" for item "Agent ping" on "Zabbix server": unexpected end of key.

CLOSED

Comment by Alexander Vladishev [ 2015 Apr 24 ]

(35) "Undefined index" when importing 1.8 host with dependencies

Undefined index: dependencies [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CImportDataAdapter->load() → CConverterChain->convert() → C20ImportConverter->convert() → C20ImportConverter->convertTriggers() in include/classes/import/converters/C20ImportConverter.php:153]

sasha RESOLVED in r53369.

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 May 07 ]

(36) this issue should fix ZBX-9041 (graphs only).

sasha CLOSED

Comment by Alexander Vladishev [ 2015 May 07 ]

(37) this issue should fix ZBX-4853

sasha CLOSED

Comment by Alexander Vladishev [ 2015 May 08 ]

(38) r53507, r53508:

  • added REQUIRED flag for the \"(1.0)item/applications\" and \"(3.0)discovery_rule/host_prototypes\" tags
  • moved conversion of XML_INDEXED_ARRAYs into the CXmlValidatorGeneral::validateData() method
  • added possibility to remove linked templates from imported host/template

sasha RESOLVED

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 May 08 ]

(39) Added possibility to import the \"(1.0)host/host_profile\" and \"(1.0)host/host_profiles_ext\" tags. Minor refactoring of the related code.

sasha RESOLVEd in r53509.

oleg.egorov CLOSED

Comment by Alexander Vladishev [ 2015 May 08 ]

(40) small code refactoring (no functional changes)

sasha RESOLVED in r53511, r53515.

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 May 08 ]

(41) File: zbx_export_hosts (7).xml
Invalid XML tag "/zabbix_export/hosts/host(8)/discovery_rules/discovery_rule(2)": the tag "interface_ref" is missing

Export from 2.4

Other issue:
<interface_ref>if1</interface_ref> changed to <interface_ref/>

Result:

Undefined index:  [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:705]
No interface found. [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CDiscoveryRule->update() → CDiscoveryRule->checkInput() → CItemGeneral->checkInput() → CApiService::exception() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\api\services\CItemGeneral.php:268]

File: zbx_export_hosts (4).xml

Issue exist in 2.5.0 (trunk)

Undefined index:  [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() in C:\xampp\htdocs\trunk\frontends\php\include\classes\import\CConfigurationImport.php:757]
No interface found. [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CDiscoveryRule->update() → CDiscoveryRule->checkInput() → CItemGeneral->checkInput() → CApiService::exception() in C:\xampp\htdocs\trunk\frontends\php\include\classes\api\services\CItemGeneral.php:268]

RESOLVED IN r53563

sasha CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 May 08 ]

(42) File: zbx_export_hosts (10).xml
Export from 2.0

Undefined index: host_prototypes [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->gatherReferences() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:272]
Invalid argument supplied for foreach() [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->gatherReferences() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:272]
Undefined index: host_prototypes [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->gatherReferences() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:272]
Invalid argument supplied for foreach() [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->gatherReferences() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:272]
Undefined index: host_prototypes [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->gatherReferences() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:272]
Invalid argument supplied for foreach() [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->gatherReferences() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:272]
Created: Application "1" on "2.0.15_triggers".
Created: Discovery rule "111" on "2.0.15_triggers".
Created: Discovery rule "1111111" on "2.0.15_triggers".
Created: Item prototype "1111" on "2.0.15_triggers".
Created: Item prototype "11111" on "2.0.15_triggers".
Created: Item "1" on "2.0.15_triggers".
Created: Item "11" on "2.0.15_triggers".
Created: Application "3" on "2.0.15_triggers".
Created: Discovery rule "333" on "2.0.15_triggers".
Created: Discovery rule "3333333" on "2.0.15_triggers".
Created: Item prototype "3333" on "2.0.15_triggers".
Created: Item prototype "33333" on "2.0.15_triggers".
Created: Item "3" on "2.0.15_triggers".
Created: Item "33" on "2.0.15_triggers".
Created: Trigger "1" on "2.0.15_triggers".
Created: Trigger "11" on "2.0.15_triggers".
Created: Trigger prototype "111" on "2.0.15_triggers".
Created: Trigger prototype "1111" on "2.0.15_triggers".
Created: Trigger "3" on "2.0.15_triggers".
Created: Trigger "33" on "2.0.15_triggers".
Created: Trigger prototype "333" on "2.0.15_triggers".
Created: Trigger prototype "3333" on "2.0.15_triggers".
Created: Application "CPU" on "oleg".
Created: Application "Filesystems" on "oleg".
Created: Application "General" on "oleg".
Created: Application "Memory" on "oleg".
Created: Application "Network interfaces" on "oleg".
Created: Application "OS" on "oleg".
Created: Application "Performance" on "oleg".
Created: Application "Processes" on "oleg".
Created: Application "Zabbix agent" on "oleg".
Created: Discovery rule "Network interface discovery" on "oleg".
Created: Discovery rule "Mounted filesystem discovery" on "oleg".
Created: Item prototype "Incoming network traffic on $1" on "oleg".
Created: Item prototype "Outgoing network traffic on $1" on "oleg".
Created: Item prototype "Free disk space on $1" on "oleg".
Created: Item prototype "Free disk space on $1 (percentage)" on "oleg".
Created: Item prototype "Total disk space on $1" on "oleg".
Created: Item prototype "Used disk space on $1" on "oleg".
Created: Item "Host name of zabbix_agentd running" on "oleg".
Created: Item "Agent ping" on "oleg".
Created: Item "Version of zabbix_agent(d) running" on "oleg".
Created: Item "Average disk read queue length" on "oleg".
Created: Item "Average disk write queue length" on "oleg".
Created: Item "File read bytes per second" on "oleg".
Created: Item "File write bytes per second" on "oleg".
Created: Item "Number of threads" on "oleg".
Created: Item "Number of processes" on "oleg".
Created: Item "Processor load (15 min average)" on "oleg".
Created: Item "Processor load (1 min average)" on "oleg".
Created: Item "Processor load (5 min average)" on "oleg".
Created: Item "Free swap space" on "oleg".
Created: Item "Total swap space" on "oleg".
Created: Item "System information" on "oleg".
Created: Item "System uptime" on "oleg".
Created: Item "Free memory" on "oleg".
Created: Item "Total memory" on "oleg".
Created: Trigger "Host name of zabbix_agentd was changed on {HOST.NAME}" on "oleg".
Created: Trigger "Zabbix agent on {HOST.NAME} is unreachable for 5 minutes" on "oleg".
Created: Trigger "Version of zabbix_agent(d) was changed on {HOST.NAME}" on "oleg".
Created: Trigger "Too many processes on {HOST.NAME}" on "oleg".
Created: Trigger "Processor load is too high on {HOST.NAME}" on "oleg".
Created: Trigger "Lack of free swap space on {HOST.NAME}" on "oleg".
Created: Trigger "Host information was changed on {HOST.NAME}" on "oleg".
Created: Trigger "{HOST.NAME} has just been restarted" on "oleg".
Created: Trigger "Lack of free memory on server {HOST.NAME}" on "oleg".
Created: Trigger prototype "Free disk space is less than 20% on volume {#FSNAME}" on "oleg".
Created: Application "4" on "2.0.15_triggers".
Created: Item "1" on "1".
Created: Item "4" on "2.0.15_triggers".
Created: Item "item" on "2.0_new".
Created: Item "1" on "2.4_graph_test".
Created: Item "1" on "dep".
Created: Item "2" on "dep".
Created: Item "item" on "dep5".
Created: Item "1" on "dep6".
Created: Item "2" on "dep6".
Created: Item "ss" on "oleg".
Updated: Item "item" on "test".
Created: Discovery rule "44" on "2.0.15_triggers".
Created: Discovery rule "Discovery" on "Discovery".
Created: Discovery rule "Discovery2" on "Discovery".
Undefined index: host_prototypes [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:816]
Invalid argument supplied for foreach() [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:816]
Undefined index: host_prototypes [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:816]
Invalid argument supplied for foreach() [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:816]
Undefined index: host_prototypes [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:816]
Invalid argument supplied for foreach() [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:816]
Created: Item prototype "444" on "2.0.15_triggers".
Created: Item prototype "item" on "Discovery".
Created: Trigger prototype "44" on "2.0.15_triggers".
Created: Trigger prototype "trigger" on "Discovery, 2.0.15_triggers".
Cannot find item "system.cpu.load[,avg1]" on "oleg" used in trigger "Proc1". [conf.import.php:190 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processTriggers() in C:\xampp\htdocs\ZBX-7654\frontends\php\include\classes\import\CConfigurationImport.php:124]

RESOLVED IN r53567

sasha CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 May 11 ]

(43) File: zbx_maps_export (1).xml
Invalid XML tag "/zabbix_export/sysmaps/sysmap(1)/selements/selement(1)": the tag "label_location" is missing

Map export from 1.8

oleg.egorov RESOLVED IN r53552

sasha CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 May 15 ]

Implemented in 2.5.0(trunk) r53622

Comment by Oleg Egorov (Inactive) [ 2015 Aug 06 ]

(44) File: new_issue_zbx_hosts_export.xml - Export from 1.8
Result:

Undefined index: ymin_type_1 [conf.import.php:189 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CImportDataAdapter->load() → CConverterChain->convert() → C20ImportConverter->convert() → C20ImportConverter->convertGraphs() in C:\xampp\htdocs\trunk\frontends\php\include\classes\import\converters\C20ImportConverter.php:321]
Undefined index: ymax_type_1 [conf.import.php:189 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CImportDataAdapter->load() → CConverterChain->convert() → C20ImportConverter->convert() → C20ImportConverter->convertGraphs() in C:\xampp\htdocs\trunk\frontends\php\include\classes\import\converters\C20ImportConverter.php:327]

gunarspujats RESOLVED in r54799

sasha please review an alternative solution

RESOLVED in r54921

gunarspujats CLOSED

gunarspujats Fixed in:

  • pre-2.5.0 (trunk) r54926
Comment by richlv [ 2016 Oct 24 ]

subissues still open: (1), (25)

Generated at Thu Mar 28 12:58:28 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.