This plugin has only been tested on OpenStack Juno running on top of Ubuntu Server 14.04.1 using Python 2.7.6.
This plugin is intended to be installed on every compute node in your OpenStack environment.
Once installed, this plugin will query the OpenStack Nova API to gather the following metrics for the particular compute node the datadog-agent is running on:
- local_db
- local_db_used
- memory_mb
- memory_mb_used
- vcpus
- vcpus_used
- running_vms
You will need to create or use an existing OpenStack user who has the admin role. I recommend creating a new Tenant called datadog, creating a new user called datadog with a complicated password tied to that Tenant with the admin role. You will use that tenant, user, and password in the configuration file below.
The following steps need to be done on every compute node in your OpenStack environment you want to gather metrics for.
It is assumed you have already installed the datadog-agent on every compute node in your OpenStack environment.
openstack-capacity-reporting.py needs to be copied to /opt/datadog-agent/agent/checks.d.
openstack-capacity-reporting.yaml needs to be copied to /etc/dd-agent/conf.d.
Open /etc/dd-agent/conf.d/openstack-capacity-reporting.yaml in your favorite text editor and fill in the following parameters to match your OpenStack environment:
- auth_url
- nova_endpoint
- tenant_name
- username
- password
If you don't already have the packages installed, install tornado with pip
and python-ntplib with apt-get
, otherwise you may encounter errors running the tests below.
The first step to ensuring the plugin is working properly is to change into user dd-agent home directory, cd /opt/datadog-agent/agent
, and run the following command:
PYTHONPATH=. python checks.d/openstack-capacity-reporting.py
No output means no errors.
Next, restart the datadog-agent with the following command:
service datadog-agent restart
If everything is working properly, the agent should restart without any problems.
Finally, run the following command to ensure the plugin really is working properly:
/etc/init.d/datadog-agent info
There will be a Checks section that lists each custom plugin. The openstack-capacity-reporting plugin should be listed and should report [OK]. Otherwise, it will report something else that will allow you to begin troubleshooting.
At this point, you can tail the Datadog Agent logs, tail -f /var/log/datadog/*.log
, to see what metrics the plugin is uploading to Datadog.