Ask Your Question
1

Openstack Ceilometer Agent

asked 2014-08-12 15:49:32 -0500

Sankar gravatar image

updated 2014-08-15 12:52:45 -0500

rbowen gravatar image

I am trying to set up OpenStack Ceilometer agent .... I have the ceilometer collector running ... But, when I try to run Ceilometer agent, I get the below error:

ceilometer-agent-compute
2014-08-12 20:09:04.396 17481 ERROR ceilometer.nova_client [-] [Errno 111] ECONNREFUSED
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client Traceback (most recent call last):
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client   File "/usr/lib/python2.6/site-packages/ceilometer/nova_client.py", line 40, in with_logging
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client     return func(*args, **kwargs)
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client   File "/usr/lib/python2.6/site-packages/ceilometer/nova_client.py", line 132, in instance_get_all_by_host
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client     search_opts=search_opts))
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client   File "/usr/lib/python2.6/site-packages/novaclient/v1_1/servers.py", line 594, in list
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client     return self._list("/servers%s%s" % (detail, query_string), "servers")
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client   File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 67, in _list
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client     _resp, body = self.api.client.get(url)
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client   File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 482, in get
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client     return self._cs_request(url, 'GET', **kwargs)
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client   File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 448, in _cs_request
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client     self.authenticate()
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client   File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 581, in authenticate
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client     auth_url = self._v2_auth(auth_url)
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client   File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 672, in _v2_auth
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client     return self._authenticate(url, body)
2014-08-12 20:09:04.396 17481 TRACE ceilometer.nova_client   File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 685, in _authenticate

Is running ceilometer API and central agent mandatory ? Can someone share a sample agent config ?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2014-08-18 10:18:03 -0500

nealph gravatar image

Ceilometer API and central agent - are they mandatory ? Can compute agent directly talk to Collector ?

For clarity, let's break this into two questions:

Are the API and central agent mandatory?

Assuming you want to rely on notifications only and don't care to poll the various service api's for data (see http://docs.openstack.org/developer/ceilometer/architecture.html#how-is-data-collected (link here) to understand the difference) it's perfectly fine to leave out ceilometer-agent-central. By not installing the API, however, you will lose the ability to:

  • see resource usage in the Horizon dashboard (Horizon relies on the Ceilometer API)
  • query the data store for meter statistics
  • create/delete alarms

The alternative to leaving ceilometer-agent-central shut off is to configure it to poll some number of service endpoints (or none) in the /etc/ceilometer/pipeline.yaml file.

Can compute agent directly talk to collector?

No. The collector listens only to the "internal" Ceilometer bus. Without the notification agent to push information to the Ceilometer bus there will be no information for the collector to pass on to the database, or whatever the configured target is.

But note that your error is actually from ceilometer-agent-compute. This agent plays a special role in the collection of data: it sits on the compute node and queries Nova for data that is otherwise not available to Ceilometer, then pushes it to the aforementioned Ceilometer bus. In this case, you might re-state your first question to "Is the ceilometer-compute-agent mandatory?" The answer again depends on what data you are trying to collect. Take a look at the http://docs.openstack.org/developer/ceilometer/measurements.html#compute-nova (list of Ceilometer measurements) and note the "origin" column: the ceilometer-agent-compute produces all Nova measurements where the origin is "p". If one of those measurements is needed, then you'll have to run the compute agent.

If you want to understand more about the flow of notifications you can review the http://docs.openstack.org/developer/ceilometer/architecture.html#handling-notifications (brief description) provided in the Ceilometer developer documentation.

edit flag offensive delete link more
1

answered 2014-08-15 15:55:09 -0500

T u l gravatar image

In a setup we use, we have both ceilometer API and central agent running on the controller.

Here is an example of my ceilometer.conf on compute hosts (if it may help)

[DEFAULT]
glance_control_exchange=glance
log_dir=/var/log/ceilometer
use_syslog=False
notification_topics=notifications,glance_notifications
rpc_backend=ceilometer.openstack.common.rpc.impl_kombu
rabbit_host=172.29.0.1
rabbit_port=5672
rabbit_hosts=172.29.0.1:5672
rabbit_userid=guest
rabbit_password=yourrabbitpassword
rabbit_virtual_host=/
rabbit_ha_queues=False
metering_secret=f18somesecretab1
[alarm]
[api]
[collector]
[database]
[dispatcher_file]
[event]
[keystone_authtoken]
[matchmaker_redis]
[matchmaker_ring]
[notification]
[publisher]
[publisher_rpc]
[rpc_notifier2]
[service_credentials]
os_auth_url=http://10.41.0.82:35357/v2.0
metering_secret=f18somesecretab1
os_tenant_name=services
os_username=ceilometer
os_password=92898ospassword821
os_auth_region=RegionOne
[ssl]
[vmware]
edit flag offensive delete link more

Comments

Thanks so much.

ceilometer API and central agent - are they mandatory ? Can compute agent directly talk to Collector ?

Sankar gravatar imageSankar ( 2014-08-15 16:04:29 -0500 )edit

Frankly, I don't know. But if you want to specify what data to collect, would you configure each agent? I think you can specify it in a central manner using ceilometer API. I also found:"The Central agent polls for resource utilization statistics for resources not tied to instances or compute nodes"

T u l gravatar imageT u l ( 2014-08-16 02:46:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2014-08-12 15:49:32 -0500

Seen: 572 times

Last updated: Aug 15 '14