To support python3 in the near future this was done:
* Removed dependency on supervisor.
* Added template configuration for systemd target that includes all
services.
* Added templates configuration for systemd service for every single
service.
* Changed monasca_setup to use the new templates.
In the meanwhile code was formated to cope with pep8 settings and some
other small changes were done to comply with pycodestyle and
pydocstring.
Task: 4126
Story: 2000975
Depends-On: https://review.openstack.org/#/c/566475/
Change-Id: I0d0c4ea41a830581d6b9f247fad6a2dda1f96cbe
The argument io_loop on the ioloop.PeriodicCallback constructor is
deprecated in newer tornado versions, so we can just remove it.
Since we are using tornado<=4.5.2 on stable/pike, we can correctly set
master's version to tornado>=4.5.3.
Story: 2001489
Task: 6218
Change-Id: Id621d5b609e1bf4eac3a3dd4aff44436dd012b87
Following commit makes enhancements to the
keystone handling inside monasca-agent:
* using generic password approach that abstracts from underlying
keystone version thus allows agent to be used seamlessly with
either v2.0 or v3. The only relevant part is the set of parameters
that one needs to supply to either monasca-reconfigure or agent.yaml
configuration file
* using keystone discovery - it simply means that agent will no longer
enforce particular keystone version but will allow keystoneauth
to pick the best match for given environment
Extra:
* extracted methods get_session and get_client utilize an aproach
presented above and can be used outside of monasca_agent.common.keystone
inside checks or detection plugins
* make imports to import only modules instead specific objects
* removed some redundant methods
Story: 2000995
Task: 4191
Needed-By: I579f6bcd5975a32af2a255be41c9b6c4043fa1dc
Needed-By: Ifee5b88ccb632222310aafb1081ecb9c9d085150
Change-Id: Iec97e50089ed31ae7ad8244b37cec128817871a5
This improves the likelyhood that the collector daemon will exit during
auto restart. Also removed gevent requirement and usage so only
eventlet is used. The conflict between gevent and eventlet caused
multiproccessing worker join and sys.exit to hang forever.
Change-Id: I60f980f4a74eafb709e51c0f520a81e2d72cb609
Some configuration options were accepting both IP addresses
and hostnames. Since there was no specific OSLO opt type to
support this, we were using ``StrOpt``. The change [1] that
added support for ``HostAddressOpt`` type was merged in Ocata
and became available for use with oslo version 3.22.
This patch changes the opt type of configuration options to use
this more relevant opt type - HostAddressOpt.
[1] I77bdb64b7e6e56ce761d76696bc4448a9bd325eb
Change-Id: I3b2239dbc19b3fc074702804c83a77ad4b269b94
This class shall be used to map external metrics from Prometheus, InfluxDB, ...
to well-formed Monasca metrics.
It supports:
* filtering by name (regex)
* renaming of metrics
* renamign of dimensions
* filtering by dimension value
* transforming of dimension values (regex based)
Change-Id: If0a5fdb1126bdfc93a88d5c1c7266d0c152d925f
Queries a given cAdvisor instance for host metrics. This is useful
when the agent in running in a container and does not have access
to all host level metrics
Taken from original review https://review.openstack.org/#/c/391559/
Change-Id: Ifc3d514e5256bdbc6089ec653065348a488f7c57
This bumps the psutil requirement to >= 3.0.1 to match the new upper
constraint in the global requirements [1]. This also removes the local
capping of psutil to version 3.0.1.
Removing the 3.0.1 cap is also necessary to run the agent in
environments using the musl libc, such as Alpine Linux, due to an issue
resolved in more recent releases [2].
[1]: https://review.openstack.org/#/c/420837/
[2]: https://github.com/giampaolo/psutil/issues/664
Change-Id: If811db1aeac7cb7b37c710f1ba79568d7beb101f
As an initial step to make monasca-agent coinstallable we
need to converge to use the OpenStack global-requirements
Change-Id: Icdaa769b114f83af3cff2274bd20ea6d74b8f944
Following changes syncs requirements
of monasca-agent project to the openstack's
global requirements.
Needed-by: Ic1e157e7374885378223549644173adbed9c70dc
Change-Id: I0f48a72894ea07a7c67befb575e5cc1decdc3b5f
Generally, psutil is restricted to versions older than 2.0.0
in OpenStack [1].
Because of this, there can exist nodes with psutil older than 2.0.0.
The data from Process object are accessed differently, depending on
the version. For example, in older versions, this is valid:
process.name()
process.pid
process.username()
process.cmdline()
While in older versions than 2.0.0, those are not methods:
process.name
process.pid
process.username
process.cmdline
Transforming the Process object into a dict solves the issue, as it
behaves the same across different psutil versions.
[1] https://github.com/openstack/requirements/blob/master/global-requirements.txt#L142
Closes-Bug: #1592695
Change-Id: I9b0ff7a666ac9900809f8e4dc07d2b2afbe43516
Saw error message in collector log showing:
AttributeError: 'Rate' object has no attribute 'name'
In the new base metric class init function, variable name
got passed into self.metric. That's why self.name doesn't
exist anymore.
Change-Id: Idfd2fe5d257332327449e2766544dd36d8a003c1
There is no reason to add an upper bound on python-monascsaclient. The overall
constraints should handle it.
Change-Id: I4e51a3a447fbf4136b4fe07185778dd1bc299773
This patch cleans up the requirement list to remove OSLO modules
that are not used by monasca-agent.
Change-Id: I3f7e39f864db2a0e267650af9e54e0f82cb34c72
This patch cleans up the requirement list to remove simplejson module
that is not used anymore directly by monasca-agent.
Change-Id: I7f7aea7cb28ef428f1559e59e2c6f0fa25a7e65c
The custom thread_pool could not restart in certain cases due to limitations
with python threads. This moves to using multiprocessing.dummy for the thread
pool and gevent to allow thread timeouts.
Also cleans up some of the asynchronous logic.
Pools have constant numbers of threads, so thread count is checked at pool creation
No longer tracks job start time, as this is handled by timeouts.
Move resultsq instantiation so pool restart does not drop data.
Mark checks as done at end of run rather than when results are processed.
Closes-Bug: 1446757
Change-Id: I28bdd8d8404087097bff9f93ff60f5cc86a72fbb
- modify vcenter detection plugin to read the details
from hypervisor.conf instead of nova.conf
- oslo.vmware dependency added to requirements.txt
Change-Id: I6f7aa966ccdad711269a643eebffa7396359aa72
This patch adds the ability to ping virtual machines from their
compute node host, utilizing Neutron and network namespaces. It
replaces the nova-network ping test, as nova-network has been
deprecated.
http://docs.openstack.org/openstack-ops/content/nova-network-deprecation.html
The included documentation covers the functionality and requirements
of the new ping checks, and also include a few other minor fixes.
Change-Id: I88b59f79ec391cf3fb190bfdd7207e6c4256830c
oslo.serialization released a new version today that requires a new version of
oslo.utils that we don't necessarily want yet.
Change-Id: I5b62ce7343b3ce87de1469c8781b424e7da26cce