Skip agent service detection if only installing plugins.
This will make it possible to use monasca-setup on the environments
where monasca-agent is not running as systemd service.
Typical usecase is running agent on kubernetes.
Change-Id: I232506e19f593b43cc011c6499242847c9bbc108
- In RHOSP16.1 (TripleO based) the Keystone process name is
`keystone`. In previous RHOSP10 the process name was
`keystone-admin` and `keystone-main`.
Change-Id: I58882af66979f324cb372696febda65a33eb81b6
The imp module is deprecated[1] since version 3.4, use importlib to
instead
[1]: https://docs.python.org/3/library/imp.html
Change-Id: I10f2c8c165aebddc8fd39601a0a23231ff89cdf7
When checking response of Cinder API, a pattern match is done.
As of now, it is checked if "version 1" is installed.
This version is not supported any longer since Cinder train release, as mentioned in release notes:
https://docs.openstack.org/releasenotes/python-cinderclient/train.html
Now, http_check of monasca-agent accepts all known API versions: 1-3
Change-Id: I22b32bcc49760a2da38310aed8e04e44f691a974
Story: 2008021
Task: 40673
Single quote in help text caused issues on Red Hat.
In order to avoid issues on any platform,
single quote (') has been removed.
Change-Id: Iccab9a225539a1d87a6ad6bfd873a65d36b8a515
Story:2007978
Task: 40601
The remove_config() function only removes an exact match for
the configured instance.
This will allow removing plugin configuration when all config is
not known.
Use case: A compute node has been removed, so any host_alive
ping checks that are configured for it should be removed. But at
the time of removal the list of target_hostnames to match are
not known.
Change-Id: I8050e1eed68d7b64f7a968b061afa69fe2e86d72
Story: 2004539
Task: 28287
This patch removes the code that does the copy of /sbin/ip to
/usr/bin/monasca-agent-ip. There is a limitation with /sbin/ip
that limits copying it to a new name that is longer than
2 characters. The error is:
./monasca-agent-ip a
Object "nasca-agent-ip" is unknown, try "ip help".
As this is not working on RHEL,SLES, or Ubuntu this code
should be removed.
Change-Id: I439be00070eb1cf16416325f23a86fc7cd518acc
Story: 2001593
Task: 6543
This patch removes an incorrect setting ping_cmd to 'True'.
This is needed as the code is expecting ping_check to be
a "str" and not a "boolean".
Change-Id: Id9978215cb11c3a0d8f756d8ff8a5e7f789170b4
Story: 2007517
Task: 39300
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Update local hacking checks for new flake8.
Change-Id: I6396403d0a62f5403fc5b7fb04b6ce790c332c84
Currently we don't have any capability to monitor the internal TLS/SSL
certificates. i.e. SSL certificates used by MySQL for replication, RabbitMQ for
distribution, etc. The cert_check plugin is not adequate for this purpose
becaue it can only check on certficates over HTTPS endpoints. Furthermore,
checking on these internal certificates over the network is cumbersome
because the agent plugin would have to speak specific protocols.
This patch adds a cert_file_check plugin to detect the certificate expiry
(in days from now) for the given X.509 certificate file in PEM format.
Similar to cert_check plugin, this plugin will a metric
'cert_file.cert_expire_days' which contains the number of days from now the
given certificate will be expired. If the certificate has already expired,
this will be a negative number.
Change-Id: Id95cc7115823f972e234417223ab5906b57447cc
Story: 2006753
monasca_setup adds dimensions passed as arguments to the
`init_config.keystone_config` section of http_check.yaml. These should
be set only for instances.
Change-Id: Iccdefbaaaf5cc3ad87848f1c51ae2a2a055e309e
Story: 2005296
Task: 30246
* httpcheck args plugin setup now creates
keystone_config in init_config only if required.
* unecessary keystone_config section in init_config for
http_check.yaml file would cause all http check instances
to fail because of missing keystone credentials
like e.g. keystone_url, username, password, project.
* This change creates a keystone_config section
in init_config only if keystone_url is
being passed as an argument during httpcheck plugin
setup.
Story: 2005296
Task: 30182
Change-Id: Id31d2e5b5d22cb6c6f1fbdb942dac4b1b5aea76d
In standard system locations, check for the client.admin key
for each detected Ceph cluster and conditionally suppress
Ceph agent checks that require it if it is not found.
Change-Id: If3a28ceb5cdde40749d077ad465054eba37c848c
Story: 2005172
This adds support for setting the statsd metrics aggregation interval
as part of Monasca setup. Setting this interval is useful for users
calculating rates from statsd metrics.
Story: 2005063
Task: 29607
Change-Id: I22f5f1700c438245fd7e98deb40d706358349b6c
To properly support Keystone V3, we must also properly convey the
domain information to the underlaying Keystone client.
Story: 2005045
Task: 29542
Change-Id: I57f233578132a3689a2182c53483d8110f15bcea
To properly support Keystone V3, we must also properly convey the
domain information to the underlaying Keystone client.
Change-Id: I725e107e418d15b65aabf24f8c05403f952f94d5
story: 2005018
Task: 29497
It is possible monasca-setup configuration process informs user about
errors related to setting up other services, but system is working
correctly. It is expected to change some log level classification for
INFO or WARNING depends on type of message.
Story: 2004970
Task: 29425
Change-Id: Idb8101fea6e7c5c357d72d77b3b264db4cce8527
The previous message didn't give much detail, which has led to
some confusion and questions from users. This change attempts to
add some more detail and help in debugging why a plugin detection
might fail.
Story: 2004696
Task: 28712
Change-Id: Ifc0a1bca747f655765aaa23b23751b52d4586133
To properly support Keystone V3, we must also properly convey
the domain information to the Keystone authentication plugins.
Change-Id: I8c6539cf692e090290cfdf104eb22530a625aadb
story: 2004655
The transition form urllib2 to urllib was not quite right. Some changes were
missing .request and .error from the references.
Change-Id: Icdc0eb7456b5385a0ef3aa67018f7c64985ed7c7
Story: 2000975
Task: 27818
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
Apache mod_perl sets the process name to the full command path
which is truncated to 15 characters by Linux convention. Adds
/usr/sbin/httpd to the apache process known names to the apache
detection plugin.
Change-Id: I6d45e9e6d5aef46d3a230911e7778d6ab7ca9265
story: 2001945
task: 15063
* set the maximum line length to 100
* cleaned up the codes for pep8
Depends-On: https://review.openstack.org/560844
Change-Id: Id548b78b673cce869ef8291bdb6b4f1367b383ed
Signed-off-by: Jui Chandwaskar <jchandwaskar@op5.com>
LXC plugin throw up a exception when try collect cpu metrics. This
patch fix it (tests are passing) and add swap collector.
Change-Id: I3b12ac6ce199006bc1e024d2b2626657519e4f0b
Story: 2001563
Task: 6507
This is desastrous to the rest of the system when
run outside a venv, as it overwrites the system ip
and it loses then capabilities to run for everyone else
Story: 2001593
Task: 6542
Change-Id: Ie0b7ef25b0f2cf6aca61adda4de5767ac2300cae
Adds detection plugin to monitor cassandra service, including
the process, and the data directory through the args.
Change-Id: Ic2c20bc878527f607c0eb871e98a79c1521c0507
Story: 2001499
task: 6289