ZABBIX Forums  
  #1  
Old 19-03-2007, 16:52
djinn_fr22 djinn_fr22 is offline
Member
 
Join Date: Jan 2007
Posts: 54
Default 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.
Reply With Quote
  #2  
Old 19-03-2007, 17:32
James Wells James Wells is offline
Senior Member
 
Join Date: Jun 2005
Location: Everett, Wa. USA
Posts: 637
Default

Greetings,
Quote:
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.

Quote:
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.
Reply With Quote
  #3  
Old 19-03-2007, 18:52
Alexei Alexei is offline
Zabbix developer, product manager
 
Join Date: Sep 2004
Location: Riga, Latvia
Posts: 5,615
Lightbulb

Quote:
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
Reply With Quote
  #4  
Old 19-03-2007, 19:12
James Wells James Wells is offline
Senior Member
 
Join Date: Jun 2005
Location: Everett, Wa. USA
Posts: 637
Default

Quote:
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.
Reply With Quote
  #5  
Old 20-03-2007, 11:19
djinn_fr22 djinn_fr22 is offline
Member
 
Join Date: Jan 2007
Posts: 54
Default

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
Reply With Quote
  #6  
Old 01-06-2007, 20:02
lreadshaw lreadshaw is offline
Junior Member
 
Join Date: Jun 2006
Posts: 8
Default History setting?

Quote:
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
Reply With Quote
  #7  
Old 02-06-2007, 09:11
Alexei Alexei is offline
Zabbix developer, product manager
 
Join Date: Sep 2004
Location: Riga, Latvia
Posts: 5,615
Lightbulb

Quote:
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
Reply With Quote
  #8  
Old 13-09-2007, 14:00
Beam Beam is offline
Junior Member
 
Join Date: May 2007
Posts: 12
Default

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 Images
  

Last edited by Beam; 13-09-2007 at 14:11.
Reply With Quote
  #9  
Old 24-10-2007, 17:27
testos testos is offline
Member
 
Join Date: Apr 2007
Location: Madrid (Spain)
Posts: 85
Default

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 at 17:30.
Reply With Quote
  #10  
Old 28-06-2012, 20:03
fabioctba fabioctba is offline
Junior Member
 
Join Date: Jun 2010
Posts: 6
Default History and Trends for Graphs in Zabbix 2.0.0

Quote:
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?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:52.