- 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
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
- 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
in master branch keystone v2.0 api is no longer supported, this patch
is introducing v3 api support.
Change-Id: I5ed5f65f34033b6a4c550704bb186dfa8d0fc82c
Closes-Bug: #1614892
- how to prepare the system
- install,build and configure collectd
- install the ceilometer plugin for collectd
Change-Id: I5ce84fbe1243fa238dd16c164b7963f2b6f28bd4
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
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
- 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
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
Remove collectd_ceilometer.tests.base.TestCase from base classes
of collectd_ceilometer.tests.base.test_config test cases.
Related-Bug: #1615349
Change-Id: Ic407752a07fb96a5fc431e4253e976148800b5ea
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
This is to prevent python 3 unittest2 failing to load all modules when
libvirt is not installed.
Partial-Bug: #1617432
Change-Id: I37d8d21d4cd0bda099ea08b8b2f807e006edcab8
When installing collectd is usually automatically started. If it is
already running, the start operation has no effects. Therfore, to make
any configuration setting effective it has to be instead restarted
(stop + start).
Collectd log file is stored by logfile plugin to stack log folder.
The actual location of this file can be configured.
Verbosity of plugin can be increased to make debug messages visible
when running inside a collectd release compiled without deubgging
support. This option is mainly useful for plugin developers.
Related-Bug: #1606338
Change-Id: I658c1c3837970f3732ea64acd791838ee54c61ac
- Add mappings between counter type in collectd and Ceilometer.
Previously, all counters were given "gauge" type.
Now, the following mappings are applied:
- gauge -> gauge
- derive -> delta
- absolute, counter -> cumulative
- Add unit tests
Closes-Bug: #1583301
Change-Id: I13e75fcc57ed2b44c2b9a02ee9562f70748d01c2
The pbr.VersionInfo version_string function was causing
a failure when collectd is initiated from a service. This
fix simply removes the invocation of that function. collectd
can now be started as a service without any pbr issues.
Change-Id: Iba3f6647d16fa0834e6ccd27d333b6a25366beec
Closes-bug: 1609810
Co-authored-by: maryam.tahhan@intel.com
Collectd module could be required by plugin components
but importing it from their modules makes unit testing
harder because it would require running tests from
inside collectd process.
This changes make the module available by passing it
to component constructors which makes testing and mocking
easier.
Related-Bug: #1583301
Change-Id: I6abfd330c8f3b5108e78543df7c803cd65a15655
- This change removes the hard coded
package version from the setup.cfg.
- Following this change the package
version will be generated by pbr.
Change-Id: If5b374060ce2a1639d94bac75d392679ed38d0d1
Closes-Bug: #1607545
- This change qoutes the module name
- This change fixes processing of
COLLECTD_BATCH_SIZE
Change-Id: I1de49d65351e5973b794eec973efec852d42151b
Closes-Bug: #1607526
Flake8 3.0 is having some problems with some of its plug-ins.
Downgrade it to workaround the issue sow here:
http://goo.gl/Bv2NJw
Change-Id: Id5898e0d0a5b75cda51c09888b9ec822f55346b4
Closes-Bug: #1606553
* Adding fuction to check if collectd config folder exists, and create
the folder if it doesn't.
Change-Id: I87d2e233d6db7db083aa6795037f9e73fe708b80
Closes-Bug: #1596971
- change the name of the var used to store the
collectd-ceilometer-plugin so that it doesn't conflict with
OpenStack naming conventions later on.
- There is no end-user impact as this is set and used internally.
Closes-Bug #1603996
Change-Id: I5abd39a323aaddc66894e0a3ec3e475c0960d0dc
- Remove the collectd_ceilometer_plugin.py file
- Adjust devstack code to use collectd_ceilometer/plugin.py file
Change-Id: Ib396b15476b4d6d3e2f3d54a315b61db6f5ce908
Add COLLECTD_CONF_DIR config option so that a non-default config
dir can be specified for collectd.
Closes-Bug #1583282
Change-Id: Ic697b9e35f6d3b063e53dca2cb44fa24f8be3598
Add workaround for Collectd which limits log size to 1023B.
Add stack trace to exception handling for better logs/debugging.
Closes-Bug #1570397
Change-Id: Ie9f1911e0fb367d5ce3637afd0909ab42a5efc61
Adds the COLLECTD_INSTALL option which toggles whether collectd is installed.
Defaults to True.
Should be set to False to use custom versions of collectd.
Closes-Bug #1567521
Change-Id: I8235e19ae90f6a3af21117cb07534831801d52d3
Because CI runs the individual testcases in multiple threads.
And Config class is singleton, so there was race condition.
Closes-Bug #1567480
Change-Id: I569a69758c30e04333f4d0c274de666b9207aeca
Add collectd_ceilometer_plugin.py so collectd doesn't get confused
between module and file.
Change-Id: Icd63feafebc3e057e4e0cf9392237464b7c7a5f1
Co-Authored-By: Jaroslav Safka <jaroslavx.safka@intel.com>
Add functionality to the plugin:
- Convert from collectd data sources to Ceilometer format
- Add unit mappings for Ceilometer
- Define resource IDs
- Add unit tests
Change-Id: Ica1f49ea3c9bbc4bc857044dea7da39869b33bba
Add some structure to the repo.
Add very bare testing infrastructure.
Add basic repo information (contact, launchpad, etc).
Change-Id: I4f5595e38f61a0298d0b6828fe64f6a5ff70eac2