The ceilometer.publisher.messaging Module

The ceilometer.publisher.messaging Module

Publish a sample using the preferred RPC mechanism.

exception ceilometer.publisher.messaging.DeliveryFailure(message=None, cause=None)[source]

Bases: exceptions.Exception

class ceilometer.publisher.messaging.EventNotifierPublisher(conf, parsed_url)[source]

Bases: ceilometer.publisher.messaging.NotifierPublisher

class ceilometer.publisher.messaging.MessagingPublisher(conf, parsed_url)[source]

Bases: ceilometer.publisher.ConfigPublisherBase

flush()[source]
publish_events(events)[source]

Send an event message for publishing

Parameters:events – events from pipeline after transformation
publish_samples(samples)[source]

Publish samples on RPC.

Parameters:samples – Samples from pipeline after transformation.
class ceilometer.publisher.messaging.NotifierPublisher(conf, parsed_url, default_topic)[source]

Bases: ceilometer.publisher.messaging.MessagingPublisher

Publish metering data from notifier publisher.

The ip address and port number of notifier can be configured in ceilometer pipeline configuration file.

User can customize the transport driver such as rabbit, kafka and so on. The Notifier uses sample method as default method to send notifications.

This publisher has transmit options such as queue, drop, and retry. These options are specified using policy field of URL parameter. When queue option could be selected, local queue length can be determined using max_queue_length field as well. When the transfer fails with retry option, try to resend the data as many times as specified in max_retry field. If max_retry is not specified, by default the number of retry is 100.

To enable this publisher, add the following section to the /etc/ceilometer/pipeline.yaml file or simply add it to an existing pipeline:

meter:
    - name: meter_notifier
      meters:
        - "*"
      sinks:
        - notifier_sink
sinks:
    - name: notifier_sink
      transformers:
      publishers:
        - notifier://[notifier_ip]:[notifier_port]?topic=[topic]&
          driver=driver&max_retry=100
class ceilometer.publisher.messaging.SampleNotifierPublisher(conf, parsed_url)[source]

Bases: ceilometer.publisher.messaging.NotifierPublisher

ceilometer.publisher.messaging.raise_delivery_failure(exc)[source]
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.