Ad Widget

Collapse

MySQL Backend | Update History and Trend settings | MySQL Partitioning

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • syndeysider
    Senior Member
    • Oct 2013
    • 115

    #1

    MySQL Backend | Update History and Trend settings | MySQL Partitioning

    Hi Guys

    Want to know if anyone's successfully and without effects, mass updated their policy on historical and trend data timing via MySQL Statements?

    I recently ran into "out of disk space" errors and had to flush our historical and trend data with drop table statements.

    We doing about 4+GB per day and I'd like to manage this by implementing stricter historical/trend data retention periods.

    I followed : https://www.zabbix.org/wiki/Docs/howto/mysql_partition to enable SQL Partitioning.

    I have partition_maintenance_all set to keep historical data for 14 days (history tables) and 180 days for trend data.

    Question

    Currently, the items table has various values for history column, ranging between 7-90 days and the trends table has various values ranging between 90-365.

    Is the following MySQL Statements correct to align the Zabbix Item History/Trend settings with my partitioning setup?

    update items set history = '14' where history <> '14';
    update items set trends = '180' where trends <> '180';
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by syndeysider
    Hi Guys

    Want to know if anyone's successfully and without effects, mass updated their policy on historical and trend data timing via MySQL Statements?
    Yes but it was on zabbix 1.8.x.
    Now on zabbix 2.2.x you can change this by Administration->General->Housekeeping.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • syndeysider
      Senior Member
      • Oct 2013
      • 115

      #3
      Thanks for the reply.

      I guess i should have mentioned that we are now on 2.0.x and only set to migrate to 2.2.x early next year.

      Also, with MySQL Partitioning enabled, the recommendation is to turn off housekeeping, so the settings applied via housekeeper would not affect the outcome.

      Comment

      Working...