This change updates the functions so that they work with the most up to date
OpenStack SDK, and adds an elasticsearch output format.
Tests have been udpated to pass newer versions of flake8 and py3
Zuul project config has been added
Change-Id: If46d3fb8e2b2e4aa5e21bf7da470945b05d216cf
Signed-off-by: cloudnull <kevin@cloudnull.com>
This change adds the volume group check from the
maas plugins, and also adds a cli helper to run bash command.
Change-Id: I303a843b0abaea721758e182a9c8f3e2db33e85d
Signed-off-by: Michael Rice <michael.rice@rackspace.com>
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
In PR [1] the default for insecure was set to False. This commit
updates the sample configuration file to match that default.
NOTE: We also mock out test_insecure as is done in test_secure so that
the test doesn't actually rely on what is set in openstack.ini to
pass.
[1] https://review.openstack.org/#/c/474366/
Change-Id: I5257be8cfb9483ac7dd02b893e4a22a2ee46bbf7
The 'insecure' option was being read in as a string without being
converted to a boolean, preventing it from ever being able to be set to
False. The default value has also been changed to False, so that
verification of certificates must be explicitly disabled.
Change-Id: Ic68b870ea8d5e2e3451ea7915407fabb918efe72
Some of tests use different method of assertTrue(isinstance(A, B)) or
assertEqual(type(A), B). The correct way is to use assertIsInstance(A,
B) provided by testtools.
Change-Id: Ieb99417a4522f803e15547a9c7f6d781b6142678
The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases
Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.
Change-Id: Iff74a21c0f26704a079303ac8db141f34a6ef256
This changes the layout of the tests. Before both unit
and functional tests were in the same place. That made
it so development really needed to happen on linux because
of tests like uptime needing /proc/uptime This change
puts those kind of tests into the int testing dir
and adds a unit and integration test arg to tox.
Change-Id: I922079e4a556a171aadd801a8cc932e1e08f9b5d
Signed-off-by: Michael Rice <michael.rice@rackspace.com>
Per pep 3113 Python 3 does not support tuple parameter
unpacking. This change removes the tuple from the function
param in the memcache plugin test since nothing is done
with it anyway.
Change-Id: I08c84cab308bbb405e5864fb0417f00c5310e71a
Closes-Bug: 1689347
Signed-off-by: Michael Rice <michael@michaelrice.org>
This patch adds a memcache plugin along with tests and documentation.
Implements: blueprint monitorstack
Change-Id: Iefb0c0912078713c26387e02e135d70d7a96a7dc
This patch ensures that monitorstack connects to the system URI for
libvirt. Without this, a regular user may connect to libvirt without
full access to the existing virtual machines.
It also adds the gathered variables to the output dictionatry so they
are returned when the plugin runs.
Tests have been adjusted to match the new changes, including a new
constructor that takes the system connection URI into consideration.
Closes-Bug: 1684235
Change-Id: Ieacc69ee495268b3b20974eb2f01ff1d2c9195c1
The PR adds the cinder block pool metrics so that we can now retrieve
insights into the environment on the capacity all active storage pools.
This PR also creates tests for the new plugins and reduces duplication
across plugins by centralizing the runner method into the init of the
tests module.
This should now bring total code coverage to 100%
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The change implements several fixes so that monitor stack can be run in
OpenStack environments supporting both V2 and V3 authentication.
All of the plugins now have a proper name lookup and will pull from a local
cache instead of hammering the API on every request.
The Local caching functionlaity used to be tied to the python shelve
module. Due to issues with Python 3.5 and shelves the library was
replaced with the diskcache lib which implements a caching interface
supporting both py2.7+.
Tests have been added in support of all additions.
Tests have been added for the os_utils module which should bring it
within ~98% of completeness.
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The following plugins add a basic OpenStack API framework which is used
to pull metrics for nova vm quotas and usage for RAM, vCPUs, disk, and
instance count.
added codecov.yml
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
* Couple of updates: telegraf line protocol, dynamic imports, metadata
This change uses the pkgutil module to import the plugins and load the
selected module. This same method is also used to list all of the
available modules.
To test run without installing the app pah has been added to the module
main using the sys path as found at runtime.
The telegraf line protocol has been added to allow this project to be
run with an exec stanza within telegraf allowing it to store metrics in
InfluxDB.
Meta has been added to the example plugin allowing additional meta data
to be returned in the result. This provides the ability to add tags or
other metadata into a given monitoring system using a simple key=value
format.
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
* added fixes for pep8
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>