Ad Widget

Collapse

Import error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spaww
    Senior Member
    Zabbix Certified Specialist
    • May 2009
    • 178

    #1

    Import error

    Hi,

    I try to export and import a group of servers.

    Export is ok.

    Import fails with message:
    ERROR: Import failed
    * No permission for Template [001_Apache]

    Where we can check what is happening ?

    Best Regards,
    Adail Horst
    Adail Horst
    OCA/OCP - Oracle Application Server
    ZABBIX Certified Specialist
    http://www.spinola.net.br/blog (Blog sobre Zabbix e tecnologia)
  • spaww
    Senior Member
    Zabbix Certified Specialist
    • May 2009
    • 178

    #2
    Debug Info:

    ******************* Estatísticas de script *************************
    Tempo total: 0.14809
    Limite de memória : 128M
    Uso de memória : 1.25M - 10.5M (9.25M)
    Memory peak : 10.5M
    Contador de seleções SQL: 20
    Contador de execuções SQL: 7
    Contador de requisições SQL: 27
    Data:6.6E-5 SQL: SET NAMES utf8
    Data:3.4E-5 SQL: SET CHARACTER SET utf8
    Data:8.2E-5 SQL: SELECT * FROM nodes WHERE nodetype=1 ORDER BY nodeid
    Data:0.000334 SQL: SELECT u.*,s.* FROM sessions s,users u WHERE s.sessionid='255fdcc3ec0f7ba55be7180cf55371e0' AND s.status=0 AND s.userid=u.userid AND ((s.lastaccess+u.autologout>1295894614) OR (u.autologout=0)) AND ((u.userid BETWEEN 000000000000000 AND 099999999999999))
    Data:4.5E-5 SQL: SELECT MAX(g.gui_access) as gui_access FROM usrgrp g, users_groups ug WHERE ug.userid=1 AND g.usrgrpid=ug.usrgrpid
    Data:4.7E-5 SQL: SELECT g.usrgrpid FROM usrgrp g, users_groups ug WHERE ug.userid = 1 AND g.usrgrpid = ug.usrgrpid AND g.users_status = 1 LIMIT 1 OFFSET 0
    Data:0.002111 SQL: UPDATE sessions SET lastaccess=1295894614 WHERE sessionid='255fdcc3ec0f7ba55be7180cf55371e0'
    Data:5.9E-5 SQL: SELECT g.usrgrpid FROM usrgrp g, users_groups ug WHERE ug.userid = 1 AND g.usrgrpid = ug.usrgrpid AND g.debug_mode = 1 LIMIT 1 OFFSET 0
    Data:9.2E-5 SQL: SELECT * FROM profiles WHERE userid=1 AND ((profileid BETWEEN 000000000000000 AND 099999999999999)) ORDER BY userid ASC, profileid ASC
    Data:6.1E-5 SQL: SELECT * FROM config WHERE ((configid BETWEEN 000000000000000 AND 099999999999999))
    Data:5.7E-5 SQL: SELECT title1, url1, title2, url2, title3, url3, title4, url4, title5, url5 FROM user_history WHERE userid=1
    Data:4.2E-5 SQL: begin
    Data:7.6E-5 SQL: SELECT h.hostid FROM hosts h WHERE ((h.hostid BETWEEN 000000000000000 AND 099999999999999)) AND h.status IN (0,1) AND ( (h.host IN ('Zabbix server')) ) LIMIT 1 OFFSET 0
    Data:4.1E-5 SQL: SELECT h.hostid FROM hosts h WHERE ((h.hostid BETWEEN 000000000000000 AND 099999999999999)) AND h.status IN (5,6) AND (h.hostid IN (0))
    Data:0.000309 SQL: SELECT g.groupid FROM groups g WHERE ((g.groupid BETWEEN 000000000000000 AND 099999999999999)) AND ( (g.name IN ('Zabbix servers')) ) LIMIT 1 OFFSET 0
    Data:0.000154 SQL: SELECT g.* FROM groups g WHERE ((g.groupid BETWEEN 000000000000000 AND 099999999999999)) AND ( (g.name IN ('Zabbix servers')) )
    Data:0.00015 SQL: SELECT g.groupid FROM groups g WHERE ((g.groupid BETWEEN 000000000000000 AND 099999999999999)) AND ( (g.name IN ('CIMAR')) ) LIMIT 1 OFFSET 0
    Data:4.7E-5 SQL: SELECT g.groupid FROM groups g WHERE ((g.groupid BETWEEN 000000000000000 AND 099999999999999)) AND ( (g.name IN ('CIMAR')) ) LIMIT 1 OFFSET 0
    Data:0.000102 SQL: SELECT nextid FROM ids WHERE nodeid=0 AND table_name='groups' AND field_name='groupid' FOR UPDATE
    Data:0.000106 SQL: SELECT max(groupid) AS id FROM groups WHERE groupid>=0 AND groupid<=99999999999
    Data:0.000119 SQL: INSERT INTO ids (nodeid,table_name,field_name,nextid) VALUES (0,'groups','groupid',6)
    Data:0.00011 SQL: INSERT INTO groups (name,groupid) VALUES ('CIMAR',6)
    Data:9.5E-5 SQL: SELECT g.* FROM groups g WHERE ((g.groupid BETWEEN 000000000000000 AND 099999999999999)) AND (g.groupid IN (6))
    Data:6.8E-5 SQL: SELECT h.* FROM hosts h WHERE ((h.hostid BETWEEN 000000000000000 AND 099999999999999)) AND h.status=3 AND ((h.hostid BETWEEN 000000000000000 AND 099999999999999)) AND ( (h.host IN ('001_Apache')) )
    Data:0.000218 SQL: rollback
    Data:0.000307 SQL: SELECT DISTINCT g.* FROM groups g,hosts_groups hg,hosts h WHERE ((g.groupid BETWEEN 000000000000000 AND 099999999999999)) AND hg.groupid=g.groupid AND h.hostid=hg.hostid AND h.status IN(0,1)
    Data:4.7E-5 SQL: SELECT title5, url5 FROM user_history WHERE userid=1
    Tempo total gasto na SQL: 0.004979
    ******************** Fim de script ***************************
    Adail Horst
    OCA/OCP - Oracle Application Server
    ZABBIX Certified Specialist
    http://www.spinola.net.br/blog (Blog sobre Zabbix e tecnologia)

    Comment

    • spaww
      Senior Member
      Zabbix Certified Specialist
      • May 2009
      • 178

      #3
      I make a DOWNGRADE from 1.8.4 frontend to 1.8.3 frontend and now works fine.

      I observe another BUG in 1.8.4 frontend, i cannot save itens using MACROS like:
      jboss[TotalMemory,{$JBOSS_PORT}]

      With message:

      Error in item key: invalid character '{' at position
      Adail Horst
      OCA/OCP - Oracle Application Server
      ZABBIX Certified Specialist
      http://www.spinola.net.br/blog (Blog sobre Zabbix e tecnologia)

      Comment

      • Leonidimus
        Junior Member
        • May 2007
        • 12

        #4
        I also have a 'No permission for Template' error when importing in 1.8.4. I don't really want to go back to 1.8.3 though. Does anyone know how to fix the PHP front-end?

        Comment

        • Leonidimus
          Junior Member
          • May 2007
          • 12

          #5
          Kinda solved

          If anyone is interested, the 'No permission for Template' error actually meant that the linked (parent) template didn't exist at the moment of the esception generation because it wasn't imported yet. So, apparently:
          1) the order of templates in the XML file is important and it's not correct by default;
          2) you probably cannot just transfer the whole Zabbix config to another host via a single XML;
          I didn't modify the big XML file, though - instead I exported/imported all root templates first and then all the rest, so it took several XML files to migrate 1.6.9 to 1.8.4

          Comment

          • WernerCD
            Member
            • Apr 2011
            • 37

            #6
            Better late...

            Better late than never... what fixed the problem for me was:

            Import TEMPLATE Element *ONLY*... THEN Import *EVERYTHING*.

            Same thing for Hosts... First imported HOSTS... then imported everything else.

            This post gave me the idea to try that.

            Comment

            • arikin
              Junior Member
              • Aug 2011
              • 27

              #7
              Thank You all

              Thank you. This worked for 1.8.5 also.
              Importing the base "Elements" only in the first import then,
              Importing the everything else the second import.

              Be an xml tree,
              Think like an xml tree,
              And the dependencies fall into place.

              Comment

              Working...