The ceilometer.publisher.http Module

The ceilometer.publisher.http Module

class ceilometer.publisher.http.HttpPublisher(conf, parsed_url)[source]

Bases: ceilometer.publisher.ConfigPublisherBase

Publish metering data to a http endpoint

This publisher pushes metering data to a specified http endpoint. The endpoint should be configured in ceilometer pipeline configuration file. If the timeout and/or max_retries are not specified, the default timeout and max_retries will be set to 5 and 2 respectively. Additional parameters are:

  • ssl certificate verification can be disabled by setting verify_ssl to False
  • batching can be configured by batch
  • Basic authentication can be configured using the URL authentication scheme: http://username:password@example.com
  • For certificate authentication, clientcert and clientkey are the paths to the certificate and key files respectively. clientkey is only required if the clientcert file doesn’t already contain the key.

All of the parameters mentioned above get removed during processing, with the remaining portion of the URL being used as the actual endpoint. e.g. https://username:password@example.com/path?verify_ssl=False&q=foo will result in a call to https://example.com/path?q=foo

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

- name: meter_file
  meters:
      - "*"
  publishers:
      - http://host:80/path?timeout=1&max_retries=2&batch=False

In the event_pipeline.yaml file, you can use the publisher in one of the sinks like the following:

publish_events(events)[source]

Send an event message for publishing

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

Send a metering message for publishing

Parameters:samples – Samples from pipeline after transformation
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.