Commit Graph

72 Commits

Author SHA1 Message Date
huang.zhiping 38541c4014 Update home-page
Change-Id: Ib06fce8154f38be72a91cbcd9dce86d2116a5303
2019-11-06 11:46:51 +00:00
Andreas Jaeger d00cd3508f Update zuul jobs
Remove publishing jobs, this project is not under governance and cannot
publish to docs.openstack.org. Replace the publishing jobs by jobs that
just test but do not publish.

Import missing jobs and templates from central project-config so that
all jobs are here. This allows also to remove the non-voting
requirements-check job from the gate (note that gate jobs should never
be non-voting).

Rename in-tree defined jobs to follow the Zuul naming conventions [1],
they really need to start with monitorstack to not break other repos
since we have a global namespace.

[1]https://docs.openstack.org/infra/manual/drivers.html#consistent-naming-for-jobs-with-zuul-v3

Depends-On: https://review.opendev.org/661610
Change-Id: I150177f4192d9eec4aa15643bcc2939fc89694a5
2019-05-28 17:38:12 +02:00
Andreas Jaeger b92073453c Fix docs building
With Sphinx 2.0.1 working only with python3, update the configuration:
* Use openstackdocstheme (oslosphinx does not work with python3)
* Update requirements
* Update tox.ini to use normal lines for doc building

Also, fix URL for repo after OpenDev rename.

Fix flake8 tests, don't test openstack-ansible-tests files.

Change-Id: I464d04738aab137ea8e938614b804e1ac50f6741
2019-05-28 15:22:37 +02:00
OpenDev Sysadmins d3381fc7a0 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:30 +00:00
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
zhang.lei ede3c8e200 Remove the deprecated "giturl" option
From openstackdocstheme 1.18.0, valid Git URLs can be retrieved by
openstackdocstheme[1], we do not need giturl option anymore.

[1] https://review.openstack.org/532163

Change-Id: Idef3f2269f0cc838bd75c44525798f9edd467997
2018-01-15 02:29:05 +00: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
Andreas Jaeger 7aa600e42f Revert "Switch from oslosphinx to openstackdocstheme"
openstackdocstheme is only for Official OpenStack projects, see
https://docs.openstack.org/openstackdocstheme/latest/

this repo is not an official project under governance.

This reverts commit 66d45fc53d.

Fix build problems:
* Fix wrong include path
* Disable sphinxmark

Change-Id: I83e91d12e82a8cf703f4b09c7d315edbb9878bd9
2017-07-02 10:56:09 +02:00
Van Hung Pham 66d45fc53d Switch from oslosphinx to openstackdocstheme
As part of the docs migration work[0] for Pike we need to switch to use
the openstackdocstheme.

[0]https://review.openstack.org/#/c/472275/

Change-Id: I7c001fa8f627dc991759e157a802588962af53d9
2017-06-29 14:53:11 +07:00
Jenkins aab54fecfd Merge "Only import os_utils when plugin is called" 2017-06-23 21:40:35 +00:00
Jenkins ed54f33c6e Merge "Remove support for py33" 2017-06-23 21:39:47 +00:00
Matt Thompson d99b674500 Default insecure to false in sample config
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
2017-06-23 12:24:11 -04: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
Van Hung Pham 45aaaee923 Remove support for py33
The gating on python 3.3 is restricted to <= Mitaka.
This is due to the change from Ubuntu Trusty to Xenial,
where only python3.5 is available.
There is no need to continue to keep these settings.

Change-Id: Id04514d228a12eeb6725cd9a266eab9de01125e4
2017-06-23 16:06:39 +07:00
Miguel Alex Cantu f655761212 Remove project_name = nova from sample config
OSA deployments do not come with a 'nova' project by default,
which means that if a user haves this in their configuration while
testing monitorstack on a OSA deployment, it will fail trying to
authenticate. This commit removes the reference.

Change-Id: Ia15759f116ff733d2a2fb62ce0c9fc28c1731786
2017-06-19 18:48:18 +00:00
Jenkins aaf593a193 Merge "Verify https connections by default" 2017-06-15 12:34:33 +00:00
Jimmy McCrory c16472bbc1 Remove inline comments from example config
Inline comments are not automatically removed when config options are
parsed. This can lead to difficult to debug errors if the example config
is used directly.

Change-Id: I23ecd32a0f14a7d8ba36a7cf17c47ac3814e7f19
2017-06-14 16:57:16 -07: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 c86e5d6ebf Merge "[Docs] Fix path to example config file" 2017-06-14 20:28:32 +00:00
Major Hayden 39f070f4e7
Require 99% test coverage or higher
This patch sets a requirement of 99% test coverage or the CI job will
fail. This should force us to ensure we are testing as much of the
plugins and the core of monitorstack as possible.

Change-Id: I22aa19f0e0e4584c377e39f07c0aae2b0814d59a
2017-06-14 14:08:59 -05:00
Jimmy McCrory 434483a76d [Docs] Fix path to example config file
Change-Id: I3cdea18993c884e8a53a07009b4e78d3dd2901a1
2017-06-13 13:54:12 -07:00
Jenkins 3196132f76 Merge "Remove support for py34" 2017-06-12 13:33:30 +00:00
Jenkins a052de34bb Merge "Replace assertTrue(isinstance()) with assertIsInstance()" 2017-06-12 13:32:00 +00:00
Jenkins d1cdda0fb4 Merge "Replace assertEquals with assertEqual" 2017-06-12 13:31:47 +00: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
Van Hung Pham b5f64655eb Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka.
This is due to the change from Ubuntu Trusty to Xenial,
where only python3.5 is available.
There is no need to continue to keep these settings.

Change-Id: If33b923a5725c16eca06bdd970ceb8e66740dbd0
2017-06-08 03:09:39 +00:00
Van Hung Pham 6b20f17624 Replace assertTrue(isinstance()) with assertIsInstance()
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
2017-06-08 02:10:06 +07: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
Van Hung Pham dbaee9daec Replace assertEquals with assertEqual
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
2017-06-02 17:35:28 +07:00
Michael Rice 6eae6ea8db refactor testing directory layout
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>
2017-05-31 21:11:29 -05:00
Michael Rice 0268ce450c Removes tuple unpacking from memcache test
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>
2017-05-08 12:25:05 -05: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 137a0f5cf9
[Docs] kvm plugin documentation
This patch adds usage docs for the kvm plugin.

Change-Id: I6a28ae46f10bf97bcbe504e40353a2b0f3f8fe87
2017-04-19 13:01:17 -05:00
Major Hayden 20cd4f08c2
Restructure monitorstack plugin docs
This patch moves the base plugin docs into a directory to prepare
for different types of plugins which share a common set of
instructions.

Change-Id: Ie2f193b070469d159216bafa36620674c9f6662c
2017-04-19 12:55:32 -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
Major Hayden 95fb4b1983 Update README
This patch updates the README file to add links to documentation and
contact information.

Change-Id: Ia28c9fbd8ab7fb3c083259b2f85b5f04a702343f
2017-04-19 13:37:41 +00:00
Major Hayden cf4a71bfee
Fix requirements to unblock gate
Something went sideways with flake8 recently with regards to pep257
(whitespace checks). This patch updates the flake8 requirement and
disables pep257 checks to unblock the gate.

Change-Id: I139c902a4d95a21a2dcac8dcf65a85455f7331ec
2017-04-19 08:36:58 -05:00
Major Hayden 395d42d4c4
[Docs] Uptime + process plugins
This patch adds a basic structure for plugin docs and provides
docs for the uptime and process plugins.

Change-Id: Id98e0ed8cd7ba29968ad16a0ce90ababe74498ea
2017-04-10 09:16:22 -05:00
Major Hayden 57d1fb9651
[Docs] Initial docs for monitorstack
This patch adds some initial docs for monitorstack. This is by no
means an exhaustive set of documentation, but it's a good place
to start.

Change-Id: Ia028bd51f145093c42eec91314a0a0e124170be0
2017-03-29 15:59:11 -05:00
Major Hayden b616091eb9
Implement OpenStack gate for monitorstack
This patch configures the monitorstack repository to work well with
the OSA gate jobs for docs, release notes, and functional tests.

Change-Id: Ibacea5cdfab609c3724b434189a6efad4b1c6c35
2017-03-24 11:55:09 -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