83 Commits

Author SHA1 Message Date
Jenkins
457fb7417e Merge "Install collectd_ceilometer module during deployment" 2017-02-10 15:46:56 +00:00
Emma Foley
5bfb438f1c Load logfile.conf first to help debugging
Conf files in $COLLECTD_CONF_DIR are loaded in alphabetical order.

If there is an error loading the python plugin, the logfile plugin is not
loaded.
To help debugging, the logfile should be loaded first.

Changing logfile.conf to 01-logfile.conf should fix this issue by making
collectd load the logfile.conf first

Closes-Bug: #1657859

Change-Id: I1f748d61d6d9a291bcc32476ac17bb0d60fdc573
2017-02-08 17:38:14 +00:00
Emma Foley
7ff2e4252f Install collectd_ceilometer module during deployment
pip_install collectd_ceilometer module
- Install libvirt-* requirements from the package manager so pip can build

This ensures is actually installed from teh requirements.txt file, in
relation to the related bug.

Change-Id: Iba26b1da863288e789f68646dee6a7f62fd6c160
Partial-Bug: #1644254
2017-02-08 17:00:03 +00:00
Jenkins
7231032cba Merge "Indent bash functions for better readability" 2017-01-26 15:50:45 +00:00
Emma Foley
f0adfc65c0 Remove pbr-dependent code
- Remove the pbr import in colelctd_ceiloemter/__init__.py
- PBR is still needed for a pip_install, but was causing import
  errors in the plugin.

Change-Id: I24c6349caba3fdd097a5218cc048aa696bd27550
Closes-Bug: #1644254
2017-01-20 16:30:00 +00:00
Emma Foley
4eab82eb12 Indent bash functions for better readability
Change-Id: I5e3918a234efe9713a7ebf6273e85e917ac70e47
Closes-Bug: #1658113
2017-01-20 15:01:08 +00:00
Emma Foley
2e690a324c Add example gnocchi file
- Add a sample collectd-gnocchi-plugin.conf

Change-Id: Ie7997d0c4b35964002693ea0cc83d66372b56191
2017-01-17 09:55:32 +00:00
Emma Foley
cfcdbfdfd1 Add collectd_gnocchi support
- Create a new gnocchi dir for the collectd-gnocchi plugin.
- Get gnocchi endpoint from keystone
- Add new _base_url format
- Create metrics if they don't already exist
- Add instructions to doc/source/devstackGSG.rst

Change-Id: Id7ce8130cb22f33147b7f031cd65564375db10d6
2017-01-17 09:55:32 +00:00
Emma Foley
4f1d999665 COLLECTD_CUSTOMIZE_UNITS -> COLLECTD_CUSTOM_UNITS
- Change the config variable name.
  - The config variable no longer references ceilometer.
  - It is now clearer that the config variable is for all plugins
  - The variable is a noun instead of a verb, so it's clearer that
    this is something to define, instead of a boolean.

- Update docs
  - Added a clarification on the format of the custom unit definition.
  - Corrected incorrect reference to COLLECTD_CEILOMETER_UNITS in
    devstackGSG.rst and usage.rst

Closes-Bug: #1656877
Change-Id: Ie688397242d57cf0fee6629fafb89afd8899a599
2017-01-16 16:18:50 +00:00
Jenkins
1e64bdeb1e Merge "Re-order logic in plugin.sh" 2017-01-13 20:59:51 +00:00
Helena McGough
5def6f9975 Updated documentation for CEILOMETER_BACKEND
- Updated devstackGSG.rst to set CEILOMETER_BACKEND
 - Added CEILOMETER_BACKEND to local.conf.minimal
 - Added a reno for this bug fix

Change-Id: Ibbf606021a1f0dcc0db6c586e092b03df423a7a5
Closes-Bug: #1655611
2017-01-13 12:38:40 +00:00
Emma Foley
2c7862cef3 Use KEYSTONE_SERVICE_URI instead of KEYSTONE_AUTH_URI
- KEYSTONE_AUTH_URI is the admin url
- Use KEYSTONE_SERVICE_URI to access keystone as a service user.

Closes-Bug: #1656063

Change-Id: I957e166931b3dea050d0cee3365250a92ae3a57f
2017-01-12 18:31:14 +00:00
Jenkins
a5df9666fb Merge "Added -p flag to mkdir" 2017-01-11 14:04:47 +00:00
Jenkins
e2ca9306d7 Merge "Add details on how to contribute" 2017-01-11 14:03:53 +00:00
Jenkins
336942144a Merge "Add troubleshooting guide" 2017-01-11 14:00:33 +00:00
Jenkins
2e2cec7b26 Merge "DevStack enablement of the collectd-ceilometer custom units feature" 2017-01-11 10:35:22 +00:00
Helena McGough
606902c455 DevStack enablement of the collectd-ceilometer custom units feature
- Added deployment code for custom units enablement
      - Updated the DevStack documentation to provide instructions on
        how to enable this feature
      - Editted the collectd-ceilometer-plugin.conf file to enable the
        feature
      - Added a reno for this change

Change-Id: Ia93da4abdf066ba677dcb3ee0e44388c06d97ff5
2017-01-11 10:18:08 +00:00
Jenkins
7cbb59d87e Merge "Remove installation.rst" 2017-01-11 10:13:27 +00:00
Emma Foley
6590b5cc21 Add details on how to contribute
Add collectd-ceilometer specific contrib information
- What needs to be included in a feature?
- How to add a reno entry

Change-Id: I91cf5af30eb0e26695dffd374f796023dd8af099
2017-01-10 13:26:17 +00:00
Emma Foley
afb3843695 Remove installation.rst
- Remove installation.rst as the information has been superceeded
  by devstackGSG.rst and GSG.rst.

Change-Id: Iefcb16d4a657ba591e1e20e8cff8d31a6fd47c34
Closes-Bug: #1568178
2017-01-10 13:01:13 +00:00
Helena McGough
a2759bcdb1 Added -p flag to mkdir
- Add -p flag when creating configuration directory
 - Added a reno for this bug fix

Closes-Bug: #1648554
Change-Id: I8882738db03675a43911c04aa0172d7d3a55c5f1
2017-01-10 10:10:03 +00:00
Helena McGough
67061abdc0 Documented the manual enablement of custom units feature for collectd-ceilometer-plugin
- Updated the GSG.rst file with instructions on how to
    enable the feature.
  - Provided a reno for this documentation update.

Change-Id: I007e262f2676067ebd3bdc16dac0e26155a1f1e9
2017-01-10 09:55:38 +00:00
Emma Foley
bf32465eb1 Add troubleshooting guide
Add a trouble shooting guide for debugging common issues in your deployment

Change-Id: I8629f2a8ddf21c57878e6b09374aa4558d89e10e
2017-01-09 13:24:33 +00:00
Jenkins
54b4f156b2 Merge "Remove Keystone V2 API support" 2016-12-20 20:04:26 +00:00
Jaroslav Safka
95c0d43f19 Remove Keystone V2 API support
removing keystone v2.0 api because is no longer supported

Closes-Bug: #1614892
Change-Id: Iaeabc663990168e2d6959d8fb629234ca02128d1
2016-12-16 09:27:01 +00:00
Radek Zetik
53015ad86c Configuration of OS_TENANT_NAME
collectd-ceilometer-plugin.conf OS_TENANT_NAME was not set, therefore
was unable to connect to keystone as this value was not set during
deployment.
This change sets OS_TENANT_NAME to SERVICE_TENANT_NAME which is set by
devstack for all projects.

Change-Id: I2fdda934cb48d70bfc7f361a3916630f8aa912f7
Closes-Bug: #1649795
2016-12-14 16:42:25 +00:00
Petr Fortelny
b98559c3bc Re-order logic in plugin.sh
- Move collectd installation into install section

Change-Id: I3613c6f167e47f70924c00252dcfdde71ed75eed
Closes-Bug: #1623992
2016-12-13 10:57:14 -05:00
Jenkins
2c26125421 Merge "Provides steps and documentations for installing collectd-ceilometer-plugin with Kolla." 2016-12-13 02:26:00 +00:00
Jenkins
9f128da4eb Merge "Refactor directory structure for multiple plugins" 2016-12-12 17:18:15 +00:00
Helena McGough
132158b1bb Updated Documentation
- Added Devstack GSG
 - Added sample local.conf.minimal
 - Added GSG from source

Change-Id: Ie58b99f11412627cc89916c777d700fcb80aa627
2016-12-07 17:16:23 +00:00
prithiv
994931559d Provides steps and documentations for installing
collectd-ceilometer-plugin with Kolla.

Change-Id: Ic23a8e9a13fac1141913c438f1f94b5ec1e7b447
Closes-Bug: #1628856
Co-Authored-By: Helena McGough helena.mcgough@intel.com
2016-12-06 20:19:19 +00:00
Emma Foley
4ab4f23b4d Add reno to the repo
Change-Id: If76e1055317347cf6c15f37751a5d8a83aebe959
2016-12-06 15:28:00 +00:00
Emma Foley
53bd946ff7 Refactor directory structure for multiple plugins
- Add collectd_ceilometer.ceilometer dir
- Add collectd_ceilometer.common dir
- Move test files to collectd_ceilometer/tests/{ceilometer,common}
- Add base code to collectd_ceilometer/tests

Change-Id: I5bd0a8cfe8eb55407f3d6827c0bb4b509dae8c8c
2016-12-05 18:07:32 +00:00
Emma Foley
3e98d4f26a Create separate config files for collectd plugins
- Add collectd-ceilometer-plugin.conf to etc/collectd.conf.d/
- Add logfile.conf to etc/collectd.conf.d/
- Add default values to the collectd-ceilometer-plugin.conf
- Add default values to the logfile.conf
During deployment:
- Add substitutions for the vars

Change-Id: I196367e6f48af94c053b149596c57a735109b9ed
2016-12-05 15:20:43 +00:00
Federico Ressi
4e3545b513 Remove base test case.
- Remove base test case.
- Use patch_class to mock collectd in test_meters.

Change-Id: I630ce2cc65e1d0fdfdb1b93945f4655aa366a1b5
Closes-Bug: #1615349
2016-12-05 15:16:20 +00:00
Federico Ressi
9cf7d56f5a Refactor and test main entry point.
plugin.py is really hard to test because good part of
its logic happend during code importation.
It's test depends on the base TestCase that mocks too
much thinks in a way that makes hard to spot real problems.
The test also fails to test re-authenthication bug because
of bad mocking.

This code should fix above problems. It also remove some
logic in the hooks: exceptions are already captured and
logged by collectd and there is no need doing it inside of
hooks. Init hook is also pointless from the perspective
of this plugin initialization and it was removed.

Co-authored-by: Emma Foley <emma.l.foley@intel.com>
Related-Bug: #1615349
Change-Id: I4db8a94243ecbe98cd6bc13e4b66293172346dcd
2016-12-05 15:12:06 +00:00
Jenkins
0d03fa8139 Merge "Updated the unit mappings in the units.py file" 2016-11-14 17:38:14 +00:00
helena mcgough
c65e662b98 Updated the unit mappings in the units.py file
- Added units for the following plugins: Chrony, Cpusleep, GPS,
      Interface, Mysql, Ntpd, Powerdns, Protocols, Redis, Table, Xencpu
      and Zfs_arc plugins.
    - These are the units/plugins for collectd version 5.6.0

Change-Id: Id5499412da4b45a07ebbd333607722638224e758
2016-11-14 16:59:15 +00:00
Michal Ptacek
68c6f2cc3e Adding Keystone V3 API support
in master branch keystone v2.0 api is no longer supported, this patch
is introducing v3 api support.

Change-Id: I5ed5f65f34033b6a4c550704bb186dfa8d0fc82c
Closes-Bug: #1614892
2016-11-10 21:22:59 +00:00
helena mcgough
f1355f788d Adding a getting started guide for manually building collectd
- how to prepare the system
 - install,build and configure collectd
 - install the ceilometer plugin for collectd

Change-Id: I5ce84fbe1243fa238dd16c164b7963f2b6f28bd4
2016-11-07 17:48:28 +00:00
Jenkins
2837d6bd33 Merge "Added collateral to README.rst document" 2016-10-28 12:32:39 +00:00
Emma Foley
33158cfff2 Add logfle.conf to "restore conf" logic
There is code to remove collectd-ceilometer-plugin.conf when unstacking,
however, the same logic wasn't added when logfile.conf was introduced.

This change adds that logic so that logfile.conf is removed along with
collectd-ceilometer-plugin.conf

Change-Id: Ib100db5603fc22a640fe18002d754ba8b8538041
2016-10-13 21:08:02 +01:00
Federico Ressi
6356c05194 Provide Vagrant configuration file.
The Vagrantfile creates a basic up-to-date VirtualBox image
with Ubuntu Server 16.04 LTS and all dependencies required
to run Tox and DevStack.

Provided Vagrantfile requires Vagrant, Virtual Box. A fast
internet connection it is recommended.

If environment variables like http_proxy, https_proxy and no_proxy
it will assume a proxy connection is required to download
archives from upload repositories. In such cases
Vagrant plugin vagrant-proxyconf is required to provide proxy
enviroment to provided virtual machine.

Closes-Bug: #1606338
Change-Id: I5fc5060d78276ec5b801118d8d6873f0071ecad9
2016-10-13 18:42:27 +00:00
Helena McGough
41333abfa8 Added collateral to README.rst document
Change-Id: I888cbb66b789598426d306c8bc70112df2211162
2016-10-13 08:16:25 +00:00
Federico Ressi
df6a4f6597 Refactor and test log handler
- Write unit tests for the handler
- Forward constructor parameters to the super-class
- Takes verbosity from outside instead of using configuration class

Closes-Bug: #1610348
Change-Id: I15b96d14e513889efbb50e2c51863bc224e71465
2016-10-12 09:02:09 +00:00
Federico Ressi
652ed97af1 Fix POST result verification.
The result of POST request is threated using a more explicit
approach via raise_for_status method instead of using ambigous
bool operator.

Requests library is mocked in plugin test instead of base test class.
The test for this behaviour has been fixed.

Closes-Bug: #1614772
Change-Id: I9079246b1b501b69e850878bef13c16c7c6d0b59
2016-10-11 09:59:21 +00:00
Federico Ressi
3df52a97bc Remove base test case from test_config.
Remove collectd_ceilometer.tests.base.TestCase from base classes
of collectd_ceilometer.tests.base.test_config test cases.

Related-Bug: #1615349
Change-Id: Ic407752a07fb96a5fc431e4253e976148800b5ea
2016-09-29 16:03:20 +00:00
Jenkins
09d86e8c50 Merge "Discover only tests in tests folder." 2016-09-28 16:03:55 +00:00
Emma Foley
de5d0375e3 Change settings for ceilometer user in collectd config
When creating the collectd-ceilometer-plugin.conf file,
incorrect values were used

This commit changes the following variables:
- OS_USERNAME "$OS_USERNAME" -> OS_USERNAME "ceilometer"
  the service username is hardcoded, and OS_USERNAME overrides an
  existing variable used by OpenStack

- OS_PASSWORD "$OS_PASSWORD" -> OS_PASSWORD "$SERVICE_PASSWORD"
  these are usually identical for devstack, but can be set differently

- OS_TENANT_NAME "service" -> OS_TENANT_NAME "$SERVICE_TENANT_NAME"
  set to service by default.

This change also removes the code that overwrote the OS_USERNAME
and OS_PASSWORD variables in devstack/settings

Change-Id: I9c8435766aa8448210bf06676f4e06d8fbf3a7a8
Closes-Bug: #1605352
2016-09-24 08:29:31 +00:00
Emma Foley
88a6c59570 Make tox test py35
Partial-Bug: #1617432
Change-Id: Ieb440869e119d312da361d03277fe63d1e956ff8
2016-09-23 13:29:29 +00:00