ceilometer 相关
https://docs.openstack.org/ceilometer/train/install/install-base-rdo.html
train版本OpenStack安装部署。
https://blog.csdn.net/dandanfengyun/article/details/112917279
ceilometer与gnocchi
ceilometer项目是openstack中用来做计量计费功能的一个组件,后来又逐步发展增加了部分监控采集、告警的功能。由于种种原因,ceilometer项目在Openstack中已经处于一种没落的状态,基本没有什么新的特性开发了,原本该项目的PTL也另起炉灶开始在做Gnocchi项目(ceilometer的后端存储系统)。虽然该项目已经没有前几年活跃,但是还是在很多公有云场景中有比较多的应用,而生产环境中,可能很多公司还用的是M、N版本。
转自
https://blog.csdn.net/mengalong/article/details/81196481
gnocchi解决的问题是大规模地存储和索引时间序列数据和资源。
http://gnocchi.xyz
ceilometer收集虚拟机数据然后将数据存储到gnocchi数据库,最后由grafana 前端展示数据图表。
不过grafana高版本似乎对gnocchi的兼容不足,3-6版本之间的可以实现兼容。grafana6以上的似乎无法兼容 gnocchi 数据源。因此部署时需重新安装6版本以下的grafana实现 gnocchi数据源的添加展示。
且ceilometer有时在主机重启后需要重新启动相关服务 才会继续收集数据。
docker restart ceilometer_ipmi ceilometer_compute ceilometer_central ceilometer_notification
部署相关组件
train版本自动安装的grafana 版本7.3.7。无法添加gnocchi的dataresource。。。(一致testing无法成功)
因此想要使用grafana展示gnocchi中数据的话。需要安装更低版本的grafana。
如安装6.3.4版本的grafana,端口号设置为3002避免和通过kolla部署的冲突。
编辑配置文件。
vim /etc/kolla/globals.yml
enable_ceilometer: "yes"
enable_ceilometer_ipmi: "yes"
enable_gnocchi: "yes"
enable_grafana: "yes"
部署安装
kolla-ansible deploy -i /etc/kolla/all-in-one
安装完成查看相关容器运行
[root@ALLInOne-Kolla ~]# docker ps -a | grep -e ceilometer -e gnocchi -e grafana
0bec855b4a25 kolla/centos-binary-grafana:train "dumb-init --single-…" 2 weeks ago Up 53 minutes grafana
e7edc514bbc8 kolla/centos-binary-ceilometer-ipmi:train "dumb-init --single-…" 2 weeks ago Up 54 minutes ceilometer_ipmi
7f198cc0757e kolla/centos-binary-ceilometer-compute:train "dumb-init --single-…" 2 weeks ago Up 54 minutes ceilometer_compute
ddf54797e3ee kolla/centos-binary-ceilometer-central:train "dumb-init --single-…" 2 weeks ago Up 55 minutes ceilometer_central
d8d3bdb576f3 kolla/centos-binary-ceilometer-notification:train "dumb-init --single-…" 2 weeks ago Up 17 minutes ceilometer_notification
d6c90a4b3bd6 kolla/centos-binary-gnocchi-statsd:train "dumb-init --single-…" 2 weeks ago Up 55 minutes gnocchi_statsd
899e3458d32b kolla/centos-binary-gnocchi-metricd:train "dumb-init --single-…" 2 weeks ago Up 55 minutes gnocchi_metricd
0e0de420ca0b kolla/centos-binary-gnocchi-api:train "dumb-init --single-…" 2 weeks ago Up 55 minutes gnocchi_api
安装gnocchiclient 查看数据。
默认部署 ceilometer 数据保存到gnocchi中保存策略是low。基本上5分钟保存一次数据。。。所以数据有时候需要等一下。
长时间无数据且查看相关容器正常运行后 或者宿主机重启后 建议重启ceilometer_notification容器 可能解决问题。
docker restart ceilometer_notification
或者重启 ceilemeter 相关所有容器
docker restart ceilometer_ipmi ceilometer_compute ceilometer_central ceilometer_notification
1.安装gnocchiclient
pip install gnocchiclient
2.加载认证
source /etc/kolla/admin-openrc.sh
3.通过gnocchi-api查看gnocchi中存储数据。
当前采集的资源列表
gnocchi resource list
列出支持资源类别列表
gnocchi resource-type list
列出某个资源的数据采集单元 (resource_ID)
gnocchi metric list | grep 511483be-89a2-4b7e-91b8-41adf4276651
显示单个metric的记录数据,(metric_ID)
gnocchi measures show e45156e4-7544-49a1-ab9a-a22fdc1f56e2
查看帮助
gnocchi --help
或者官网查看http://gnocchi.xyz
[root@ALLInOne-Kolla ~]# gnocchi measures show e45156e4-7544-49a1-ab9a-a22fdc1f56e2
+---------------------------+-------------+-----------+
| timestamp | granularity | value |
+---------------------------+-------------+-----------+
| 2021-02-25T13:35:00+08:00 | 300.0 | 82311.0 |
| 2021-02-25T13:40:00+08:00 | 300.0 | 112481.0 |
| 2021-02-25T13:45:00+08:00 | 300.0 | 142721.0 |
| 2021-02-25T13:50:00+08:00 | 300.0 | 172247.0 |
| 2021-02-25T13:55:00+08:00 | 300.0 | 202557.0 |
| 2021-02-25T14:00:00+08:00 | 300.0 | 232643.0 |
| 2021-02-25T14:05:00+08:00 | 300.0 | 262617.0 |
| 2021-02-25T14:10:00+08:00 | 300.0 | 292409.0 |
+---------------------------+-------------+-----------+
数据保存完成且可查看,下一步是通过grafana展示
Grafana展示
安装完成添加gnocchi数据源后使用dashboard模板展示数据。
https://grafana.com/grafana/dashboards/12536
使用kolla部署的grafana版本过高 似乎不再支持gnocchi 的数据源插件了。
只好额外安装一个更低版本的grafana软件。6.4.3。。。
yum -y install wget
wget https://dl.grafana.com/oss/release/grafana-6.4.3-1.x86_64.rpm
sudo yum -y install grafana-6.4.3-1.x86_64.rpm
修改 端口为3002,因为kolla部署的grafana容器组件占用了3000
vim /etc/grafana/grafana.ini
[server]
http_port = 3002
修改完成 保存。启动grafana6.4.3
systemctl enable grafana-server
systemctl start grafana-server
grafana安装gnocchi 数据源插件
sudo grafana-cli plugins install gnocchixyz-gnocchi-datasource
安装 完成 重启grafana
systemctl restart grafana-server
设置配置文件,允许grafana6.4.3读取gnocchi数据。
cp /etc/kolla/keystone/keystone.conf /etc/kolla/config/
cp /etc/kolla/gnocchi-api/gnocchi.conf /etc/kolla/config/
配置gnocchi
vim /etc/kolla/config/gnocchi.conf
原来是默认设置了 3000端口,但是默认的grafana 添加gnocchi数据源时一直testing 无法成功。只好使用6.4.3版本grafana的3002 端口。
[cors]
allowed_origin = http://192.168.199.90:3002
配置 keystone
vim /etc/kolla/config/keystone.conf
[cors]
allowed_origin = http://192.168.199.90:3002
设置完成 kolla重新加载配置
kolla-ansible reconfigure -i /etc/kolla/all-in-one
设置gnocchi数据源。使用dashboard模板展示数据。
等待配置重新加载完成后。网页登录进入grafana6.4.3
192.168.199.90:3002
由于这个grafana不是通过kolla 部署的,所以未设置密码。初次登录的话,账户密码都是admin。
添加数据源 Add data source 选择gnocchi
Name Gnocchi
HTTP
URL http://192.168.199.90:5000
Gnocchi Details
Auth Mode keystone
Domain default
Project User 和Password可以根据根据gnocchi配置文件中的认证填写
也可以是Project和User选择填写admin, password填写Openstack中admin用户的登录密码
[root@ALLInOne-Kolla ~]# cat /etc/kolla/gnocchi-api/gnocchi.conf
。。。。。。
[keystone_authtoken]
www_authenticate_uri = http://192.168.199.90:5000/v3
project_domain_id = default
project_name = service
user_domain_id = default
username = gnocchi
password = 928futiqdqBWBzcmjN7lRTr6HesCEz259rtthtIZ
auth_url = http://192.168.199.90:35357
auth_type = password
memcache_security_strategy = ENCRYPT
memcache_secret_key = TA1Zu3xlEbytDYCNyKhyWa1PWaGYOxRzB6oyDH50
memcached_servers = 192.168.199.90:11211
认证没问题即可成功添加 gnocchi的数据源。
选择导入相应的 dashboard 模板。
由于个人对 gnocchi的查询语法不熟悉,所以使用了grafana公开的gnocchi dashboard模板来展示
https://grafana.com/grafana/dashboards?dataSource=gnocchixyz-gnocchi-datasource
使用的是模板 12536
输入模板ID 后按enter 。等待一会后即可导入模板,会让选择数据源,选择刚添加的gnocchi数据源 即可。
当然可以自己根据数据源设置dashboard,只是我gnocchi查询不熟。所以直接使用他人的模板了。
效果大致如下
设置保存策略。
5分钟记录一次数据太慢尝试修改保存策略。
通过gnocchi查看 已知的保存策略
[root@ALLInOne-Kolla ~]# gnocchi archive-policy list
+----------------------+-------------+-----------------------------------------------------------------------+---------------------------------+
| name | back_window | definition | aggregation_methods |
+----------------------+-------------+-----------------------------------------------------------------------+---------------------------------+
| bool | 3600 | - points: 31536000, granularity: 0:00:01, timespan: 365 days, 0:00:00 | last |
| ceilometer-high | 0 | - points: 3600, granularity: 0:00:01, timespan: 1:00:00 | mean |
| | | - points: 1440, granularity: 0:01:00, timespan: 1 day, 0:00:00 | |
| | | - points: 8760, granularity: 1:00:00, timespan: 365 days, 0:00:00 | |
| ceilometer-high-rate | 0 | - points: 3600, granularity: 0:00:01, timespan: 1:00:00 | rate:mean, mean |
| | | - points: 1440, granularity: 0:01:00, timespan: 1 day, 0:00:00 | |
| | | - points: 8760, granularity: 1:00:00, timespan: 365 days, 0:00:00 | |
| ceilometer-low | 0 | - points: 8640, granularity: 0:05:00, timespan: 30 days, 0:00:00 | mean |
| ceilometer-low-rate | 0 | - points: 8640, granularity: 0:05:00, timespan: 30 days, 0:00:00 | rate:mean, mean |
| high | 0 | - points: 3600, granularity: 0:00:01, timespan: 1:00:00 | std, count, min, max, sum, mean |
| | | - points: 10080, granularity: 0:01:00, timespan: 7 days, 0:00:00 | |
| | | - points: 8760, granularity: 1:00:00, timespan: 365 days, 0:00:00 | |
| low | 0 | - points: 8640, granularity: 0:05:00, timespan: 30 days, 0:00:00 | std, count, min, max, sum, mean |
| medium | 0 | - points: 10080, granularity: 0:01:00, timespan: 7 days, 0:00:00 | std, count, min, max, sum, mean |
| | | - points: 8760, granularity: 1:00:00, timespan: 365 days, 0:00:00 | |
+----------------------+-------------+-----------------------------------------------------------------------+---------------------------------+
查看当前各个metric的保存策略
[root@ALLInOne-Kolla ~]# gnocchi metric list
+--------------------------------------+---------------------+--------------------------------------------+---------+--------------------------------------+
| id | archive_policy/name | name | unit | resource_id |
+--------------------------------------+---------------------+--------------------------------------------+---------+--------------------------------------+
| 10cadca4-56b2-4175-9892-4e8b94cc78ad | ceilometer-low-rate | cpu | ns | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| 2524130a-cdad-4ccf-9ad6-e3db9aa12ada | ceilometer-low | volume.provider.pool.capacity.virtual_free | GB | 0b354884-f2f9-5427-b4ec-362e0aaa0940 |
| 3027d217-e5dd-491c-8e27-29f692bad0cd | ceilometer-low | disk.root.size | GB | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| 38fe2c09-389f-4ffe-98d4-edd4770ebc4f | ceilometer-low | memory.usage | MB | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| 43cbf7b9-ca4d-44c2-acaf-2be058327981 | ceilometer-low | volume.provider.capacity.provisioned | GB | 3973b2b8-8e6c-5b5f-982e-d56b399ce688 |
| 43ed1a45-ccc0-4201-a22e-c21707009989 | ceilometer-low-rate | network.incoming.bytes | B | 2d492809-8e0a-533a-a141-487714121eca |
| 4526c626-f610-415e-8f94-23b23c63c541 | ceilometer-low | volume.provider.capacity.virtual_free | GB | 3973b2b8-8e6c-5b5f-982e-d56b399ce688 |
| 58f02ba7-cd3e-44cd-8117-49ac58c3738f | ceilometer-low | volume.provider.pool.capacity.allocated | GB | 0b354884-f2f9-5427-b4ec-362e0aaa0940 |
| 646c800a-c725-4902-a47b-783d3820ae22 | ceilometer-low | memory | MB | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| 65030467-6b2f-45b6-a51c-26b512ecd90a | ceilometer-low | volume.provider.pool.capacity.total | GB | 0b354884-f2f9-5427-b4ec-362e0aaa0940 |
| 7373abe7-250f-4552-9cd3-dcbf5e1dbf13 | ceilometer-low | volume.provider.capacity.total | GB | 3973b2b8-8e6c-5b5f-982e-d56b399ce688 |
| 7705fc61-906b-4490-aae0-7219b41f535f | ceilometer-low | volume.provider.pool.capacity.free | GB | 0b354884-f2f9-5427-b4ec-362e0aaa0940 |
| 864995bd-f0b5-427d-888c-92af9e95b886 | ceilometer-low | volume.provider.capacity.allocated | GB | 3973b2b8-8e6c-5b5f-982e-d56b399ce688 |
| 8a7d44e5-9f02-4101-bb1e-32dc33ab6b86 | ceilometer-low | disk.ephemeral.size | GB | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| 8dc58d4a-958e-4686-b90b-7f9099385226 | ceilometer-low-rate | disk.device.write.requests | request | 7b7454da-6681-5a3b-9b17-817d6e6a0af5 |
| 9efccb23-e90c-4baf-873f-898679c3b169 | ceilometer-low-rate | network.outgoing.bytes | B | 2d492809-8e0a-533a-a141-487714121eca |
| b11ee54e-ead1-4c7d-b1b7-8cf654b091ba | ceilometer-low-rate | network.outgoing.packets | packet | 2d492809-8e0a-533a-a141-487714121eca |
| b8799978-fed4-42ff-9ecc-1ecd1b304c4b | ceilometer-low-rate | network.incoming.packets | packet | 2d492809-8e0a-533a-a141-487714121eca |
| c1f0d462-91de-4758-b0f9-f0a2d01442a1 | ceilometer-low | volume.provider.pool.capacity.provisioned | GB | 0b354884-f2f9-5427-b4ec-362e0aaa0940 |
| c2e8d5e6-5c3c-4dfd-bcc0-4d20203fbe52 | ceilometer-low-rate | disk.device.read.requests | request | 7b7454da-6681-5a3b-9b17-817d6e6a0af5 |
| dcbcd2c7-bd06-4610-946d-02a9f490671f | ceilometer-low | volume.provider.capacity.free | GB | 3973b2b8-8e6c-5b5f-982e-d56b399ce688 |
| e0a4affd-57aa-4c9b-8065-6fa0c40310b6 | ceilometer-low | vcpus | vcpu | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| e2af0940-f633-427b-9a67-23386b9970da | ceilometer-low-rate | disk.device.read.bytes | B | 7b7454da-6681-5a3b-9b17-817d6e6a0af5 |
| f28055ff-ee55-4b22-904b-e23d16c39a22 | ceilometer-low-rate | disk.device.write.bytes | B | 7b7454da-6681-5a3b-9b17-817d6e6a0af5 |
+--------------------------------------+---------------------+--------------------------------------------+---------+--------------------------------------+
基本保存策略都是ceilometer,特别的如网络磁盘等数据累加的使用ceilometer-low-rate策略。
修改保存策略
通过docker exec 命令进入ceilometer 相应的容器,查看保存策略的设置。。。
ceilometer相关容器
[root@ALLInOne-Kolla ~]# docker ps -a | grep ceilometer
e7edc514bbc8 kolla/centos-binary-ceilometer-ipmi:train "dumb-init --single-…" 3 weeks ago Up 3 hours ceilometer_ipmi
7f198cc0757e kolla/centos-binary-ceilometer-compute:train "dumb-init --single-…" 3 weeks ago Up 31 minutes ceilometer_compute
ddf54797e3ee kolla/centos-binary-ceilometer-central:train "dumb-init --single-…" 3 weeks ago Up 32 minutes ceilometer_central
d8d3bdb576f3 kolla/centos-binary-ceilometer-notification:train "dumb-init --single-…" 3 weeks ago Up 32 minutes ceilometer_notification
进入ceilometer_notification 查看保存策略
[root@ALLInOne-Kolla ~]# docker exec -it ceilometer_notification bash
(ceilometer-notification)[ceilometer@ALLInOne-Kolla /]$
查看保存策略
cat /etc/ceilometer/gnocchi_resources.yaml
---
archive_policy_default: ceilometer-low
archive_policies:
# NOTE(sileht): We keep "mean" for now to not break all gating that
# use the current tempest scenario.
- name: ceilometer-low
aggregation_methods:
- mean
back_window: 0
definition:
- granularity: 5 minutes
timespan: 30 days
- name: ceilometer-low-rate
aggregation_methods:
- mean
- rate:mean
back_window: 0
definition:
- granularity: 5 minutes
timespan: 30 days
- name: ceilometer-high
aggregation_methods:
- mean
back_window: 0
definition:
- granularity: 1 second
timespan: 1 hour
- granularity: 1 minute
timespan: 1 day
- granularity: 1 hour
timespan: 365 days
- name: ceilometer-high-rate
aggregation_methods:
- mean
- rate:mean
back_window: 0
definition:
- granularity: 1 second
timespan: 1 hour
- granularity: 1 minute
timespan: 1 day
- granularity: 1 hour
timespan: 365 days
resources:
- resource_type: identity
metrics:
identity.authenticate.success:
identity.authenticate.pending:
identity.authenticate.failure:
identity.user.created:
identity.user.deleted:
identity.user.updated:
identity.group.created:
identity.group.deleted:
identity.group.updated:
identity.role.created:
identity.role.deleted:
identity.role.updated:
identity.project.created:
identity.project.deleted:
identity.project.updated:
identity.trust.created:
identity.trust.deleted:
identity.role_assignment.created:
identity.role_assignment.deleted:
......
可以看到默认的保存策略 为ceilometer-low,特别的metric 有单独的保存策略设置。
可以将该配置文件复制到宿主机的config 配置目录中。修改一定的保存策略设置,然后kolla重新加载配置,即可设置ceilometer新的保存策略。
gnocchi_resources.yaml 配置文件。
https://download.csdn.net/download/dandanfengyun/15501637
mkdir -p /etc/kolla/config/ceilometer
cd /etc/kolla/config/ceilometer
将gnocchi_resources.yaml配置文件复制进去并设置。
vim /etc/kolla/config/ceilometer/gnocchi_resources.yaml
只修改网络相关 保存策略 为ceilometer-high-rate,其余配置不变。
archive_policy_default: ceilometer-low
archive_policies:
......
resources:
......
- resource_type: instance_network_interface
metrics:
network.outgoing.packets:
archive_policy_name: ceilometer-high-rate
network.incoming.packets:
archive_policy_name: ceilometer-high-rate
network.outgoing.packets.drop:
archive_policy_name: ceilometer-high-rate
network.incoming.packets.drop:
archive_policy_name: ceilometer-high-rate
network.outgoing.packets.error:
archive_policy_name: ceilometer-high-rate
network.incoming.packets.error:
archive_policy_name: ceilometer-high-rate
network.outgoing.bytes:
archive_policy_name: ceilometer-high-rate
network.incoming.bytes:
archive_policy_name: ceilometer-high-rate
attributes:
name: resource_metadata.vnic_name
instance_id: resource_metadata.instance_id
kolla重启加载配置策略
kolla-ansible reconfigure /etc/kolla/all-in-one
配置完成后,已经存在得metric保存策略不变,新建的虚拟实例的相关 metric 保存策略使用新的。
如
[root@ALLInOne-Kolla ~]# gnocchi metric list
+--------------------------------------+----------------------+--------------------------------------------+---------+--------------------------------------+
| id | archive_policy/name | name | unit | resource_id |
+--------------------------------------+----------------------+--------------------------------------------+---------+--------------------------------------+
| 044ef065-fc1b-4908-a309-9e9cef87ccc1 | ceilometer-low-rate | disk.device.read.bytes | B | 384cab92-3a03-5abb-943e-5c405335c923 |
| 0b7348ee-ecf1-4fdd-878f-1c6ecc46d04c | ceilometer-low | disk.root.size | GB | cc56761d-4afd-425a-a108-4b279271d6d2 |
| 10cadca4-56b2-4175-9892-4e8b94cc78ad | ceilometer-low-rate | cpu | ns | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| 1d288b8d-ae3b-417d-9314-4375af250299 | ceilometer-low | volume.size | GB | a1283de6-ba99-48c5-9e43-9bf1f1b4d274 |
| 2524130a-cdad-4ccf-9ad6-e3db9aa12ada | ceilometer-low | volume.provider.pool.capacity.virtual_free | GB | 0b354884-f2f9-5427-b4ec-362e0aaa0940 |
| 3027d217-e5dd-491c-8e27-29f692bad0cd | ceilometer-low | disk.root.size | GB | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| 346bd2ec-3d28-4b24-9397-50a7a2329e83 | ceilometer-low | memory.usage | MB | cc56761d-4afd-425a-a108-4b279271d6d2 |
| 38fe2c09-389f-4ffe-98d4-edd4770ebc4f | ceilometer-low | memory.usage | MB | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| 43cbf7b9-ca4d-44c2-acaf-2be058327981 | ceilometer-low | volume.provider.capacity.provisioned | GB | 3973b2b8-8e6c-5b5f-982e-d56b399ce688 |
| 43ed1a45-ccc0-4201-a22e-c21707009989 | ceilometer-low-rate | network.incoming.bytes | B | 2d492809-8e0a-533a-a141-487714121eca |
| 4526c626-f610-415e-8f94-23b23c63c541 | ceilometer-low | volume.provider.capacity.virtual_free | GB | 3973b2b8-8e6c-5b5f-982e-d56b399ce688 |
| 49357c46-602f-4d20-a2a2-04ef7683c275 | ceilometer-low | disk.ephemeral.size | GB | cc56761d-4afd-425a-a108-4b279271d6d2 |
| 5291ce4e-62a8-4b9d-b2b7-2328ae27c45f | ceilometer-low-rate | disk.device.read.requests | request | 384cab92-3a03-5abb-943e-5c405335c923 |
| 5370f16e-3c97-49a4-95a4-87197838884d | ceilometer-high-rate | network.incoming.packets | packet | 122f64c7-318a-511e-857c-412f69a0fae5 |
| 58f02ba7-cd3e-44cd-8117-49ac58c3738f | ceilometer-low | volume.provider.pool.capacity.allocated | GB | 0b354884-f2f9-5427-b4ec-362e0aaa0940 |
| 5f620b1b-3233-44bc-a4e2-3c59aafe2a75 | ceilometer-low-rate | disk.device.write.requests | request | 384cab92-3a03-5abb-943e-5c405335c923 |
| 646c800a-c725-4902-a47b-783d3820ae22 | ceilometer-low | memory | MB | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| 65030467-6b2f-45b6-a51c-26b512ecd90a | ceilometer-low | volume.provider.pool.capacity.total | GB | 0b354884-f2f9-5427-b4ec-362e0aaa0940 |
| 7373abe7-250f-4552-9cd3-dcbf5e1dbf13 | ceilometer-low | volume.provider.capacity.total | GB | 3973b2b8-8e6c-5b5f-982e-d56b399ce688 |
| 738b387d-e34e-449b-8263-2dfca1ec994b | ceilometer-high-rate | network.incoming.bytes | B | 122f64c7-318a-511e-857c-412f69a0fae5 |
| 7705fc61-906b-4490-aae0-7219b41f535f | ceilometer-low | volume.provider.pool.capacity.free | GB | 0b354884-f2f9-5427-b4ec-362e0aaa0940 |
| 864995bd-f0b5-427d-888c-92af9e95b886 | ceilometer-low | volume.provider.capacity.allocated | GB | 3973b2b8-8e6c-5b5f-982e-d56b399ce688 |
| 875be171-48f6-4ebe-8767-afb92efa1ba3 | ceilometer-low | vcpus | vcpu | cc56761d-4afd-425a-a108-4b279271d6d2 |
| 8a7d44e5-9f02-4101-bb1e-32dc33ab6b86 | ceilometer-low | disk.ephemeral.size | GB | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| 8dc58d4a-958e-4686-b90b-7f9099385226 | ceilometer-low-rate | disk.device.write.requests | request | 7b7454da-6681-5a3b-9b17-817d6e6a0af5 |
| 9efccb23-e90c-4baf-873f-898679c3b169 | ceilometer-low-rate | network.outgoing.bytes | B | 2d492809-8e0a-533a-a141-487714121eca |
| b11ee54e-ead1-4c7d-b1b7-8cf654b091ba | ceilometer-low-rate | network.outgoing.packets | packet | 2d492809-8e0a-533a-a141-487714121eca |
| b8799978-fed4-42ff-9ecc-1ecd1b304c4b | ceilometer-low-rate | network.incoming.packets | packet | 2d492809-8e0a-533a-a141-487714121eca |
| c1f0d462-91de-4758-b0f9-f0a2d01442a1 | ceilometer-low | volume.provider.pool.capacity.provisioned | GB | 0b354884-f2f9-5427-b4ec-362e0aaa0940 |
| c2e8d5e6-5c3c-4dfd-bcc0-4d20203fbe52 | ceilometer-low-rate | disk.device.read.requests | request | 7b7454da-6681-5a3b-9b17-817d6e6a0af5 |
| c5ebcf1a-a1fc-4920-ad47-12d02e8c4046 | ceilometer-low-rate | cpu | ns | cc56761d-4afd-425a-a108-4b279271d6d2 |
| d0d482b5-982e-4894-bbf3-addee51e898f | ceilometer-low-rate | disk.device.write.bytes | B | 384cab92-3a03-5abb-943e-5c405335c923 |
| d47f2b13-1800-4669-ad86-b9ef4c4ee862 | ceilometer-high-rate | network.outgoing.bytes | B | 122f64c7-318a-511e-857c-412f69a0fae5 |
| d8434709-82bd-42ae-98a6-31accb6710c9 | ceilometer-high-rate | network.outgoing.packets | packet | 122f64c7-318a-511e-857c-412f69a0fae5 |
| dcbcd2c7-bd06-4610-946d-02a9f490671f | ceilometer-low | volume.provider.capacity.free | GB | 3973b2b8-8e6c-5b5f-982e-d56b399ce688 |
| ddf190a2-4b99-42c0-9f20-e219c768fe00 | ceilometer-low | compute.instance.booting.time | sec | cc56761d-4afd-425a-a108-4b279271d6d2 |
| e0a4affd-57aa-4c9b-8065-6fa0c40310b6 | ceilometer-low | vcpus | vcpu | f99e98bd-afd4-43ac-9d74-dc77dc498a7a |
| e2af0940-f633-427b-9a67-23386b9970da | ceilometer-low-rate | disk.device.read.bytes | B | 7b7454da-6681-5a3b-9b17-817d6e6a0af5 |
| f25d3e5d-8c08-4082-acd1-1b0a0a481902 | ceilometer-low | memory | MB | cc56761d-4afd-425a-a108-4b279271d6d2 |
| f28055ff-ee55-4b22-904b-e23d16c39a22 | ceilometer-low-rate | disk.device.write.bytes | B | 7b7454da-6681-5a3b-9b17-817d6e6a0af5 |
+--------------------------------------+----------------------+--------------------------------------------+---------+--------------------------------------+
可以看到 有保存策略是 ceilometer-high-rate的metric
| 5370f16e-3c97-49a4-95a4-87197838884d | ceilometer-high-rate | network.incoming.packets | packet | 122f64c7-318a-511e-857c-412f69a0fae5 |
| 738b387d-e34e-449b-8263-2dfca1ec994b | ceilometer-high-rate | network.incoming.bytes | B | 122f64c7-318a-511e-857c-412f69a0fae5 |
| d47f2b13-1800-4669-ad86-b9ef4c4ee862 | ceilometer-high-rate | network.outgoing.bytes | B | 122f64c7-318a-511e-857c-412f69a0fae5 |
| d8434709-82bd-42ae-98a6-31accb6710c9 | ceilometer-high-rate | network.outgoing.packets | packet | 122f64c7-318a-511e-857c-412f69a0fae5 |
尽管修改了保存策略,新创建实例 的metric的保存策略也使用的新的策略。但是数据保存还是有问题,还是五分钟保存一次,只是有三个不同的 granularity。。。这好像没什么用。
[root@ALLInOne-Kolla ~]# gnocchi metric list | grep 122f64c7-318a-511e-857c-412f69a0fae5
| 5370f16e-3c97-49a4-95a4-87197838884d | ceilometer-high-rate | network.incoming.packets | packet | 122f64c7-318a-511e-857c-412f69a0fae5 |
| 738b387d-e34e-449b-8263-2dfca1ec994b | ceilometer-high-rate | network.incoming.bytes | B | 122f64c7-318a-511e-857c-412f69a0fae5 |
| d47f2b13-1800-4669-ad86-b9ef4c4ee862 | ceilometer-high-rate | network.outgoing.bytes | B | 122f64c7-318a-511e-857c-412f69a0fae5 |
| d8434709-82bd-42ae-98a6-31accb6710c9 | ceilometer-high-rate | network.outgoing.packets | packet | 122f64c7-318a-511e-857c-412f69a0fae5 |
[root@ALLInOne-Kolla ~]# gnocchi measures show 738b387d-e34e-449b-8263-2dfca1ec994b
+---------------------------+-------------+---------------+
| timestamp | granularity | value |
+---------------------------+-------------+---------------+
| 2021-03-01T16:00:00+08:00 | 3600.0 | 41144.6666667 |
| 2021-03-01T16:03:00+08:00 | 60.0 | 11726.0 |
| 2021-03-01T16:08:00+08:00 | 60.0 | 41112.0 |
| 2021-03-01T16:13:00+08:00 | 60.0 | 70596.0 |
| 2021-03-01T16:03:33+08:00 | 1.0 | 11726.0 |
| 2021-03-01T16:08:32+08:00 | 1.0 | 41112.0 |
| 2021-03-01T16:13:32+08:00 | 1.0 | 70596.0 |
+---------------------------+-------------+---------------+
问题
gnocchi相应的dashboard模板不太好用。且数据保存总是 5min保存一次。
似乎还是使用collectd收集数据到influxdb更合适。
https://blog.csdn.net/dandanfengyun/article/details/113510416