Use the amqp_ prefix for AMQP variables
Currently we use the rabbit_ prefix for ceilometer_collector and the amqp_
prefix for the remote_collector. This commit changes rabbit_ to amqp_ to
use the same variable names everywhere.
diff --git a/README.rst b/README.rst
index 6d463cb..2aaef14 100644
--- a/README.rst
+++ b/README.rst
@@ -155,10 +155,11 @@
influxdb_time_precision: ms
influxdb_username: lma
resource_decoding: false
- rabbit_host: 172.16.10.253
- rabbit_port: 5672
- rabbit_queue: metering.sample
- rabbit_vhost: /openstack
+ amqp_exchange: ceilometer
+ amqp_host: 172.16.10.253
+ amqp_port: 5672
+ amqp_queue: metering.sample
+ amqp_vhost: /openstack
Default values:
@@ -169,9 +170,10 @@
* ``influxdb_time_precision: ms``
* ``influxdb_timeout: 5000``
* ``poolsize: 100``
-* ``rabbit_port: 5672``
-* ``rabbit_vhost: /openstack``
-* ``rabbit_queue: metering.sample``
+* ``amqp_exchange: ceilometer``
+* ``amqp_port: 5672``
+* ``amqp_queue: metering.sample``
+* ``amqp_vhost: /openstack``
* ``resource_decoding: false``
Read more
diff --git a/heka/map.jinja b/heka/map.jinja
index 2e47090..1677ffc 100644
--- a/heka/map.jinja
+++ b/heka/map.jinja
@@ -39,11 +39,6 @@
{% set default_nagios_host_alarm_clusters = '00-clusters' %}
{% set default_automatic_starting = True %}
{% set default_amqp_port = 5672 %}
-{% set default_amqp_vhost = '' %}
-
-{% set default_rabbit_port = 5672 %}
-{% set default_rabbit_vhost = '/openstack' %}
-{% set default_ceilometer_rabbit_queue = 'metering.sample' %}
{% set log_collector = salt['grains.filter_by']({
'default': {
@@ -70,7 +65,7 @@
{% set remote_collector = salt['grains.filter_by']({
'default': {
'amqp_port': default_amqp_port,
- 'amqp_vhost': default_amqp_vhost,
+ 'amqp_vhost': '',
'elasticsearch_port': default_elasticsearch_port,
'influxdb_port': default_influxdb_port,
'influxdb_time_precision': default_influxdb_time_precision,
@@ -99,9 +94,9 @@
'influxdb_timeout': default_influxdb_timeout,
'influxdb_time_precision': default_influxdb_time_precision,
'elasticsearch_port': default_elasticsearch_port,
- 'rabbit_port': default_rabbit_port,
- 'rabbit_vhost': default_rabbit_vhost,
- 'rabbit_queue': default_ceilometer_rabbit_queue,
+ 'amqp_port': default_amqp_port,
+ 'amqp_vhost': '/openstack',
+ 'amqp_queue': 'metering.sample',
'resource_decoding': False,
'poolsize': 100,
'automatic_starting': default_automatic_starting,
diff --git a/heka/meta/heka.yml b/heka/meta/heka.yml
index d6d73bd..6892b50 100644
--- a/heka/meta/heka.yml
+++ b/heka/meta/heka.yml
@@ -476,6 +476,7 @@
{%- endif %}
ceilometer_collector:
decoder:
+{%- if ceilometer_collector.amqp_host is defined %}
sample:
engine: sandbox
module_file: /usr/share/lma_collector/decoders/metering.lua
@@ -484,21 +485,22 @@
decoder: 'ceilometer'
decode_resources: {{ ceilometer_collector.resource_decoding|lower }}
metadata_fields: "status deleted container_format min_ram updated_at min_disk is_public size checksum created_at disk_format protected instance_host host display_name instance_id instance_type status state user_metadata.stack"
+{%- endif %}
input:
-{%- if ceilometer_collector.rabbit_host is defined %}
+{%- if ceilometer_collector.amqp_host is defined %}
openstack_sample_amqp:
engine: amqp
- user: {{ ceilometer_collector.rabbit_user }}
- password: {{ ceilometer_collector.rabbit_password }}
- port: {{ ceilometer_collector.rabbit_port }}
- host: {{ ceilometer_collector.rabbit_host }}
- vhost: {{ ceilometer_collector.rabbit_vhost }}
- queue: {{ ceilometer_collector.rabbit_queue }}
- routing_key: {{ ceilometer_collector.rabbit_queue }}
+ user: {{ ceilometer_collector.amqp_user }}
+ password: {{ ceilometer_collector.amqp_password }}
+ port: {{ ceilometer_collector.amqp_port }}
+ host: {{ ceilometer_collector.amqp_host }}
+ vhost: {{ ceilometer_collector.amqp_vhost }}
+ queue: {{ ceilometer_collector.amqp_queue }}
+ routing_key: {{ ceilometer_collector.amqp_queue }}
decoder: sample_decoder
splitter: NullSplitter
- exchange: "ceilometer"
- exchange_type: "topic"
+ exchange: {{ ceilometer_collector.get('amqp_exchange', 'ceilometer') }}
+ exchange_type: topic
exchange_auto_delete: false
queue_auto_delete: false
{%- endif %}