The ceilometer.publisher.kafka_broker Module

class ceilometer.publisher.kafka_broker.KafkaBrokerPublisher(parsed_url)[source]

Bases: ceilometer.publisher.messaging.MessagingPublisher

Publish metering data to kafka broker.

The ip address and port number of kafka broker should be configured in ceilometer pipeline configuration file. If an ip address is not specified, this kafka publisher will not publish any meters.

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

    - name: meter_kafka
    interval: 600
        - "*"
        - kafka_sink
    - name: kafka_sink
        - kafka://[kafka_broker_ip]:[kafka_broker_port]?topic=[topic]

Kafka topic name and broker’s port are required for this publisher to work properly. If topic parameter is missing, this kafka publisher publish metering data under a topic name, ‘ceilometer’. If the port number is not specified, this Kafka Publisher will use 9092 as the broker’s port. 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, default the number of retry is 100.

Previous topic

The ceilometer.publisher.http Module

Next topic

The ceilometer.publisher.messaging Module

Project Source

This Page