Resource/Event connection if enabled only
Change-Id: I28eca30d525023d550fc85adc1c685ff27d158bc
This commit is contained in:
parent
882f9915b2
commit
9ab4e515fa
|
@ -3,6 +3,10 @@ notice('MODULAR: fuel-plugin-telemetry: configure.pp')
|
|||
# Let's use already defined params for ceilometer
|
||||
include ::ceilometer::params
|
||||
|
||||
$plugin_data = hiera_hash('telemetry', undef)
|
||||
$resource_api = $plugin_data['resource_api']
|
||||
$event_api = $plugin_data['event_api']
|
||||
|
||||
# TODO_0 'set' default values when looking for via hiera
|
||||
# TODO_1 add if statments in case of 'advanced settings' passed through Fuel UI
|
||||
# TODO_2 checks if we can reach ES, influxdb before actioning?
|
||||
|
@ -102,10 +106,17 @@ if hiera('telemetry::kafka::enabled') {
|
|||
# TODO validate values before proceed
|
||||
|
||||
ceilometer_config { 'database/metering_connection': value => $metering_connection }
|
||||
ceilometer_config { 'database/resource_connection': value => $resource_connection }
|
||||
ceilometer_config { 'database/event_connection': value => $event_connection }
|
||||
if $resource_api {
|
||||
ceilometer_config { 'database/resource_connection': value => $resource_connection }
|
||||
}
|
||||
if $event_api {
|
||||
ceilometer_config { 'notification/store_events': value => True }
|
||||
ceilometer_config { 'database/event_connection': value => $event_connection }
|
||||
}
|
||||
else {
|
||||
ceilometer_config { 'notification/store_events': value => false }
|
||||
}
|
||||
ceilometer_config { 'database/connection': value => $connection }
|
||||
ceilometer_config { 'notification/store_events': value => false }
|
||||
|
||||
# Workaround for fixing Ceilometer bug in MOS9.0
|
||||
if hiera('fuel_version') == '9.0' {
|
||||
|
|
|
@ -9,6 +9,8 @@ if !hiera('telemetry::kafka::enabled') {
|
|||
$amqp_url = hiera('telemetry::rabbit::url')
|
||||
$metadata_fields = hiera('telemetry::metadata_fields')
|
||||
|
||||
$plugin_data = hiera_hash('telemetry', undef)
|
||||
$resource_api = $plugin_data['resource_api']
|
||||
|
||||
if hiera('telemetry::elasticsearch::server',false) {
|
||||
$ip = hiera('telemetry::elasticsearch::server')
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
notice('MODULAR: fuel-plugin-telemetry: hindsight.pp')
|
||||
|
||||
$plugin_data = hiera_hash('telemetry', undef)
|
||||
$resource_api = $plugin_data['resource_api']
|
||||
$user = 'hindsight'
|
||||
$group = 'hindsight'
|
||||
$influxdb_address = hiera('telemetry::influxdb::address')
|
||||
|
|
|
@ -7,3 +7,8 @@ module_directory = "<%= @modules_dir %>/common;/usr/share/heka/lua_modules"
|
|||
[sample_decoder.config]
|
||||
metadata_fields = "<%= @metadata_fields %>"
|
||||
decoder = "ceilometer"
|
||||
<% if @resource_api %>
|
||||
decode_resources = <%= @resource_api %>
|
||||
<% else %>
|
||||
decode_resources = false
|
||||
<% end %>
|
||||
|
|
|
@ -13,3 +13,9 @@ topic_conf = {}
|
|||
metadata_fields = "<%= @metadata_fields %>"
|
||||
instuction_limit = 0
|
||||
ticker_interval = 60
|
||||
<% if @resource_api %>
|
||||
decode_resources = <%= @resource_api %>
|
||||
<% else %>
|
||||
decode_resources = false
|
||||
<% end %>
|
||||
|
||||
|
|
Loading…
Reference in New Issue