The ceilometer.publisher.file
ModuleΒΆ
-
class
ceilometer.publisher.file.
FilePublisher
(parsed_url)[source] Bases:
ceilometer.publisher.PublisherBase
Publisher metering data to file.
The publisher which records metering data into a file. The file name and location should be configured in ceilometer pipeline configuration file. If a file name and location is not specified, this File Publisher will not log any meters other than log a warning in Ceilometer log file.
To enable this publisher, add the following section to the /etc/ceilometer/publisher.yaml file or simply add it to an existing pipeline:
- name: meter_file interval: 600 counters: - "*" transformers: publishers: - file:///var/test?max_bytes=10000000&backup_count=5
File path is required for this publisher to work properly. If max_bytes or backup_count is missing, FileHandler will be used to save the metering data. If max_bytes and backup_count are present, RotatingFileHandler will be used to save the metering data.
-
publish_events
(context, events)[source] Send an event message for publishing
Parameters: - context – Execution context from the service or RPC call
- events – events from pipeline after transformation
-
publish_samples
(context, samples)[source] Send a metering message for publishing
Parameters: - context – Execution context from the service or RPC call
- samples – Samples from pipeline after transformation
-