[monasca][kolla-ansible] Help for a monasca newbie to get metrics for instances needed

Christian Stelter refugee at last-refuge.net
Sun Sep 11 13:12:19 UTC 2022


Hi!

I'm trying to explore monasca, but I'm bit lost in how to get metrics
from a project/tenant collected. I'm using kolla-ansible in my test
setup running ubuntu-source images. Ubuntu release is Yoga.

Monasca seems to be up and running. I can see the default metrics with
a appropriate user in the monasca_control_plane project.

cpu.*
disk.*
io.*
load.*
mem.*
monasca.*
net.*
ntp.*

And I find measurements in the influxdb, but only metrics/measurements
for the openstack hypervisor nodes yet. What I'm missing after
searching the existing documentation is how I can enable a plugin as
for libvirt for example or whatever the recommendation for monitoring
the instances is.

As I have found the plugins directory on the hypervisors under
/etc/kolla/monasca-agent-collector/plugins I thought putting a config
file like in the documentation [1] for the libvirt plugin and restart
the monasca-agent-collector would be sufficient. But all I got was an
error message:

2022-09-11 12:22:26,412 | ERROR | collector |
monasca_agent.common.util(util.py:529) | Unable to import check module
libvirt.py from checks_d
Traceback (most recent call last):
  File "/var/lib/kolla/venv/lib/python3.8/site-packages/monasca_agent/common/util.py",
line 520, in load_check_directory
    check_module = load_module('checksd_%s' % check_name, check)
  File "/var/lib/kolla/venv/lib/python3.8/site-packages/monasca_agent/common/util.py",
line 470, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/var/lib/kolla/venv/lib/python3.8/site-packages/monasca_agent/common/../collector/checks_d/libvirt.py",
line 20, in <module>
    import libvirt
ModuleNotFoundError: No module named 'libvirt'

As it seems the plugin system dependencies like libvirt-dev are
missing. So I assume I have to rebuild the container myself and/or
open an issue on opendev.org.

Or is there another way to get metrics for instances?

Next question: even if I had a running libvirt plugin. What has to be
done to enable another user in a normal tenant project to use these
metrics? Just add the monasca-read-only-user to user(s) which shall be
enabled to manage alarm definitions, alarms and notifications? Will
the tenant then see or at least use the metrics for his (and only his)
project?

I found a lot of high level documentation, (base) installation
instructions, hints for developers on how to extend monasca, but
nothing beyond the initial setup for monasca newbies like me. I
queried the all-knowing, all-seeing trash heap, mailing lists, and the
YT academy already. May be I just missed something. So hints are
welcome!

BTW. Is the kolla-ansible part of monasca still in active maintenance
and development? I stumpled upon the same error as in [2] and I'm
getting an HTTP 500 error when trying to open the monitoring overview
and is still unassigned.

Thanks in advance!

Kind regards,

Christian Stelter

[1] https://github.com/openstack/monasca-agent/blob/master/docs/Libvirt.md#configuration
[2] https://bugs.launchpad.net/kolla-ansible/+bug/1967278



More information about the openstack-discuss mailing list