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>
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.
Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.
Also, use openstackdocstheme for releasenotes.
Fix linter failure I202 with rearranging imports.
This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.
Change-Id: If3da3c9fe534fde2f04be7fa9602153126e9ac0d
Currently, if a dependency of one of the os_ plugins is missing,
running monitorstack with no args returns (for example):
```
OpenStack plugins require access to the OpenStackSDK. \
Please install "python-openstacksdk". \
ERROR: No module named keystoneauth1.loading
```
This commit moves the os_utils import in the os_ plugins to within cli,
similar to what is being done in the kvm module. This allows the
monitorstack cli to operate normally even if a plugin cannot be loaded.
Change-Id: I2ff1ad8c6365f6592191f09ea9c0d543f81e16ba
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
The telegrad line format is using > [name,tags metrics timestamp]
as for the format. This change makes it so that we're now using the
correct lineformat when exporting data to telegraf.
Change-Id: I72d6eb45a2c734d92e2da08c5df1998e60266f75
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The Connection object requires the verify parameter to be set
to False when insecure is True. This is required for monitorstack
to work with self-signed cerificates.
Change-Id: I18604662a0935065676dfbe2f11cf97c5c5d85ff
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>