[Openstack] Ceilometer-collector does not receive anything

Afef MDHAFFAR afef.mdhaffar at gmail.com
Mon Nov 4 11:41:31 UTC 2013


Hi all,

thanks a lot for your answers.
We know that ceilometer is not able to receive notifications from openstack
components (like nova), when installed with XCP. But both our goal and
testing approach are different. The strange behaviour we are talking about
concerns ceilometer-collector and it's usage of kombu for AMQP. We added
debugging output in
ceilometer.openstack.common.rpc.impl_kombu.ConsumerBase.consume._callback
to see whether or not some of the 58 topic consumers would receive anything
on their exchange and topic. For that purpose we wrote a small test
programm to publish a simple message on a configured exchange and topic to
see a reaction from ceilometer-collector, but we received nothing. The
rabbitmq server itself is working fine, as we can consume our sent message
with another small test programm. We think this might be a configuration
issue, but we've been through our setup several times and can't find the
issue.

here are the source codes of the our test programs (publisher and consumer).

---publisher----
import pika
import logging


AMQP_HOST="ip"
AMQP_USERNAME="username"
AMQP_PASSWORD="passwd"

AMQP_EXCHANGE="openstack"
AMQP_ROUTING="notifications"


class AMQPSender(object):
    """docstring for AMQPSender"""
    def __init__(self):
        super(AMQPSender, self).__init__()
        self.connection = pika.BlockingConnection(pika.ConnectionParameters(
                                                  host=AMQP_HOST,
credentials=pika.PlainCredentials(

            username=AMQP_USERNAME,

            password=AMQP_PASSWORD)))
        self.channel = self.connection.channel()
        self.channel.exchange_declare(exchange=AMQP_EXCHANGE, type='topic')

    def send(self, msg):
        self.channel.basic_publish(exchange=AMQP_EXCHANGE,
                                   routing_key=AMQP_ROUTING,
                                   body=msg)

    def close(self):
        self.connection.close()

logging.basicConfig()
a = AMQPSender()

a.send("Hallo Welt")

a.close()

---------consumer-------------------
import pika
import logging


AMQP_HOST="ip"
AMQP_USERNAME="username"
AMQP_PASSWORD="passwd"

AMQP_EXCHANGE="nova"
AMQP_ROUTING="notifications.info"


class AMQPSender(object):
    """docstring for AMQPSender"""
    def __init__(self):
        super(AMQPSender, self).__init__()
        self.connection = pika.BlockingConnection(pika.ConnectionParameters(
                                                  host=AMQP_HOST,
credentials=pika.PlainCredentials(

            username=AMQP_USERNAME,

            password=AMQP_PASSWORD)))
        self.channel = self.connection.channel()
        self.channel.exchange_declare(exchange=AMQP_EXCHANGE, type='topic')
        result = self.channel.queue_declare(exclusive=True)
        self.queue_name = result.method.queue
        self.channel.queue_bind(exchange=AMQP_EXCHANGE,
                           queue=self.queue_name,
                           routing_key=AMQP_ROUTING)



    def recv(self):
        def callback(ch, method, properties, body):
            print " [x] %r:%r" % (method.routing_key, body,)
        self.channel.basic_consume(callback,
                                   queue=self.queue_name,
                                   no_ack=True)
        self.channel.start_consuming()

    def close(self):
        self.connection.close()

logging.basicConfig()
a = AMQPSender()

a.recv()

a.close()
----------------

Thank you

Best regards,
Afef



2013/11/2 Bob Ball <bob.ball at citrix.com>

>  Hi,
>
> Ceilometer is currently KVM specific.
>
> I hope this will get fixed during the icehouse cycle, however ceilometer and XenServer/XCP do not work together quite yet.
>
> Bob
>
> Martinx - ジェームズ <thiagocmartinsc at gmail.com> wrote:
>
>
>  Hi!
>
>  I followed this document:
> http://docs.openstack.org/havana/install-guide/install/apt/content/ch_ceilometer.html
>
>  My Ceilometer does not receives any data... Still "0 bytes" showing at
> the Admin Panel (/admin/metering)...
>
>  I installed Ceilometer endpoint / mongodb / packages in a dedicated
> Virtual Machine, not at the crowd controller, keystone users / info created
> okay but, it doesn't seems to be working as expected.
>
>  Also, I noted that nothing is changed at the "nova.conf" of the
> controller itself, only nova.conf from compute node gets updated for
> Ceilometer AND, the Network Node also haven't changed.
>
>  Let us know if it is working for you...
>
>  Best,
> Thiago
>
>
> On 1 November 2013 13:01, Afef MDHAFFAR <afef.mdhaffar at gmail.com> wrote:
>
>>  Hi all,
>>
>>  We have launched devstack to install openstack, while including
>> ceilometer.
>> We use XCP as hypervisor, Ubuntu 12.04. The used openstack version is
>> 2014.1.
>>
>>  When running ceilometer-collector, consumers get registered on every
>> topic and exchange, but never actually consume anything. We tested this
>> with different amqp libraries, while sending messages to those topics and
>> exchanges. Not even
>> ceilometer.openstack.common.rpc.impl_kombu.BasicConsumer._callback gets
>> called.
>>
>>  As we are interested in notifications from our own source, has anyone
>> experienced this behaviour or a working system with notifications?
>>
>>  Thank you
>>
>>  Best regards,
>> Afef
>>
>>  Here are our configuration files:
>>
>>  ---------------
>> ceilometer-collector.conf:
>>  [DEFAULT]
>> verbose=True
>> auth_strategy=keystone
>> allow_resize_to_same_host=True
>> api_paste_config=/etc/nova/api-paste.ini
>> rootwrap_config=/etc/nova/rootwrap.conf
>> compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
>> dhcpbridge_flagfile=/etc/nova/nova.conf
>> force_dhcp_release=True
>> fixed_range=10.0.0.0/24
>> s3_host=ip
>> s3_port=3333
>>
>> osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions
>> my_ip=ip
>> sql_connection=mysql://user:passwd@localhost/nova?charset=utf8
>> libvirt_type=qemu
>> libvirt_cpu_mode=none
>> instance_name_template=instance-%08x
>> enabled_apis=ec2,osapi_compute,metadata
>> volume_api_class=nova.volume.cinder.API
>> state_path=/opt/stack/data/nova
>> lock_path=/opt/stack/data/nova
>> instances_path=/opt/stack/data/nova/instances
>> multi_host=True
>> send_arp_for_ha=True
>> logging_debug_format_suffix=^[[00;33mfrom (pid=%(process)d) %(funcName)s
>> %(pathname)s:%(lineno)d^[[00m
>> logging_exception_prefix=%(color)s%(asctime)s TRACE %(name)s
>> ^[[01;35m%(instance)s^[[00m
>> instance_usage_audit=True
>> instance_usage_audit_period=hour
>> notification_driver=nova.openstack.common.notifier.rpc_notifier
>> notification_driver=ceilometer.compute.nova_notifier
>> notify_on_state_change=vm_and_task_state
>> notify_api_faults=true
>> network_manager=nova.network.manager.FlatDHCPManager
>> public_interface=eth3
>> vlan_interface=eth1
>> flat_network_bridge=xapi0
>> flat_interface=eth1
>> novncproxy_base_url=http://ip:6080/vnc_auto.html
>> xvpvncproxy_base_url=http://ip:6081/console
>> vncserver_listen=127.0.0.1
>> vncserver_proxyclient_address=169.254.0.1
>> ec2_dmz_host=ip
>> rabbit_host=localhost
>> rabbit_password=passwd
>> glance_api_servers=ip:9292
>> compute_driver=xenapi.XenAPIDriver
>> xenapi_connection_url=http://ip1
>> xenapi_connection_username=user
>> xenapi_connection_password=passwd
>> flat_injected=False
>> firewall_driver=nova.virt.firewall.IptablesFirewallDriver
>> sr_matching_filter=default-sr:true
>>
>>  -------------------
>> ceilometer.conf
>>  [DEFAULT]
>> policy_file = /etc/ceilometer/policy.json
>>
>>  mysql_engine=InnoDB
>> sqlite_db=ceilometer.sqlite
>> #connection=sqlite:////ceilometer/openstack/common/db/$sqlite_db
>>
>>  backend=sqlalchemy
>>
>>
>> connection=sqlite:////opt/stack/ceilometer/ceilometer/openstack/common/db/ceilometer.sqlite
>>
>>  http_control_exchanges=nova
>> http_control_exchanges=glance
>> #http_control_exchanges=neutron
>> #http_control_exchanges=cinder
>>
>>  pipeline_cfg_file=pipeline.yaml
>>
>>  sample_source=openstack
>>
>>  nova_control_exchange=nova
>> glance_control_exchange=glance
>>
>>  verbose=true
>>
>>  publish_errors=true
>>
>>  notification_driver=ceilometer.openstack.common.notifier.rpc_notifier2
>> default_notification_level=INFO
>>
>>  policy_file=policy.json
>> policy_default_rule=default
>>
>>  rabbit_password = passwd
>> rabbit_host = localhost
>> verbose = True
>> notification_topics = notifications,glance_notifications
>> rpc_backend = ceilometer.openstack.common.rpc.impl_kombu
>> auth_strategy=keystone
>> control_exchange=openstack
>>
>>  [publisher_rpc]
>> metering_topic=metering
>>
>>  [keystone_authtoken]
>> admin_tenant_name = demo
>> admin_password = passwd
>> admin_user = admin
>> auth_protocol = http
>>
>>  rabbit_ha_queues=false
>>
>>  [service_credentials]
>> # Username to use for openstack service access (string value)
>> os_username=admin
>>
>>  # Password to use for openstack service access (string value)
>> os_password=passwd
>>
>>  # Tenant ID to use for openstack service access (string value)
>> os_tenant_id=
>>
>>  # Tenant name to use for openstack service access (string
>> # value)
>> os_tenant_name=demo
>>
>>  # Certificate chain for SSL validation (string value)
>> #os_cacert=<None>
>>
>>  # Auth URL to use for openstack service access (string value)
>> os_auth_url=http://ip:5000/v2.0
>>
>>  # Region name to use for openstack service endpoints (string
>> # value)
>> os_region_name=RegionOne
>>
>>  [collector]
>> store_events=true
>> dispatcher=database
>>
>>  [rpc_notifier2]
>> topics=notifications
>>
>>
>> _______________________________________________
>> Mailing list:
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>> Post to     : openstack at lists.openstack.org
>> Unsubscribe :
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20131104/bdbb3705/attachment.html>


More information about the Openstack mailing list