Ad Widget

Collapse

Copy items with history

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EvilShadow
    Junior Member
    • Mar 2007
    • 13

    #1

    Copy items with history

    I've collected traffic statistics on server with the help of zabbix agent (as net.if.in, net.if.out). Now I want to change source for this data from zabbix agent to snmp counters on switch, that this server plugged in. I create new host and use "copy selected to...", but it only copies items, not the history. But it's quite sad to loose all history, graphs etc for this values. Is there any way to move items from host to host completely, with history?
    Zabbix v. 1.4.4
    Thanks.
  • Petya
    Member
    • Dec 2007
    • 37

    #2
    Quite simple using mysql console and issuing several SQL commands.

    1) find out old itemid:
    select itemid, description from items where description like '%old description of your item%';

    2) find out new itemid
    select itemid, description from items where description like '%new description of your item%';

    3) update history (for uint variables; or some other history* table for other value types):
    update history set itemid = NEW_ITEMID where itemid = OLD_ITEMID;

    4) update trends -- just like history

    I might have forgotten something, but maybe not.

    Comment

    • EvilShadow
      Junior Member
      • Mar 2007
      • 13

      #3
      Everything works perfect. Thanks a lot.

      Comment

      Working...