blob: 2e3ded937ea0b4c5150f2e7a959d548683a87be1 [file] [log] [blame]
==================
Ceilometer Formula
==================
The ceilometer project aims to deliver a unique point of contact for billing
systems to acquire all of the measurements they need to establish customer
billing, across all current OpenStack components with work underway to
support future OpenStack components.
This formula provides different backends for Ceilometer data: MongoDB, InfluxDB. Also,
Graphite and direct (to Elasticsearch) publishers are available. If InfluxDB is used
as a backend, heka is configured to consume messages from RabbitMQ and write in to
InfluxDB, i.e. ceilometer collector service is not used in this configuration.
Sample Pillars
==============
Ceilometer API/controller node
------------------------------
.. code-block:: yaml
ceilometer:
server:
enabled: true
version: mitaka
cluster: true
secret: pwd
bind:
host: 127.0.0.1
port: 8777
concurrency:
lock_path: '/var/lib/ceilometer/tmp'
identity:
engine: keystone
host: 127.0.0.1
port: 35357
tenant: service
user: ceilometer
password: pwd
message_queue:
engine: rabbitmq
host: 127.0.0.1
port: 5672
user: openstack
password: pwd
virtual_host: '/openstack'
notification:
workers: 8
batch_timeout: 10
batch_size: 100
policy:
segregation: 'rule:context_is_admin'
'telemetry:get_resource':
Enable CORS parameters
------------------------------
.. code-block:: yaml
ceilometer:
server:
cors:
allowed_origin: https:localhost.local,http:localhost.local
expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
allow_methods: GET,PUT,POST,DELETE,PATCH
allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
allow_credentials: True
max_age: 86400
Configuration of policy.json file
---------------------------------
.. code-block:: yaml
ceilometer:
server:
....
policy:
segregation: 'rule:context_is_admin'
# Add key without value to remove line from policy.json
'telemetry:get_resource':
Databases configuration
-----------------------
MongoDB example:
~~~~~~~~~~~~~~~~
.. code-block:: yaml
ceilometer:
server:
database:
engine: mongodb
members:
- host: 10.0.106.10
port: 27017
- host: 10.0.106.20
port: 27017
- host: 10.0.106.30
port: 27017
name: ceilometer
user: ceilometer
password: password
InfluxDB/Elasticsearch example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: yaml
ceilometer:
server:
database:
influxdb:
host: 10.0.106.10
port: 8086
user: ceilometer
password: password
database: ceilometer
elasticsearch:
enabled: true
host: 10.0.106.10
port: 9200
Client-side RabbitMQ HA setup
-----------------------------
.. code-block:: yaml
ceilometer:
server:
....
message_queue:
engine: rabbitmq
members:
- host: 10.0.106.10
- host: 10.0.106.20
- host: 10.0.106.30
user: openstack
password: pwd
virtual_host: '/openstack'
....
Ceilometer Graphite publisher
-----------------------------
.. code-block:: yaml
ceilometer:
server:
enabled: true
publisher:
graphite:
enabled: true
host: 10.0.0.1
port: 2003
Since Pike release in order to install package for publisher, publisher definition should
have pkg field explicitly set to needed package:
.. code-block:: yaml
ceilometer:
server:
enabled: true
publisher:
example_publisher:
enabled: true
url: publisher_url://
pkg: publisher-pkg-name
Ceilometer compute agent
------------------------
.. code-block:: yaml
ceilometer:
agent:
enabled: true
version: mitaka
secret: pwd
concurrency:
lock_path: '/var/lib/ceilometer/tmp'
identity:
engine: keystone
host: 127.0.0.1
port: 35357
tenant: service
user: ceilometer
password: pwd
libvirt:
ssl:
enabled: true
libvirt_uri: qemu+tls://
message_queue:
engine: rabbitmq
host: 127.0.0.1
port: 5672
user: openstack
password: pwd
virtual_host: '/openstack'
rabbit_ha_queues: true
Ceilometer compute agent vmware:
--------------------------------
.. code-block:: yaml
ceilometer:
agent:
enabled: true
vmware:
enabled: true
host_ip: 1.2.3.4
host_username: vmware_username
host_password: vmware_password
Ceilometer instance discovery method
------------------------------------
.. code-block:: yaml
ceilometer:
agent:
...
discovery_method: naive
Keystone auth caching
---------------------
.. code-block:: yaml
ceilometer:
server:
cache:
members:
- host: 10.10.10.10
port: 11211
- host: 10.10.10.11
port: 11211
- host: 10.10.10.12
port: 11211
agent:
cache:
members:
- host: 10.10.10.10
port: 11211
- host: 10.10.10.11
port: 11211
- host: 10.10.10.12
port: 11211
Enhanced logging with logging.conf
----------------------------------
By default logging.conf is disabled.
That is possible to enable per-binary logging.conf with new variables:
* openstack_log_appender - set it to true to enable log_config_append for all OpenStack services;
* openstack_fluentd_handler_enabled - set to true to enable FluentHandler for all Openstack services.
* openstack_ossyslog_handler_enabled - set to true to enable OSSysLogHandler for all Openstack services.
Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available.
Also it is possible to configure this with pillar:
.. code-block:: yaml
ceilometer:
server:
logging:
log_appender: true
log_handlers:
watchedfile:
enabled: true
fluentd:
enabled: true
ossyslog:
enabled: true
agent:
logging:
log_appender: true
log_handlers:
watchedfile:
enabled: true
fluentd:
enabled: true
ossyslog:
enabled: true
The log level might be configured per logger by using the
following pillar structure:
.. code-block:: yaml
ceilometer:
server:
logging:
loggers:
<logger_name>:
level: WARNING
ceilometer:
agent:
logging:
loggers:
<logger_name>:
level: WARNING
Enable OpenDaylight statistics driver
---------------------
.. code-block:: yaml
ceilometer:
server:
opendaylight: true
.....
agent:
polling:
sources:
odl_source:
meters:
- switch
- switch.ports
- switch.port.receive.bytes
.....
interval: 300
resources:
- opendaylight.v2://<odl-controller-ip>:8080/controller/statistics?auth=basic&user=admin&password=unsegreto
sinks:
- meter_sink
Enable x509 and ssl communication between Ceilometer and Rabbitmq cluster.
---------------------
By default communication between Ceilometer and Rabbitmq is unsecure.
ceilometer:
server:
message_queue:
x509:
enabled: True
ceilometer:
agent:
message_queue:
x509:
enabled: True
You able to set custom certificates in pillar:
ceilometer:
server:
message_queue:
x509:
ca_file: (ca certificate path)
cert_file: (certificate path)
key_file: (key path)
ceilometer:
agent:
message_queue:
x509:
ca_file: (ca certificate path)
cert_file: (certificate path)
key_file: (key path)
Setup redis coordination_backend url:
---------------------------
.. code-block:: yaml
ceilometer:
server:
coordination_backend:
engine: redis
redis:
password: pswd
user: openstack
db: '0'
sentinel:
host: 127.0.0.1
master_name: master_1
fallback:
- host: 127.0.1.1
- host: 127.0.2.1
Change default options using configmap template settings
========================================================
.. code-block:: yaml
ceilometer:
server:
configmap:
DEFAULT:
rate_limit_interval: 0
rate_limit_burst: 0
rate_limit_except_level: CRITICAL
coordination:
max_retry_interval: 30
agent:
configmap:
DEFAULT:
rate_limit_interval: 0
rate_limit_burst: 0
rate_limit_except_level: CRITICAL
coordination:
max_retry_interval: 30
Configure additional event sources and sinks
============================================
Starting from 2019.2.10 cloud operator is able to configure custom
event sources and sinks in pipeline.yaml and events_pipeline.yaml.
The values could be configured via following pillars:
.. code-block:: yaml
#pipeline.yaml
ceilometer:server:extra_meter_sources_list
ceilometer:server:extra_meter_sinks_list
#events_pipeline.yaml
ceilometer:server:extra_event_sources_list
ceilometer:server:extra_event_sinks_list
The values will be passed to corresponding files as plain yaml data
WITHOUT any validation. Cloud operator should ensure that the data is valid.
The data passes to configuration files AS IS.
.. code-block:: yaml
ceilometer:
server:
extra_meter_sources_list:
- name: cpu_source2
meters:
- "cpu"
sinks:
- cpu_sink2
extra_meter_sinks_list:
- name: cpu_sink2
publishers:
- rmq://ip:port
transformers:
- name: "rate_of_change"
parameters:
target:
name: "cpu_util"
unit: "%"
- name: cpu_sink3
More Information
================
* https://wiki.openstack.org/wiki/Ceilometer
* http://docs.openstack.org/developer/ceilometer/install/manual.html
* http://docs.openstack.org/developer/ceilometer/
* https://fedoraproject.org/wiki/QA:Testcase_OpenStack_ceilometer_install
* https://github.com/spilgames/ceilometer_graphite_publisher
* http://engineering.spilgames.com/using-ceilometer-graphite/