我想使用 gnocchi Stein 版本,但我有问题,因为所有措施都是空的,我不知道如何解决它。在下面我显示了配置和命令列表:
在 gnocchi.conf 中:
[storage] coordination_url = redis://controller:6379
file_basepath = /var/lib/gnocchi
driver = file
Run Code Online (Sandbox Code Playgroud)
在 ceilometer/pipeline.yaml 中:
publishers: - gnocchi://?filter_project=service&archive_policy=high
Run Code Online (Sandbox Code Playgroud)
(我用中低测试)
在计算中我只安装 ceilometer-agent-compute
面疙瘩度量列表
+--------------------------------------+---------------------+----------------------------+---------+--------------------------------------+
| id | archive_policy/name | name | unit | resource_id |
+--------------------------------------+---------------------+----------------------------+---------+--------------------------------------+
| 1e785d3d-3f04-47c1-90b7-42ffbffc691d | ceilometer-low-rate | network.outgoing.packets | packet | 9284f4b1-1706-56d1-9727-4a1a534b9351 |
| 44789dfd-bd40-4a1e-bb69-acfc7da0d07f | ceilometer-low-rate | disk.device.read.bytes | B | 789282b6-cf18-5cea-9726-90f49645e964 |
| 470d813e-fdcf-42ef-bda7-e8176702333f | ceilometer-low-rate | cpu | ns | 5831590b-f777-43cf-b371-f0e972e302e0 |
| 52687228-77f3-4110-b4ce-65d2265251ff | ceilometer-low | disk.ephemeral.size | …Run Code Online (Sandbox Code Playgroud) 我正在使用ceilometer python API并将数据发布到pubnub.不确定这个错误是什么意思.
这是导致我认为的问题的代码的一部分,
def init_Data(data, channel):
cpu_sample = cclient.samples.list(meter_name ='cpu_util')
for each in cpu_sample:
timetamp = each.timestamp
volume = each.counter_volume
volume_int = int(volume)
data_volume ={'value': volume_int}
data=json.dumps(data_volume)
print (data)
pubnub.publish(channel='orbit_channel', callback= init_Datar)
Run Code Online (Sandbox Code Playgroud) 在 stein 版本中,ceilometer 删除了对 cpu_util 的轮询。
请遵循此文档: https://docs.openstack.org/ceilometer/stein/admin/telemetry-measurements.html#openstack-compute
仅测量 cpu(使用的 CPU 时间)和 vcpus(分配给实例的虚拟 CPU 数量)。
并检查关于ceilometer的github提交https://github.com/openstack/ceilometer/blob/4ae919c96e4116ab83e5d83f2b726ed44d165278/releasenotes/notes/save-rate-in-gnocchi-66244262bc4b7842.yaml,
cpu_util 计量表已弃用。
这个关于云高计的提交删除了变压器支持。
根据提交消息,gnocchi 处理变压器数据。
那么,如何使用gnocchi聚合cpu和vcpu来计算cpu使用率呢?