
- how to prepare the system - install,build and configure collectd - install the ceilometer plugin for collectd Change-Id: I5ce84fbe1243fa238dd16c164b7963f2b6f28bd4
4.3 KiB
Getting Started with Collectd
This is a getting started guide that describes the setup of collectd with ceilometer plugin.
Pre-requisites
- Access to the internet
- A working Openstack environment
- Keystone and Ceilometer services enabled
Linux Configuration
Collectd Set-up
Ensure that the binary packages for your Linux distribution are installed and up-to-date.
Install the libraries that allow the plugins to collect the actual values.
Clone the source code from the repo.
Currently there are two major versions of collectd; Version 4 and version 5. Version 4 is outdated, so version 5 should be used for this setup. Checkout the version 5.6 branch.
git checkout collectd-5.6
Then build this version:
Once built, configure collectd.
Now, install collectd.
sudo make install
Set and Configure Collectd as a Service
To enable collectd as a service on your system copy the .service onto your system. This file is located in the "/collectd/contrib/" directory of the repo.
Start collectd as a service.
Check the status of collectd.
For further information on enabling collectd as a service:
https://collectd.org/wiki/index.php/First_steps#Starting_the_daemon
Installation and Configuration of collectd-ceilometer-plugin
Clone the collectd-ceilometer-plugin code.
By default, the collectd.conf file is located in "/etc/collectd.conf", but because you specified "--prefix=/usr" during configuration it is now located "/usr/etc/collectd.conf".
Configurations for the plugin itself are specified in its own .conf file, collectd-ceilometer-plugin.conf. The filepath to this file should be included in the collectd.conf file.
In the collectd-ceilometer-plugin.conf file a few variables have to be changed to suit your environment:
Set the "ModulePath" to be the location of your collectd-ceilometer-plugin directory.
You must specify the service endpoint address, "OS_AUTH_URL". In an openstack setup you can use the openstack client to identify this.
openstack catalog listLook for the keystone internalURL to and use it as your "OS_AUTH_URL".
OS_AUTH_URL "<OS_AUTH_URL>"Finally, set the type of URL used for the ceilometer service to "internalURL".
CEILOMETER_URL_TYPE "internalURL"
Now, you can restart the collectd service and the plugin for ceilometer should be working with collectd.
Verification of ceilometer
To verify that ceilometer is working with collectd use the ceilometer client.
Source the credentials required to use your openstack client.
source openrcTo verify that the stats are going through to ceilometer, view the ceilometer meter list.
ceilometer meter-listSpecifically, one of the default meters that is enabled by collectd is "cpu.cpu". Check that this meter is enabled.
ceilometer sample-list --meter cpu.cpu
Troubleshooting
If you are unable to verify that ceilometer is working with collectd, try restarting the service, then check the meter list again.
Then you can also check the status of the service again or for further details you can use the following command.
This will allow you to examine any errors that are occuring.
If the plugin still doesn't appear to be working and the collectd service is running correctly without any errors, try enabling the csv plugin. This will allow you to check if collectd is generating any metrics. Enable the csv plugin, restart collectd and check the destination directory for the plugin. This will allow you to check if the plugin is loaded.