Ad Widget

Collapse

Zabbix 1.8 export/import does not work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #16
    Originally posted by yjeff
    In 1.8 , when you export the template, the XML file created has 0 byte, why?
    that's a different problem, most likely. which php version ? any errors in apache/php logs ?
    Zabbix 3.0 Network Monitoring book

    Comment

    • yjeff
      Junior Member
      • Aug 2008
      • 12

      #17
      Thank for your reply

      Thank you .

      I restart my computer, It seems OK.

      Comment

      • jwagdy
        Junior Member
        • Sep 2009
        • 7

        #18
        Regarding the exporting issue, I have got a CentOS 5.4 32bit test server to prepare for an upgrade from our 1.4. I have installed PHP 5.2.9 from CentOS test repository.

        The following is installed on the core server
        make
        wget
        gcc
        mysql-server
        mysql-devel
        curl-devel
        httpd
        php-mysql
        php-bcmath
        php-gd
        net-snmp-devel
        php-mbstring
        ntp

        Zabbix works perfectly. However, when I tested to export, I got an error message on IE (HTTP 500 Internal Server Error)

        I check Apache log files and they display the following errors

        [Sun Dec 27 16:51:39 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: require_once(include/classes/class.domdocument.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /var/www/html/include/config.inc.php on line 74, referer: http://xxx.xxx.xxx.xxx/export.php?sid=299e26d4eccbe7dc

        [Sun Dec 27 16:51:39 2009] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'include/classes/class.domdocument.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/include/config.inc.php on line 74, referer: http://xxx.xxx.xxx.xxx/export.php?sid=299e26d4eccbe7dc

        any clue as to what is that?

        Thanks

        Comment

        • richlv
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2005
          • 3112

          #19
          Originally posted by jwagdy
          [Sun Dec 27 16:51:39 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: require_once(include/classes/class.domdocument.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /var/www/html/include/config.inc.php on line 74, referer: http://xxx.xxx.xxx.xxx/export.php?sid=299e26d4eccbe7dc
          that is supposed to be internal php stuff, but some distros apparently package it as separate module. if available, try installing php-xml package, which supposedly contains domdocument class as well.
          Zabbix 3.0 Network Monitoring book

          Comment

          • jwagdy
            Junior Member
            • Sep 2009
            • 7

            #20
            You are correct. It is php-xml which had errors during the installation. Thanks

            Comment

            • Jason
              Senior Member
              • Nov 2007
              • 430

              #21
              I've noticed a problem with the export...

              I've a trigger with the expresion...

              {Template_BackupExec:BE_job_start[daily_exchange_bricklevel].nodata(21600)}&{Template_BackupExec:BE_job_start[daily_exchange_bricklevel].last(0)}=1

              However, if I export it then this is the XML I get

              <trigger>
              <description>BE: Daily Exchange Bricklevel has been running &gt; 6 hours</description>
              <type>0</type>
              <expression>{Template_BackupExec:BE_job_start[daily_exchange_bricklevel].nodata(21600)}</expression>
              <url/>
              <status>0</status>
              <priority>2</priority>
              <comments/>
              </trigger>

              Everything after the & (or | in other triggers) seems to be lost.

              Also although the dependency exists in the XML file..

              <dependency description="Template_BackupExec:BE: Daily Exchange Bricklevel has been running &gt; 6 hours">
              <depends>Template_BackupExec:BE: Daily Exchange Bricklevel has been running &gt; 10 hours</depends>
              </dependency>


              when I import the template there is no dependency shown.

              Comment

              • Spectroman
                Junior Member
                • Sep 2008
                • 17

                #22
                php class error

                Well folks,

                I had a problem with the import of XML templates.

                The first place I had a look was the apache error log and I found:

                PHP Fatal error: Call to undefined method CTemplate::add() in /data/www/htdocs/include/export.inc.php on line 585, referer: http://undiscloseddomain.com/import....18db771e01d71b

                ---

                checking the code, I figured out that there is no CTemplate::add() function, then I changed in the referred error line to:

                CTemplate::create

                After a test, everything seems to be working really fine.

                Hope it help.

                Comment

                • Jason
                  Senior Member
                  • Nov 2007
                  • 430

                  #23
                  I did that fix before I started with export/import, but it still doesn't help for triggers with AND or OR conditions in them.

                  Comment

                  • richlv
                    Senior Member
                    Zabbix Certified Trainer
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Oct 2005
                    • 3112

                    #24
                    i recall a problem like that being fixed - could you try 1.8.1 ?
                    Zabbix 3.0 Network Monitoring book

                    Comment

                    • rboersma
                      Junior Member
                      • Jan 2010
                      • 29

                      #25
                      No solution, but I'm interested in the BE template that your using. Could you maybe post it on the forum?

                      Thanks in advance.

                      Ruud.

                      Comment

                      • Jason
                        Senior Member
                        • Nov 2007
                        • 430

                        #26
                        The export does seem to be working in 1.8.1.

                        The template I'm using takes input from a vb script, I've written, that reads the alerts table in the backupexec database and then sends the relevant data back to zabbix. Its not completely finished yet, but when it is I'll post it and the template to the cookbook.

                        Jason

                        Comment

                        • DB601
                          Member
                          • Jun 2010
                          • 30

                          #27
                          hello,

                          i'm using the version 1.8 of zabbix and i have a problem with the import
                          when i import XML file i have this msg "imported successfully" but i don't find the file!

                          someone can help me?

                          thanks

                          Comment

                          • rboersma
                            Junior Member
                            • Jan 2010
                            • 29

                            #28
                            Which OS are you runing Zabbix on?
                            Do you have php-xml or php-dom installed?

                            EDIT: since this thread is brought back to life again..Jason do you have the backup exec script finished? I could really use it now.

                            Comment

                            • DB601
                              Member
                              • Jun 2010
                              • 30

                              #29
                              hello,

                              I want make a script in perl to generate items and graphs dynamically , i tested one script that i found but it doesn't run i have a msg :

                              -bash: ./cisco_xml.pl: /usr/bin/perl^M: bad interpreter: No such file or directory


                              i don't know why!

                              can you help me pleasee
                              Attached Files

                              Comment

                              Working...