Ad Widget

Collapse

Help with sever that went 6 month into the future!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sbadger
    Member
    • Dec 2005
    • 81

    #1

    Help with sever that went 6 month into the future!

    My Zabbix server was accidentally unplugged the other day resulting in a little database corruption. That was easily fixed, but the server came up with a date about 6 months in the future. My problem is now how to keep the historical data that I have and get rid of the future data. I know a restore of the last backup would work, but this particular server is my most neglected when it comes to backups. Does any body know a query or something similar to erase future date from the database?
  • bbrendon
    Senior Member
    • Sep 2005
    • 870

    #2
    Before the cleanup code was working properly in zabbix, i ran a manual script deleting metric data from the database.

    i think there are three or four tables holding the data. They are pretty obvious. Just convert the current date of the disaster to unix time and delete everything after that. zabbix stores the timestamps for metrics in unix time last i recall.

    If you are still lost, you have to break out the mysql client and do this manually in the database.
    Unofficial Zabbix Expert
    Blog, Corporate Site

    Comment

    • sbadger
      Member
      • Dec 2005
      • 81

      #3
      I will enlist the help of mysql dba to see if he can write something to remove those then.

      Thanks for the help.

      Comment

      • sbadger
        Member
        • Dec 2005
        • 81

        #4
        I was able to get the invalid dates cleared out, but I still have some items the show the last time they where checked to be that date. It seems that the items with the longer check times are the ones that are having the problems. I have disabled the host for vairous lenghts of time and have even tried jsut disabling the items and reenabling them. So far no luck geting these items to be rechecked. So the question is now how to make these items recheck without removing them and readding? Can I go into a table and remove the last check to make it recheck?

        Comment

        Working...