Ad Widget

Collapse

zabbix 1.1 copy a template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ghislain
    Senior Member
    • Jun 2005
    • 160

    #1

    zabbix 1.1 copy a template

    Hello,

    I wanted to copy all item to a template i created from an existing template. Is there an easy way to do it ? I cannot find one in the Gui like we had the 'copy allitems from xxx'.

    Regards,
    Ghislain.
    Regards,
    Ghislain.
  • erisan500
    Senior Member
    Zabbix Certified Specialist
    • Aug 2005
    • 285

    #2
    No, there isn't for the moment but we are happy to receive patches/hacks

    Greetings
    EriSan
    Zabbix Certified Specialist

    Comment

    • ghislain
      Senior Member
      • Jun 2005
      • 160

      #3
      i do not have the skill to make a patch but here is what i used:

      insert into items select NULL,type,snmp_community,snmp_oid,snmp_port,10010, description,key_,delay,history,trends,nextcheck,la stvalue,lastclock,prevvalue,status,value_type,trap per_hosts,units,multiplier,delta,prevorgvalue,snmp v3_securityname,snmpv3_securitylevel,snmpv3_authpa ssphrase,snmpv3_privpassphrase,formula,error,lastl ogsize,logtimefmt,templateid,valuemapid from items where hostid=10004;

      replace the 10004 by the template id you copy from
      and 10010 by the hostid you copy to


      best regards,
      Ghislain.
      Regards,
      Ghislain.

      Comment

      • jvalen
        Junior Member
        • Mar 2006
        • 12

        #4
        I cpoy the tamplate as follow:

        a. Create a template via Zabbix front end.
        b. taket the Id.
        c. run this sql statment via mysql.

        -- Copy template win32 10002 to a new one ID: 10018

        insert into items
        select 0,type,snmp_community,snmp_oid,snmp_port,10018,des cription,key_,
        delay,history,trends,nextcheck,lastvalue,lastclock ,prevvalue,status,value_type,
        trapper_hosts,units,multiplier,delta,
        prevorgvalue, snmpv3_securityname, snmpv3_securitylevel, snmpv3_authpassphrase,
        snmpv3_privpassphrase, formula, error, lastlogsize, logtimefmt, templateid,
        valuemapid

        from items
        where
        hostid = 10002


        This only copies the items, not the triggers nor graphics.

        Jorge V.S:'060606

        Comment

        • matboy
          Member
          • May 2005
          • 35

          #5
          It would be nice to have the same thing available so we can copy the triggers and graphs too, or one of these two.

          Does someone has this available ?

          Comment

          Working...