ManageIQ / manageiq-providers-openstack

ManageIQ plugin for the OpenStack provider.
https://www.openstack.org/
Apache License 2.0
12 stars 92 forks source link

How get some kind of Metrics/Utilization of VM's to working? #886

Open maly-glod opened 4 months ago

maly-glod commented 4 months ago

Hi Guys,

I need Your support or some hints, how to get utilization data working.

  1. Describe your environment: ManageIQ: official Petrosian OpenStack version deployed on 4 VMs:

To modify the configuration, use a web browser to access the management page.

Hostname: miq-app-1 IPv4 Address: 10.1.1.11/255.255.255.0 IPv4 Gateway: 10.1.1.1 IPv6 Address:
IPV6 Gateway:
Primary DNS: 10.1.1.4 Secondary DNS: 10.1.1.15 Search Order: os.local MAC Address: fa:16:3e:60:af:ff Timezone: Europe/Warsaw Local Database Server: not initialized ManageIQ Server: running ManageIQ Database: miq-app-4-db Database/Region: vmdb_production / 0 External Auth: xxxxx ManageIQ Version: petrosian-1

Press any key to continue.

- 2x DB

![Screenshot 2024-07-12 at 13 52 36](https://github.com/user-attachments/assets/5a1a19de-acac-4229-b43c-f71ec04d5a0a)

Cloud: OpenStack AIO Caracal (stable/2024.1) version deployed on BareMetal host (based on [OpenStack-Ansible Quickstart: AIO](https://docs.openstack.org/openstack-ansible/2024.1/user/aio/quickstart.html)
 - additional services installed (all defaults): 
>  - aodh,
>  - gnocchi,
>  - ceilometer,
>  - skyline

root@aio1:~# lxc-ls -1 aio1-aodh-container-a6cb8233 aio1-ceilometer-central-container-659eb991 aio1-cinder-api-container-06fe7a7d aio1-galera-container-b1cef400 aio1-glance-container-3f5cee8e aio1-gnocchi-container-96ed7d75 aio1-horizon-container-46a9f212 aio1-keystone-container-f6ace861 aio1-memcached-container-cc13f0fa aio1-neutron-ovn-northd-container-88a13785 aio1-neutron-server-container-ae752fb3 aio1-nova-api-container-8bd289e6 aio1-placement-container-e4c84a90 aio1-rabbit-mq-container-7de2a18d aio1-repo-container-3055fb15 aio1-skyline-container-353bc610 aio1-utility-container-3502e319

On fresh installation ceilometer is no longer registered as endpoint (replaced by Gnocchi??):

root@aio1-utility-container-3502e319:~# openstack endpoint list +----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+ | ID | Region | Service Name | Service Type | Enabled | Interface | URL | +----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+ | 054d0f0fd6cb4d6b87060f7e801f7792 | RegionOne | neutron | network | True | admin | http://172.29.236.101:9696 | | 19c4c049d9e049b184246c03dd5bb15a | RegionOne | aodh | alarming | True | internal | http://172.29.236.101:8042 | | 1a45ce6fd6c24d2b9f7a89699a070652 | RegionOne | keystone | identity | True | public | https://10.13.16.75:5000 | | 32f4b61cd22c4b61958f65ce93897fd2 | RegionOne | keystone | identity | True | internal | http://172.29.236.101:5000 | | 402de5191f684fc98f97d9e197a040fb | RegionOne | glance | image | True | internal | http://172.29.236.101:9292 | | 46804c3f45f74a7da417aac5faf4ceb2 | RegionOne | gnocchi | metric | True | public | https://10.13.16.75:8041 | | 55d4821d32bc49bab815e811b3504913 | RegionOne | gnocchi | metric | True | admin | http://172.29.236.101:8041 | | 66810784a976497da3fcfaba8a78c76f | RegionOne | aodh | alarming | True | admin | http://172.29.236.101:8042 | | 6770094704704b9ca48454b6f23b5404 | RegionOne | cinderv3 | volumev3 | True | public | https://10.13.16.75:8776/v3/%(tenant_id)s | | 6eb561a8732e49ac85a01062b012f301 | RegionOne | glance | image | True | admin | http://172.29.236.101:9292 | | 72141164b2c34bee971a34bdd1423973 | RegionOne | placement | placement | True | admin | http://172.29.236.101:8780 | | 7419110fd63f4153bd649063db2a6245 | RegionOne | gnocchi | metric | True | internal | http://172.29.236.101:8041 | | 79f2721b6c5c4f7eb272150e32a0b6b5 | RegionOne | neutron | network | True | internal | http://172.29.236.101:9696 | | 945b6d7eb0644ecdb3d59111b7e67bd6 | RegionOne | neutron | network | True | public | https://10.13.16.75:9696 | | 9896ccc1d63e4414aae52ef8bc3619d9 | RegionOne | nova | compute | True | admin | http://172.29.236.101:8774/v2.1 | | b025f49381914fec83a9e3c9058d3a65 | RegionOne | placement | placement | True | public | https://10.13.16.75:8780 | | bda878d794b9475eb6a958046e095c07 | RegionOne | glance | image | True | public | https://10.13.16.75:9292 | | c55b0f3a4c42434f8d606255515a2a86 | RegionOne | placement | placement | True | internal | http://172.29.236.101:8780 | | d0e7bab95bcc417b872dbb9f86236932 | RegionOne | nova | compute | True | public | https://10.13.16.75:8774/v2.1 | | dfa08bf18de848589f741107ec023ef6 | RegionOne | aodh | alarming | True | public | https://10.13.16.75:8042 | | e70634f894694947b4ebf03cdf88e072 | RegionOne | keystone | identity | True | admin | http://172.29.236.101:5000 | | ef2967a06e374f0baa7d1d5de61b8a80 | RegionOne | nova | compute | True | internal | http://172.29.236.101:8774/v2.1 | | f919f4e402e04a2ba33c83f5deb5f99a | RegionOne | cinderv3 | volumev3 | True | internal | http://172.29.236.101:8776/v3/%(tenant_id)s | | fc9c74f364fa4c37ae7bafce493a5ae9 | RegionOne | cinderv3 | volumev3 | True | admin | http://172.29.236.101:8776/v3/%(tenant_id)s | +----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+


2. Describe the issue you are having and what you expected to happen.
I'm having trouble getting/displaying any metrics showing current resource usage (CPU, memory, etc.) on running VM. Can I ask for some advice on how to start collecting this data and get it working? All "tutorials/tips" concern old versions of OpenStack (e.g. Pike) where telemetry was based on a ceilometer and it was registered as OS endpoint.
![Screenshot 2024-07-12 at 13 12 19](https://github.com/user-attachments/assets/2ada0f11-5e2c-45ff-a7f4-71a0312f3d6a)
![Screenshot 2024-07-12 at 13 12 54](https://github.com/user-attachments/assets/71d032f9-e4b8-4dc0-a3c3-e1512bce3954)

3. Describe the steps to reproduce, including any log snippets and stack traces that will help diagnose.
As  originally posted by @dikonoor in https://github.com/ManageIQ/manageiq-providers-openstack/issues/199#issuecomment-554250255 

and official documentation: 

Ceilometer previously provided a storage and API solution. As of Newton, this functionality is officially deprecated and discouraged. For efficient storage and statistical analysis of Ceilometer data, Gnocchi is recommended.


I couldn't validate cloud with Ceilometer as events source:
![Screenshot 2024-07-12 at 10 29 28](https://github.com/user-attachments/assets/d1dd1687-577d-4dcc-bb29-1de11074bc0b)
![Screenshot 2024-07-12 at 12 47 48](https://github.com/user-attachments/assets/a9f9a4ed-bf3e-4130-855c-baf3405b06ad)

So I decided to try with AMQP:
I had to make DNAT rule on aio1 host to get into rabbitmq-server 5672 port (because it doesn't normally expose it to a "public" ip):

root@aio1:~# iptables -nv -L -t nat Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
5 300 DNAT tcp -- 0.0.0.0/0 10.13.16.75 tcp dpt:5672 to:172.29.239.196:5672


![Screenshot 2024-07-12 at 12 50 02](https://github.com/user-attachments/assets/b3d2f6af-a1b8-46fc-bda2-9a117724d1df)

Unfortunately, connecting directly to Rabbit did not change anything.

And one more thing, based on #295 which refers to [this](https://github.com/ManageIQ/manageiq-ui-classic/pull/5270) thread, there should be 2 AMQP fallback ip fields and there aren't:
![Screenshot 2024-07-12 at 13 35 30](https://github.com/user-attachments/assets/450aceea-b02f-444a-bafb-a753a318e779)

Merge is from 2019, shouldn't this be included in the official version of Petrosian?

@miq-bot add-label "help wanted"

Regards
Borys
remo233 commented 3 months ago

Hi Maly,

Is the ceilometer generated the metrics ? check it using command openstack metric list and openstack metric resource show

maly-glod commented 3 months ago

Hi @remo233

Yes ceilometer on my AIO is generating the metrics. Screenshot 2024-08-13 at 10 53 00

Screenshot 2024-08-13 at 10 53 12

falencastro commented 2 days ago

@maly-glod This stopped working on Stein as some metrics were deprecated and the new ones aren't yet collected by this provider: https://github.com/ManageIQ/manageiq-providers-openstack/issues/879