Skip to content

Commit 11191a4

Browse files
Hanxi Liuchungg
andcommitted
Deprecate collector
To optimise performance, We have to update ceilometer architecture. The most important step is to deprecate collector. From now on, we can configure multiple publishers in pipeline for pushing data to internal or external system. Highlight using multiple dispatchers. Change pipeline publisher and disable ceilometer-collector by default. Co-Authored-By: gordon chung <gord@live.ca> Change-Id: I25a6e0b9221844adb4412f1829d9e290b6e198a3
1 parent 6b7a360 commit 11191a4

9 files changed

Lines changed: 38 additions & 9 deletions

File tree

ceilometer/collector.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ def __init__(self, worker_id, conf):
7070
self.event_listener = None
7171
self.udp_thread = None
7272

73+
import debtcollector
74+
debtcollector.deprecate("Ceilometer collector service is deprecated."
75+
"Use publishers to push data instead",
76+
version="9.0", removal_version="10.0")
77+
7378
def run(self):
7479
if self.conf.collector.udp_address:
7580
self.udp_thread = utils.spawn_thread(self.start_udp)

devstack/plugin.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,16 @@ function _ceilometer_configure_storage_backend {
267267
die $LINENO "Unable to configure unknown CEILOMETER_BACKEND $CEILOMETER_BACKEND"
268268
fi
269269

270+
if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] || [ "$CEILOMETER_BACKEND" = 'mongodb' ]; then
271+
sed -i 's/gnocchi:\/\//database:\/\//g' $CEILOMETER_CONF_DIR/event_pipeline.yaml $CEILOMETER_CONF_DIR/pipeline.yaml
272+
fi
273+
270274
# configure panko
271275
if is_service_enabled panko-api; then
272276
iniadd $CEILOMETER_CONF DEFAULT event_dispatchers panko
277+
if ! grep -q 'panko' $CEILOMETER_CONF_DIR/event_pipeline.yaml ; then
278+
echo ' - direct://?dispatcher=panko' >> $CEILOMETER_CONF_DIR/event_pipeline.yaml
279+
fi
273280
fi
274281

275282
_ceilometer_drop_database

devstack/settings

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
enable_service ceilometer-acompute ceilometer-acentral
44
# Notification Agent
55
enable_service ceilometer-anotification
6-
# Data Collector
7-
enable_service ceilometer-collector
86

97
# Default directories
108
CEILOMETER_DIR=$DEST/ceilometer

doc/source/configuration.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ data should be sent after the possible transformations. The names of the
188188
publishers should be the same as the related names of the plugins in
189189
:file:`setup.cfg`.
190190

191-
The default configuration can be found in `pipeline.yaml`_.
191+
The default configuration can be found in `pipeline.yaml`_. For more details about
192+
how to configure dispatchers under publisher in the :ref:`dispatcher-configuration`.
192193

193194
.. _pipeline.yaml: https://git.openstack.org/cgit/openstack/ceilometer/tree/etc/ceilometer/pipeline.yaml
194195

doc/source/install/custom.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ For polling agent using ceilometer-polling.conf, settings like::
6464

6565
Doing this, it's easy to listen/receive data from multiple internal and external services.
6666

67+
.. _dispatcher-configuration:
6768

6869
Using multiple dispatchers
6970
==========================

doc/source/install/manual.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
Installing Manually
2121
=====================
2222

23+
.. note::
24+
25+
Ceilometer collector service is deprecated. Configure dispatchers under publisher
26+
in pipeline to push data instead. For more details about how to configure
27+
dispatchers in the :ref:`dispatcher-configuration`.
2328

2429
Storage Backend Installation
2530
============================

etc/ceilometer/event_pipeline.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ sinks:
99
- name: event_sink
1010
transformers:
1111
publishers:
12-
- notifier://
12+
- gnocchi://

etc/ceilometer/pipeline.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ sinks:
3535
- name: meter_sink
3636
transformers:
3737
publishers:
38-
- notifier://
38+
- gnocchi://
3939
- name: cpu_sink
4040
transformers:
4141
- name: "rate_of_change"
@@ -46,7 +46,7 @@ sinks:
4646
type: "gauge"
4747
scale: "100.0 / (10**9 * (resource_metadata.cpu_number or 1))"
4848
publishers:
49-
- notifier://
49+
- gnocchi://
5050
- name: cpu_delta_sink
5151
transformers:
5252
- name: "delta"
@@ -55,7 +55,7 @@ sinks:
5555
name: "cpu.delta"
5656
growth_only: True
5757
publishers:
58-
- notifier://
58+
- gnocchi://
5959
- name: disk_sink
6060
transformers:
6161
- name: "rate_of_change"
@@ -70,7 +70,7 @@ sinks:
7070
unit: "\\1/s"
7171
type: "gauge"
7272
publishers:
73-
- notifier://
73+
- gnocchi://
7474
- name: network_sink
7575
transformers:
7676
- name: "rate_of_change"
@@ -85,4 +85,4 @@ sinks:
8585
unit: "\\1/s"
8686
type: "gauge"
8787
publishers:
88-
- notifier://
88+
- gnocchi://
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
features:
3+
- |
4+
Because of deprecating the collector, the default publishers in
5+
pipeline.yaml and event_pipeline.yaml are now changed using database
6+
instead of notifier.
7+
deprecations:
8+
- |
9+
Collector is no longer supported in this release. The collector
10+
introduces lags in pushing data to backend. To optimize the
11+
architecture, Ceilometer push data through dispatchers using
12+
publishers in notification agent directly.

0 commit comments

Comments
 (0)