Commit Graph

30 Commits

Author SHA1 Message Date
LiZekun 29be6e96a6 Update python testing classifier
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are handled by the
job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit updates the classifier in setup.cfg file.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: Idb98e3b64528bb5ad12e7292bfb18c159585f87b
2022-04-04 09:20:29 +00:00
jiasirui 2845584998 add py38 metedata
Change-Id: I9b7626d05b15e2f17304de0c917eea655cf5d047
2020-10-13 14:29:36 +00:00
Andreas Jaeger 22b6f4f2b5 Cleanup py27 support
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg:
  * Wheel is not needed for python 3 only repo
  * Some other sections are obsolete
- Update classifiers
- Update requirements, no need for python_version anymore

Change-Id: Ie23843938154df3a969b7755e1ca82d6b672c580
2020-04-14 19:25:34 +02:00
Ghanshyam Mann c57f201c7c [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

monasca-agent is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I6cd8c92e4c7c9228ae14596e1535f40184a5ae22
2019-11-16 14:09:24 +00:00
Guang Yee e1d73c4b5d add X.509 certificate check plugin
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
2019-11-13 08:35:54 -08:00
Matthew Oliver 833e5946fe Add swift_handoffs check plugin to monasca
A powerful metric to watch for a swift cluster is the
number of handoff partitions on a drive on a storage node.

A build up of handoff nodes on a particular server could
indicate a disk problem somewhere in the cluster. A bottleneck
somewhere. Or better, when would be a good time to rebalance
the ring (as you'd want to do it when existing backend data
movement is at a minimum.

So it turns out to be a great visualisation of the health of
a cluster.

That's what this check plugin does. Each instance check takes
the following values:

  ring: <path to a Swift ring file>
  devices: <path to the directory of mountpoints>
  granularity: <either server or device>

To be able to determine primary vs handoff partitions on a drive
the swift ring needs to be consulted. If a storage node stores
more then 1 ring, and an instance would be defined for each.

You give swift a bunch of disks. These disks are placed in what
swift calls the 'devices' location. That is a directory where a
mount point for each mounted swift drive is located.

Finally, you can decide on the granularity, which defaults to
`server` if not defined. Only 2 metrics are created from this
check:

  swift.partitions.primary_count
  swift.partitions.handoff_count

But with the hostname dimension a ring dimension will also be set.
Allowing the graphing of the handoff vs partitions of each ring.
When the granularity is set to device, then an additional
dimension to the metric is added, the device name (the name of
the devices mount point). This allows the graphing and monitoring
of each device in a server if a finer granularity is required.

Because we need to consult the Swift ring there is a runtime
requirement on the Python Swift module being installed. But
this isn't required for the unit tests. Making it a runtime
dependency means when the check is loaded it'll log an error
and then exit if it can't import the swift module.

This is the second of two Swift check plugins I've been working on.
For more details see my blog post[1]

[1] - https://oliver.net.au/?p=358

Change-Id: Ie91add9af39f2ab0e5b575390c0c6355563c0bfc
2019-10-18 17:16:14 +02:00
Witek Bedyk 18b3098b15 Add requirement for Prometheus plugin
Monasca-agent Prometheus plugin requires prometheus_client library. This
change adds it to extras section to simplify deploying the plugin
together with its requirements.

Change-Id: Iaab5877ac2c4b005cfc18ec7a2d6a1be448dfe6c
Story: 2004268
Task: 27807
2019-09-30 13:57:47 +02:00
Corey Bryant d457ccb052 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I48bedc1b811f8e2ba49ce3b99dfa8d51a37e5354
Story: #2005924
Task: #34223
2019-07-05 13:02:28 -04:00
Adrian Czarnecki 785b769179 Add python classifier to setup.cfg
Change-Id: If515c15bdf9b79b8d3348b7c6e65de7ca49fc70c
2018-12-19 10:02:38 +01:00
melissaml 7c3cce78f4 Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I7f5c29c4b57476e00cc97982e645c5187247fe63
2018-12-05 01:26:30 +08:00
Witold Bedyk 2f7153a59c Convert README to reStructuredText
* convert README
* add syntax check

Story: 2002163
Task: 24461

Change-Id: I09e089f2c74684fef7f12d79b238002893942d4d
2018-08-09 17:47:46 +02:00
Stefano Canepa a8a2bb845b Removed dependency on supervisor
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
2018-06-27 11:28:43 +02:00
nseyvet 7e548f40b0 Fix hostname matching in kubernetes_api plugin
This change fixes the problem with urllib3 not allowing match_hostname
on IPs for kubernetes.

Change-Id: I2b4229b07716653b08413874bb428a0d263ff9a0
Story: 2001289
Task: 5837
2017-11-21 16:54:49 +01:00
Witold Bedyk 8229af83ef Update from global requirements
Change-Id: I5ae6513db8b4227501c7713ed1cc8d941413bccd
2017-11-15 16:54:00 +01:00
Dobroslaw Zybort 5ba2f44513 Check OVS dependencies for python-novaclient
Update python-novaclient and python-neutronclient to global
requirements versions.

Change-Id: I3860f850f2fcf50f9d4e3e11e4535fbfc630919d
Story: 2001087
Task: 4741
2017-06-26 09:14:31 +02:00
Tomasz Trębski f06611573a Refactor libvirt autodection and use oslo_config
List of changes:
* using oslo_config to get nova configuration
* adjusted _detect body to match changes done
recently for other plugins

Extra:

* added utility method to to load oslo_configuration
for any OpenStack project using it.
* removed json, time from required dependencies (core python libs)
* removed libvirt inspector from required dependencies (part of
an agent itself)
* removed netaddr from required dependencies (part of agent's
requirements)
* in overall tried to introduce some order into libvirt
code

Story: 2000999
Task: 4623

Story: 2001054
Task: 4655

Change-Id: Iaac56cf96f710659908d23dc55831be7dac30e0a
2017-06-13 06:36:39 +02:00
Witold Bedyk 3025485a39 Use kafka-python 0.9.5 from monasca-common
To avoid version mismatch we stick we the old version of kafka-python
which is incubated in monasca-common.

Story: 2001036
Task: 4592
Change-Id: I60ac2658f8257531d524f413852c430e948cafd3
2017-06-06 04:40:36 +00:00
Tomasz Trębski 75dc1ae406 InfluxDB-Relay autodection
Added autodetection of influxdb-relay.
Plugin configures process and http_check
monitoring.

Change-Id: I386e87349283d35d2f4fda58f0e376ed59a6c5bf
2017-05-09 11:34:21 +02:00
Tomasz Trębski 0b0b11044e Extend InfluxDB check
Added autodetection of influxdb.
Plugin configures process and http_check
monitoring.

Added note informing that this auto-plugin
can be extended further with retrieving
internal metrics of InfluxDB.

Also, marked MonInfluxDB as depracated in
favour of InfluxDB plugin.

Change-Id: I9a435482bbe7da4aedd06b1678331cf83ccc4587
2017-05-09 10:20:04 +02:00
Doug Hellmann cbe2a2637b add a one-line summary to the package metadata
This summary is used on PyPI and when building release announcement
emails.

Change-Id: I1367bf31b01280cd675da6c6f93125f029183e06
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2016-12-05 10:55:05 -05:00
Craig Bryant 0a62b8ef33 Change last of the URLs from stackforge to openstack
Change stackforge to openstack. Fix a couple of typos in the
rest of the URLs as well

Change-Id: I9ac209e0d891b78d445d298485c8ce4484781493
2015-12-10 14:39:12 -07:00
Tim Kuhlman 5f5c77847d Added a systemd service provider
Change-Id: I2e98f120bd937131b739778f5737f068976a0a14
2015-04-21 15:05:46 -06:00
Gary Hessler f9fd9c5a30 Converted the agent config file to yaml to match the plugin config files
Converted the config file to yaml and updated the config processing logic to match.
Cleaned up some deprecated config item processing.

Change-Id: I8c5d9ad841b22d20825608ac9f2c82d8011b04f0
2015-03-02 18:36:15 -07:00
Tim Kuhlman 721b013d11 Various fixes to make it easier to run in diverse environments
Removed all the lsb helper utils from the sysv init script
Added a better error message for template missing.
Added the ability to skip the definition of the monasca_api_url
Made check frequency configurable and added an option to monasca setup
Also set the forwarder flush interval to be calculated based on check
frequency.
Modified monasca-setup so it can work with non-standard paths.

Change-Id: If8916e17bf42ffb804fa6c79166149a9fd33c553
2015-02-20 16:47:31 -07:00
gary-hessler 34d82d455e Renaming agent packages to reflect monasca
Renamed monagent package to monasca_agent and monsetup package to monasca_setup.
Also, renamed the monstatsd agent package to statsd to more closely match the internal
collector and forwarder packages.

Change-Id: I0649ae4341fe325007e2a8d37161d330e4c95d72
2014-12-19 09:22:03 -07:00
David Schroeder 3734c3805b Add support for VM monitoring
This patch gives the Monasca Agent the ability to monitor virtual
machines (VMs) provisioned under Nova.  It bundles Ceilometer's
virtualization inspector to gather the actual metrics, includes a
monasca-setup plugin, and adds cross-tenant support.  The latter
enables the Agent to submit metrics on behalf of a different
tenant/project, giving the VM's owner a set of metrics without each
VM having to run its own Agent.  This plugin collects two sets of
measurements per metric: one for the VM's owner (in-cloud) and for
the Operations team (infrastructure).  They differ in the following
ways:
- Operations metric names are prefixed with "vm." in order to group VM
  and overcloud metrics separately
- Operations metrics include "tenant_id" as a dimension
- Operations metrics include "cloud_tier" dimension with the value
  "overcloud"
- The "hostname" dimension for Operations contains the name of the
  compute server; for the tenant, "hostname" is the name of the VM

The metrics gathered by this plugin include:
- Disk I/O: read/write operations/bytes per second
- Disk I/O: errors per second
- Network I/O: in/out packets/bytes per second
- CPU utilization as a percentage of CPU time over polling time

Change-Id: I23781a1ba552ef2551e6ff1caea21dd8f515d73d
2014-10-17 10:57:24 -06:00
Robert Collins da949d64b2 Remove hardcoded version
Generally everything other than the API servers use semantic versioning, not
pbr's pre-version facility. This line causes local package builds to have the
wrong version today, and pbr will in future detect this and error.

Change-Id: Iafd64f79f6c10786db43a7a22beee7b58cd6b78e
2014-08-20 23:47:18 +00:00
gary-hessler fde221f5db Fixing psutil version issue.
Bump Version

Change-Id: I6b93c85832632335a96d59912e2db795b0d90812
2014-07-29 15:10:16 -06:00
gary-hessler 08e2261810 Added monsetup package to setup.cfg
Change-Id: I38aa59e815ae550d3edc285f6e546571737e48ed
2014-07-22 14:40:52 -06:00
gary-hessler 0bf17705bf Adding setup.cfg file
Adding manifest file
Removing CHANGELOG.md since pbr generates that

Change-Id: I17141859d6719f4226e819e88b972c7214326bc8
2014-07-21 18:37:06 -06:00