Ad Widget

Collapse

Help with zabbix DB size - I think I messed up

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • khemrajk2003
    Junior Member
    • Jan 2017
    • 7

    #1

    Help with zabbix DB size - I think I messed up

    Hi everyone,

    this is my first zabbix forum post so if I do post anything incorrectly, please bear with me.

    I am running zabbix 2.4.6, monitoring 2,819 hosts, 201611 enabled items. History data is kept for 7 days and trends data is kept for 2,190 days.

    Our mysql DB size was at 337GB and growing. We were reaching our disk space limit, so I truncated our history and history_uint tables along with trends and trends_uint tables.

    I do not think I should have truncated the above mentioned trends tables, as looking at data for previous days/weeks/months no longer shows any info.

    Should I have not truncate the trends table, what would I need to do to restore the trends information only to see past data?

    Thank you.
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #2
    well yea, you deleted all graph history and trigger history.
    did you backed up the machine\DB\snapshot first ?

    Comment

    • Pada
      Senior Member
      • Apr 2012
      • 236

      #3
      Hourly aggregates (min, max, avg) from the history tables are written to the trends table, same for history_uint gets aggregated into trends_uint.

      So if you want to restore your past data, then you should restore the "trends" tables.

      Comment

      • khemrajk2003
        Junior Member
        • Jan 2017
        • 7

        #4
        Hi Thank you for the replies batchenr and Pada.

        I did backup the mysql DB and attempted to restore the trends and trends_uint tables following the directions here: https://www.percona.com/blog/2013/11...ith-mysql-5-6/

        It "seemed" to work, I was able to view past data, but after about I would say 1 hour, I kept getting the error message from the zabbix web gui "zabbix is down, information may not be up to date". I could not find anything wrong as to why I kept getting that message, so I had to revert back to the trends* tables before the restore and that solved the "zabbix down issue"

        I tested the table restores on a test zabbix server I have running the same zabbix version as the production one, the difference being the test server is running rhel 7u2 and the prod one is running rhel 6u8 and there are no clients sending data to the test server. I was able to restore the tables on the test server (using the method in the link I provided) and it worked fine and still is working as of now.

        Thanks for the replies. I am new at this so if you have any pointers / tips, I would greatly appreciate it.

        Comment

        Working...