Ad Widget

Collapse

Zabbix 1.8 import problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jansonz
    Member
    • Dec 2006
    • 53

    #1

    Zabbix 1.8 import problem

    Hello,

    Ia have problem to Import hosts in zabbix. The error in Apache log file is:
    PHP Warning: require_once(include/classes/class.domdocument.php): failed to open stream: No such file or directory in /var/www/zabbix_new/include/config.inc.php on line 74
  • jansonz
    Member
    • Dec 2006
    • 53

    #2
    Sorry, I solved the problem.

    I installed the php-xml package.

    Comment

    • jansonz
      Member
      • Dec 2006
      • 53

      #3
      I have different problem:

      PHP Notice: Undefined index: templates in /var/www/zabbix_new/api/classes/class.ctemplate.php on line 669

      PHP Warning: Invalid argument supplied for foreach() in /var/www/zabbix_new/include/triggers.inc.php on line 1907

      Have you any idea?

      Comment

      • jansonz
        Member
        • Dec 2006
        • 53

        #4
        I found this solution: http://www.zabbix.com/forum/showpost...95&postcount=3

        I changed 585 line in include/export.inc.php

        From:

        $current_host = CTemplate::Add($host_db);

        To:
        $current_host = CTemplate::create($host_db);

        but the problem is still the same. Can enybody help me?

        Comment

        • Mikrodots
          Member
          • Mar 2008
          • 37

          #5
          import and template clone issues in 1.8

          followed this solution as well: http://www.zabbix.com/forum/showpost...95&postcount=3 as well - It did not work for me.

          I don't see anything in the Zabbix server log indicating what went wrong - should i be looking somewhere else?

          This is essentially a fresh install of Zabbix 1.8 - not an upgrade
          I exported everything from 1.6.x
          Updated php
          Installed 1.8 using bbrendon's script (modified for 1.8) - this script wipes out the db and starts fresh - passes all setup requirements

          Install was smooth but now I can not import the xml file - it doesn't look like anything is happening - is there a log file I should be looking at?

          Also - maybe another topic - I cannot clone or full clone templates - (I can full clone a host)

          Mikrodots

          Here's the results when I try to full clone Template_HP_Procurve
          ERROR: Cannot add template
          * Added new host [My_Template_HP_Procurve]
          * Added new item My_Template_HP_Procurve:icmpInAddrMaskReps
          * Added new item My_Template_HP_Procurve:icmpInAddrMasks
          * Added new item My_Template_HP_Procurve:icmpInDestUnreachs
          * Added new item My_Template_HP_Procurve:icmpInEchoReps
          * Added new item My_Template_HP_Procurve:icmpInEchos
          * Added new item My_Template_HP_Procurve:icmpInErrors
          * Added new item My_Template_HP_Procurve:icmpInMsgs
          * Added new item My_Template_HP_Procurve:icmpInParmProbs
          * Added new item My_Template_HP_Procurve:icmpInRedirects
          * Added new item My_Template_HP_Procurve:icmpInSrcQuenchs
          * Added new item My_Template_HP_Procurve:icmpInTimeExcds
          * Added new item My_Template_HP_Procurve:icmpInTimestampReps
          * Added new item My_Template_HP_Procurve:icmpInTimestamps
          * Added new item My_Template_HP_Procurve:icmpOutAddrMaskReps
          * Added new item My_Template_HP_Procurve:icmpOutAddrMasks
          * Added new item My_Template_HP_Procurve:icmpOutDesUnreachs
          <SNIP>
          * Added new item My_Template_HP_Procurve:ifInErrors01
          * Added new item My_Template_HP_Procurve:ifInErrors02
          * Added new item My_Template_HP_Procurve:ifInErrors03
          * Added new item My_Template_HP_Procurve:ifInErrors04
          * Added new item My_Template_HP_Procurve:ifInErrors05
          * Added new item My_Template_HP_Procurve:ifInErrors06
          * Added new item My_Template_HP_Procurve:ifInErrors07
          * Added new item My_Template_HP_Procurve:ifInErrors08
          * Added new item My_Template_HP_Procurve:ifInErrors09
          * Added new item My_Template_HP_Procurve:ifInErrors10
          * Added new item My_Template_HP_Procurve:ifInErrors11
          * Added new item My_Template_HP_Procurve:ifInErrors12
          * Added new item My_Template_HP_Procurve:ifInErrors13
          * Added new item My_Template_HP_Procurve:ifInErrors14
          * Added new item My_Template_HP_Procurve:ifInErrors15
          * Added new item My_Template_HP_Procurve:ifInErrors16
          * Added new item My_Template_HP_Procurve:ifInErrors17
          * Added new item My_Template_HP_Procurve:ifInErrors18

          <SNIP long text more of the same>

          * Graph "if43" added to hosts "My_Template_HP_Procurve"
          * Graph "if44" added to hosts "My_Template_HP_Procurve"
          * Graph "if45" added to hosts "My_Template_HP_Procurve"
          * Graph "if46" added to hosts "My_Template_HP_Procurve"
          * Graph "if47" added to hosts "My_Template_HP_Procurve"
          * Graph "if48" added to hosts "My_Template_HP_Procurve"
          * Graph "if49" added to hosts "My_Template_HP_Procurve"
          * Graph "if50" added to hosts "My_Template_HP_Procurve"
          * Graph "if51" added to hosts "My_Template_HP_Procurve"

          Comment

          • Mikrodots
            Member
            • Mar 2008
            • 37

            #6
            Okay - I got the import to work.

            I'm not sure which of these did the trick, but here's what I did:

            I did this edit:
            from this thread: edit export.inc.php
            include/export.inc.php
            585 line
            $current_host = CTemplate::Add($host_db);
            function in class.ctemplate.php named create
            correct line
            $current_host = CTemplate::create($host_db);

            And This PHP update
            from this link: How to install PHP 5.2.6 on Centos 5.3
            [root@zabbix ~]# rpm --import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
            [root@zabbix ~]# cd /etc/yum.repos.d
            [root@zabbix ~]# wget http://dev.centos.org/centos/5/CentOS-Testing.repo
            [root@zabbix ~]# yum --disablerepo=* --enablerepo=c5-testing update php

            Also added this line to above update to install php-xml
            yum --disablerepo=* --enablerepo=c5-testing install php-xml

            Still couldn't import...

            Edited the XML file

            maybe the xml file was just too long at 166454 lines, but here's what I did:

            I deleted all the built-in templates and dependencies from the xml file leaving just my hosts and custom templates

            The xml file was reduced to16162 lines (about 10% of it's original size)

            Tried the import and got an error that a group didn't exist.

            Manually recreated all the groups

            Imported the modified xml again and it worked.

            The dependencies will need to be recreated (I may try to import them) and the enabled/disabled items reset.

            At least I got the hosts and custom templates back - which was my big concern.

            I still can not create a clone of a template - looks like a separate issue, I'll start a new thread for it.

            Mikrodots
            Last edited by Mikrodots; 11-12-2009, 16:47. Reason: Clarification

            Comment

            • Mikrodots
              Member
              • Mar 2008
              • 37

              #7
              clone or full clone templates 1.8 - bug link

              Clone template issue was/is a bug:

              See this link:

              Comment

              Working...