简体   繁体   English

如何在 Openstack Rocky 上使用 Gnocchi API

[英]How to use Gnocchi API on Openstack rocky

I'm trying to use gnocchi API for read metric data.我正在尝试使用 gnocchi API 来读取指标数据。

So I installed Openstack with devstack( I attached a configuration file (local.conf) ).所以我用 devstack 安装了 Openstack(我附加了一个配置文件 (local.conf))。 I think I installed ceilometer and gnocchi for collected data.我想我安装了 ceilometer 和 gnocchi 来收集数据。 But when i try to read data on API server and CLI, it dones't work.但是当我尝试在 API 服务器和 CLI 上读取数据时,它不起作用。 Can you please explain why it doesn't work?你能解释一下为什么它不起作用吗?

[[local|localrc]]

HOST_IP=

ADMIN_PASSWORD=
RABBIT_PASSWORD=
SERVICE_PASSWORD=
DATABASE_PASSWORD=

GIT_BASE=https://git.openstack.org/

NOVA_BRANCH=stable/rocky
NOVACLIENT_BRANCH=stable/rocky
KEYSTONE_BRANCH=stable/rocky
KEYSTONECLIENT_BRANCH=stable/rocky
CINDER_BRANCH=stable/rocky
NEUTRON_BRANCH=stable/rocky
GLANCE_BRANCH=stable/rocky

enable_plugin heat https://git.openstack.org/openstack/heat stable/rocky
enable_plugin heat-dashboard https://git.openstack.org/openstack/heat-dashboard stable/rocky
enable_service h-eng h-api h-cfn h-api-cw heat-dashboard

enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas stable/rocky
enable_plugin neutron-lbaas-dashboard https://git.openstack.org/openstack/neutron-lbaas-dashboard stable/rocky
enable_plugin octavia https://git.openstack.org/openstack/octavia stable/rocky

enable_service q-svc q-agt q-dhcp q-l3 q-meta
enable_service q-lbaasv2 neutron-lbaas-dashboard
enable_service octavia o-cw o-hk o-hm o-api

enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer.git stable/rocky
CEILOMETER_BACKEND=gnocchi

enable_plugin aodh https://git.openstack.org/openstack/aodh stable/rocky
enable_plugin panko https://git.openstack.org/openstack/panko stable/rocky

enable_service c-bak
enable_service swift

command 'openstack metric list' works well, but 'gnocchi metric list' doesn't work at all.命令“openstack metric list”运行良好,但“gnocchi metric list”根本不起作用。 with below message.与下面的消息。

Unable to establish connection to http://localhost:8041/v1/metric ?: HTTPConnectionPool(host='localhost', port=8041): Max retries exceeded with url: /v1/metric (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',))无法建立到http://localhost:8041/v1/metric 的连接?: HTTPConnectionPool(host='localhost', port=8041): Max retries exceeded with url: /v1/metric (Caused by NewConnectionError(': Failed to建立新连接:[Errno 111] 连接被拒绝',))

also when I post https://localhost/metric/v1/metric (which is API Access say metric URL) with X-Auth-Token as follow gnocchi api says, It doesn't work.同样,当我按照 gnocchi api 所说的那样使用 X-Auth-Token 发布https://localhost/metric/v1/metric (API 访问说度量 URL)时,它不起作用。

It's couse gnocci cli are looking for endpoint like http://servername:8041 .这是因为 gnocci cli 正在寻找像http://servername:8041这样的端点。 You should create new endpoints for gnocci service as in documentation https://docs.openstack.org/ceilometer/rocky/install/install-base-rdo.html Also you should ensure the redis or other backend service is enabled and active您应该按照文档https://docs.openstack.org/ceilometer/rocky/install/install-base-rdo.html为 gnocci 服务创建新的端点此外,您还应该确保启用并激活 redis 或其他后端服务

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM