Commit Graph

28 Commits

Author SHA1 Message Date
cloudnull c50f76e73f
add default pickle cache version
Change-Id: I3efcd68425a79d84241d4f7c16ba385127331deb
Signed-off-by: cloudnull <kevin@cloudnull.com>
2019-02-17 22:56:08 -06:00
Kevin Carter 034228e754
Update monitorstack to use updated openstacksdk and es
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>
2019-02-17 09:27:36 -06:00
Michael Rice b676952bbe Adding vg_check from the maas plugins
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>
2018-04-17 21:05:22 -05:00
Monty Taylor cee20d7740
Rename python-openstacksdk to openstacksdk
Change-Id: Ie66b9ba8be4a02d9909fe20b79713ab2d22444b0
2018-03-23 08:51:50 -05:00
Andreas Jaeger 4eeffab026 Remove setting of version/release from releasenotes
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
2017-11-17 11:01:36 +01:00
Matt Thompson 98cb350edc Only import os_utils when plugin is called
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
2017-06-23 11:56:24 -04:00
Jimmy McCrory dc4251a766 Verify https connections by default
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
2017-06-14 16:07:56 -07:00
Jenkins b670c416f7 Merge "Set verify to False when insecure is True" 2017-06-12 13:16:45 +00:00
Kevin Carter 901ab883ff Correct telegraf line format
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>
2017-06-09 18:12:28 -05:00
Miguel Alex Cantu a411f5f272 Set verify to False when insecure is True
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
2017-06-05 17:15:34 +00:00
Major Hayden a30fe1d79d
Add memcache plugin
This patch adds a memcache plugin along with tests and documentation.

Implements: blueprint monitorstack
Change-Id: Iefb0c0912078713c26387e02e135d70d7a96a7dc
2017-04-27 07:35:51 -05:00
Major Hayden 928b34243a
Fix variable return bugs in kvm plugin
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
2017-04-19 12:42:56 -05:00
Kevin Carter 70f44024f9 moved cache location to stadard user caching dir (#26)
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-03-19 20:24:45 -05:00
Kevin Carter e808ba1f7d Add Cinder block pool metrics (#25)
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>
2017-03-19 15:31:46 -05:00
Kevin Carter b2b2f8e7b5 added the ability for a check to have multiple returns (#27)
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-03-19 09:22:19 -05:00
Kevin Carter a61786d4e1 added rackspace maas format (#28)
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-03-19 09:03:06 -05:00
Kevin Carter 775f034a78 More complete testing of the os plugins/utils (#24)
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>
2017-03-14 11:34:10 -05:00
Major Hayden 79d23cd713 Add process check (#23)
This patch adds a check for running processes along with tests.
2017-03-10 15:49:11 -06:00
Major Hayden 10e9634213 Tests for remaining OpenStack modules (#22) 2017-03-10 11:48:45 -06:00
Major Hayden dc0ceffec2 Add tests for os_vm_used_cores (#20) 2017-03-10 09:56:51 -06:00
Major Hayden c3a396daba Add PEP257 checks (#15)
Check for docstrings.
2017-03-09 15:48:18 -06:00
Major Hayden 3114e7a123 Complete test coverage for os_vm_quota_cores (#14) 2017-03-09 14:55:44 -06:00
Kevin Carter 37a9950ab2 Added VM instances used and quotas (#6)
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>
2017-03-09 09:48:17 -06:00
Major Hayden f943e47f70 Improve test coverage (#4) 2017-03-07 16:34:14 -06:00
Major Hayden 0b55880400 Increase test coverage for uptime 2017-03-07 14:03:26 -06:00
Kevin Carter 52e06b501b Added KVM Metric plugin (#2)
This plugin will pull metrics and meta-data from a KVM host.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-03-01 13:22:10 -06:00
Kevin Carter 5aca2d2940 Couple of updates: telegraf line protocol, dynamic imports, metadata (#1)
* 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>
2017-03-01 09:30:43 -06:00
Major Hayden 5f9ddd6dba Proof of concept 2017-02-27 15:11:30 -06:00