Ad Widget

Collapse

migrating monitoring data to other itemid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hupp
    Junior Member
    • Feb 2008
    • 23

    #1

    migrating monitoring data to other itemid

    Hi,

    I changed an important switch in my network from 100MBit model to 1GBit model.

    The interfaces are discoverd by the zabbix 2.0 function.

    Now i will take over the monitored data from the old interface to the new one. My idea was to make an update query in the mysql databes and change the itemid from old interface in the new.

    Is this possible? Is history_uint the correct table?

    Hope some zabbix experts can help me with that.
    Last edited by hupp; 13-11-2012, 18:13.
  • hupp
    Junior Member
    • Feb 2008
    • 23

    #2
    Does nobody can help me?

    Comment

    • hupp
      Junior Member
      • Feb 2008
      • 23

      #3
      I tried it in a test setup and found the solution. The tables are trends_uint and history_uint.

      First check if the new itemid doesn´t has values older than your miration time. If so you should delete them.

      Then you can make two update querys with will migrate the data to the new item id:

      Code:
      UPDATE `zabbix`.`trends_uint` SET `itemid` = 'NewItemID' WHERE `trends_uint`.`itemid` =OldItemID AND `trends_uint`.`clock` <UnixtimeMigration;
      UPDATE `zabbix`.`history_uint` SET `itemid` = 'NewItemID' WHERE `history_uint`.`itemid` =OldItemID AND `history_uint`.`clock` <UnixtimeMigration;
      For example:
      Old ItemID: 100100000030639 (In my case the old switchport incoming traffic)
      New ItemID: 100100000052088 (In my case the new switchport incoming traffic)
      Time of switch change in the datacenter: 06.11. 06:00:00 Uhr = 1352178000 Unixtimestamp

      Code:
      UPDATE `zabbix`.`trends_uint` SET `itemid` = '100100000052088' WHERE `trends_uint`.`itemid` =100100000030639 AND `trends_uint`.`clock` <1352178000;
      UPDATE `zabbix`.`history_uint` SET `itemid` = '100100000052088' WHERE `history_uint`.`itemid` =100100000030639 AND `history_uint`.`clock` <1352178000;

      This must be also don for the outgoing traffic. Hope I can help somebody else with that

      Comment

      Working...