Zabbixのhistoryとtrendsの違いに関して、Forumにトピックがあったのでメモ。
History vs trends – ZABBIX Forums
なんとなくhistoryはitemで取得した生データ、trendsはhistoryを一定期間で丸めたデータ、と勝手に解釈していましたが、おおよそ間違いではなかったようです。
The history tables store the data as is, the trends tables store that data as a 30 minute trend average with min and max values,
trendsは30分間隔での平均値、最小値、最大値とのこと。
ただ、trendsへのデータ保存はhistoryから削除するHouseKeepingのタイミングで実施しているのだろうと思っていたのですけれど、そこは勘違いしていました。
zabbix_server/housekeeper/housekeeper.cのhousekeeping_history_and_trends()をみても、削除はhistoryもtrendsも同じようにおこなっていてhistoryからtrendsへの移送などはおこなっていません。
で、グラフで表示する値は24時間以内であればhistoryを使い、それより長い期間の場合はtrendsを使うとのことです。
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.
Sorry, the comment form is closed at this time.