ceilometer和gnocchi中相对应的概念
ceilometer | gnocchi |
---|---|
resource | resource |
meter | metric |
sample/event | measure |
ceilometer和gnocchi的关系
ceilometer用来获得数据,gnocchi用来存储数据;
在ceilometer中还有panko(用来存储event)和aodh(用来设置警报),这篇文章不会涉及。
https://docs.openstack.org/ceilometer/latest/contributor/architecture.html
gnocchi是什么
Gnocchi is an open-source time series database.
The problem that Gnocchi solves is the storage and indexing of time series data and resources at a large scale. This is useful in modern cloud platforms which are not only huge but also are dynamic and potentially multi-tenant. Gnocchi takes all of that into account.
Because Gnocchi computes all the aggregations at ingestion, getting the data back is extremely fast, as it just needs to read back the pre-computed results.
gnocchi的架构
从下面可以看到它需要三个存储,分别是measure/aggregate/index.
# vi /etc/gnocchi/gnocchi.conf
measure和aggregate的配置如下:
[storage]
#coordination_url = redis://controller:6379
file_basepath = /var/lib/gnocchi
driver = file
index的配置如下:
[indexer]
#url = sqlite:var/lib/gnocchi/gnocchidb
url = mysql+pymysql://gnocchi:GNOCCHI_DBPASS@controller/gnocchi
archive policy
An archive policy defines which aggregations to compute and how many aggregates to keep. Gnocchi supports a variety of aggregation methods, such as minimum, maximum, average, Nth percentile, standard deviation, etc. Those aggregations are computed over a period of time (called granularity) and are kept for a defined timespan.
(gnocchi) archive-policy list #进入gnocchi之后,显示所有的归档策略
+----------------------+-------------+-----------------------------------------------------------------------+---------------------------------+
| name | back_window | definition | aggregation_methods |
+----------------------+-------------+-----------------------------------------------------------------------+---------------------------------+
| bool | 3600 | - timespan: 365 days, 0:00:00, granularity: 0:00:01, points: 31536000 | last |
| ceilometer-high | 0 | - timespan: 1:00:00, granularity: 0:00:01, points: 3600 | mean |
| | | - timespan: 1 day, 0:00:00, granularity: 0:01:00, points: 1440 | |
| | | - timespan: 365 days, 0:00:00, granularity: 1:00:00, points: 8760 | |
| ceilometer-high-rate | 0 | - timespan: 1:00:00, granularity: 0:00:01, points: 3600 | mean, rate:mean |
| | | - timespan: 1 day, 0:00:00, granularity: 0:01:00, points: 1440 | |
| | | - timespan: 365 days, 0:00:00, granularity: 1:00:00, points: 8760 | |
| ceilometer-low | 0 | - timespan: 30 days, 0:00:00, granularity: 0:05:00, points: 8640 | mean |
| ceilometer-low-rate | 0 | - timespan: 30 days, 0:00:00, granularity: 0:05:00, points: 8640 | mean, rate:mean |
| high | 0 | - timespan: 1:00:00, granularity: 0:00:01, points: 3600 | count, max, sum, min, mean, std |
| | | - timespan: 7 days, 0:00:00, granularity: 0:01:00, points: 10080 | |
| |