Adding the Agent: Compute
Installing the Compute Agent for Metering
The Metering service consists of an API service, collector and a range
of disparate agents. This procedure details the installation of the agent
that runs on compute nodes.
Install the Metering 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
/etc/nova/nova.conf.
# openstack-config --set /etc/nova/nova.conf DEFAULT instance_usage_audit True
# openstack-config --set /etc/nova/nova.conf DEFAULT instance_usage_audit Hhour
# 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_driver
Edit /etc/nova/nova.conf and add 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
You need to set the secret key defined earlier that is used as a
shared secret between the Metering service nodes.
# openstack-config --set /etc/keystone/keystone.conf publisher_rpc metering_secret $ADMIN_TOKEN
Edit /etc/ceilometer/ceilometer.conf and
change the [DEFAULT] section, replacing ADMIN_TOKEN with the one created earlier.
...
[publisher_rpc]
# Secret value for signing metering messages (string value)
metering_secret = ADMIN_TOKEN
...
Next, restart the service with its new settings.
# service ceilometer-agent-compute restart
Start the ceilometer-agent-compute service and configure
to start when the system boots.
# service openstack-ceilometer-agent-compute start
# chkconfig openstack-ceilometer-agent-compute on
Start the openstack-ceilometer-compute service and configure
to start when the system boots.
# service openstack-ceilometer-compute start
# chkconfig openstack-ceilometer-compute on