History vs trends

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    History vs trends

    Hi,

    I am trying to find out the difference between history and trends. I didn't find anything in the documentation..

    Fom my understanding, history is for short terms and trends for long terms.

    Looking at mysql tables, I have a big table for history which seems normal.
    All my items are configured for 90 days of history.

    I use mainly zabbix for its screens and graphs feature.

    What will be the impact of reducing the history to 30 days? For example, will it affect the result of a query for a month period in a screen.

    I will be happy to write something in the new wiki :-) when I found out about how it really works.

    Thanks for your help.

    #2
    Greetings,
    Originally posted by djinn_fr22
    Fom my understanding, history is for short terms and trends for long terms.
    Yes and no. Their intent is what you describe, their actual usage is a bit different. The history tables store the data as is, while the trends tables store that data as a 30 minute trend average with min and max values, as well as the count of values used to create those average, min, and max values. Because of this, it is not uncommon for the trend table to be as large or larger than the history tables they are trending.

    I have not been able to confirm it by reading the code, but from what I can tell, trend data starts 24 hours after initial item value collection, and goes until the time you have configured, whereas history starts after the second item value collection. So if you have an item configured to collect every 30 seconds, your first history item will be at the 60 second mark and your first trend item will be at the 24 hour mark.

    What will be the impact of reducing the history to 30 days? For example, will it affect the result of a query for a month period in a screen.
    The only time trends are used is in graphs, and the triggers I have in the PATCH: Bulk Fixes / Changes For 1.1.6 or in the PATCH: Temporal Displacement, 3 new trigger funcs patches. Even then, the trends are only used in graphs if you go beyond the history in your item configuration.
    Unofficial Zabbix Developer

    Comment


      #3
      Originally posted by James Wells
      I have not been able to confirm it by reading the code, but from what I can tell, trend data starts 24 hours after initial item value collection, and goes until the time you have configured, whereas history starts after the second item value collection. So if you have an item configured to collect every 30 seconds, your first history item will be at the 60 second mark and your first trend item will be at the 24 hour mark.
      This is not correct. ZABBIX updates trends immediately after receipt of new value. Therefore, all information stored in trends is always valid and up-to-date (updated in realtime).

      ZABBIX generates all graphs are generated from detailed history if period is less than 24 hours, and the trends are used for graphs having period longer than 24 hours.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment


        #4
        Originally posted by Alexei
        This is not correct. ZABBIX updates trends immediately after receipt of new value. Therefore, all information stored in trends is always valid and up-to-date (updated in realtime).

        ZABBIX generates all graphs are generated from detailed history if period is less than 24 hours, and the trends are used for graphs having period longer than 24 hours.
        Excellent... Thanx.
        Unofficial Zabbix Developer

        Comment


          #5
          First, thanks you for your quick answer.

          I am still a bit confused about your answer.

          For my purpose, graph and screen, I think it will be best to decrease history to 15 days or less, it won't change anything in term of display, but I will store less dat, especially data that I don't need.

          Am I right ?

          Thanks

          Comment


            #6
            History setting?

            Originally posted by Alexei
            This is not correct. ZABBIX updates trends immediately after receipt of new value. Therefore, all information stored in trends is always valid and up-to-date (updated in realtime).

            ZABBIX generates all graphs are generated from detailed history if period is less than 24 hours, and the trends are used for graphs having period longer than 24 hours.
            If this is the case, what is the purpose of keeping history values for more than 24 hours? Since they won't be used in graph creation, what else would they be used for?

            Thanks

            Comment


              #7
              Originally posted by lreadshaw
              If this is the case, what is the purpose of keeping history values for more than 24 hours? Since they won't be used in graph creation, what else would they be used for?

              Thanks
              The data can be used for any purpose including custom reports. Also do not forget that non-numeric data (log files, etc) must be stored longer than 24 hours.

              In general, yes, you may set history to 24 hours for numeric data, this won't affect ZABBIX operations.
              Alexei Vladishev
              Creator of Zabbix, Product manager
              New York | Tokyo | Riga
              My Twitter

              Comment


                #8
                I got another question.

                When i show the history of an element and the period is more then 3 days then the trendvalues are used.

                If the period is less then 3 days the history values are used.

                Is this right? That woul mean that the limit isn't 24h, but 73h.

                I'm using Zabbix 1.4.2.
                Attached Files
                Last edited by Beam; 13-09-2007, 14:11.

                Comment


                  #9
                  When you want watch history values on a given time period, ZABBIX will show you values's history table matching in this time period (1 value for each interval monitor time) and it will try to complete data from the trends table (1 average hourly value) for those values that are no longer available in the history table.
                  Last edited by testos; 24-10-2007, 17:30.

                  Comment


                    #10
                    History and Trends for Graphs in Zabbix 2.0.0

                    Originally posted by Alexei View Post
                    The data can be used for any purpose including custom reports. Also do not forget that non-numeric data (log files, etc) must be stored longer than 24 hours.

                    In general, yes, you may set history to 24 hours for numeric data, this won't affect ZABBIX operations.
                    I'd like to know if in Zabbix 2.0.0 this is still valid, does anyone know this?

                    Comment

                    Announcement

                    Collapse
                    No announcement yet.
                    Working...
                    X