gnocchi中的resource/metric/measure等的关系

本文介绍了OpenStack中的Gnocchi和Ceilometer的关系,Gnocchi作为一个开源时间序列数据库,负责大规模时间序列数据和资源的存储与索引。文章详细阐述了Gnocchi的架构,包括measure、aggregate和index,并探讨了archive policy、resource、metric和measure的概念。在Gnocchi中,Ceilometer收集的数据经过处理后存储,资源与度量通过特定配置关联,而measure作为数据点,包含了时间戳和值。在安装Gnocchi并执行特定命令后,数据才会在存储目录和MySQL数据库中出现。
摘要由CSDN通过智能技术生成

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.

https://gnocchi.xyz/

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      |                                 |
|                      |             
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值