Install the Compute agent for the Telemetry service
OpenStack Telemetry is an API service that provides a
collector and a range of disparate agents. This procedure
details how to install the agent that runs on the compute
node.
Install the Telemetry service on the Compute node:
# apt-get install ceilometer-agent-compute
# yum install openstack-ceilometer-compute
# zypper install openstack-ceilometer-agent-compute
Set the following
options in the /etc/nova/nova.conf
file:
# openstack-config --set /etc/nova/nova.conf DEFAULT \
instance_usage_audit True
# openstack-config --set /etc/nova/nova.conf DEFAULT \
instance_usage_audit_period hour
# openstack-config --set /etc/nova/nova.conf DEFAULT \
notify_on_state_change vm_and_task_state
# openstack-config --set /etc/nova/nova.conf DEFAULT \
notification_driver nova.openstack.common.notifier.rpc_notifier
# openstack-config --set /etc/nova/nova.conf DEFAULT \
notification_driver ceilometer.compute.nova_notifier
Edit the
/etc/nova/nova.conf file and add the
following lines to the [DEFAULT]
section:
...
[DEFAULT]
...
instance_usage_audit=True
instance_usage_audit_period=hour
notify_on_state_change=vm_and_task_state
notification_driver=nova.openstack.common.notifier.rpc_notifier
notification_driver=ceilometer.compute.nova_notifier
Restart the Compute service:
# service openstack-nova-compute restart
# service nova-compute restart
You must set the secret key that you defined previously.
The Telemetry service nodes share this key as a shared
secret:
# openstack-config --set /etc/ceilometer/ceilometer.conf publisher_rpc metering_secret $CEILOMETER_TOKEN
Edit the
/etc/ceilometer/ceilometer.conf file
and change these lines in the [DEFAULT]
section. Replace CEILOMETER_TOKEN with
the ceilometer token that you created previously:
...
[publisher_rpc]
# Secret value for signing metering messages (string value)
metering_secret = CEILOMETER_TOKEN
...
Restart the service with its new settings:
# service ceilometer-agent-compute restart
Start the service and configure it to start when the
system boots:
# service openstack-ceilometer-agent-compute start
# chkconfig openstack-ceilometer-agent-compute on
# service openstack-ceilometer-compute start
# chkconfig openstack-ceilometer-compute on