diff --git a/manifests/init.pp b/manifests/init.pp index 9c48627b..237db7ab 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -217,6 +217,12 @@ # in the ceilometer config. # Defaults to false. # +# [*host*] +# (Optional) Name of this node. This is typically a hostname, FQDN, or +# IP address. +# Defaults to $::os_service_default. +# +# # === DEPRECATED PARAMETERS: # [*metering_secret*] # (optional) Secret key for signing messages. @@ -310,6 +316,7 @@ class ceilometer( $snmpd_readonly_username = $::os_service_default, $snmpd_readonly_user_password = $::os_service_default, $purge_config = false, + $host = $::os_service_default, # DEPRECATED PARAMETERS $alarm_history_time_to_live = undef, $metering_secret = undef, @@ -435,6 +442,7 @@ please use memcache_servers instead.") # Once we got here, we can act as an honey badger on the rpc used. ceilometer_config { 'DEFAULT/http_timeout' : value => $http_timeout; + 'DEFAULT/host' : value => $host; 'publisher/telemetry_secret' : value => $telemetry_secret_real, secret => true; 'database/event_time_to_live' : value => $event_time_to_live; 'database/metering_time_to_live' : value => $metering_time_to_live; diff --git a/releasenotes/notes/set-ceilometer-host-1e3d3f9de3642cd0.yaml b/releasenotes/notes/set-ceilometer-host-1e3d3f9de3642cd0.yaml new file mode 100644 index 00000000..494dbc57 --- /dev/null +++ b/releasenotes/notes/set-ceilometer-host-1e3d3f9de3642cd0.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Add support to override host param in ceilometer config. Without this + sometimes fqdn wont match and some nova metrics will be skipped. diff --git a/spec/classes/ceilometer_init_spec.rb b/spec/classes/ceilometer_init_spec.rb index b7415608..410b5841 100644 --- a/spec/classes/ceilometer_init_spec.rb +++ b/spec/classes/ceilometer_init_spec.rb @@ -13,6 +13,7 @@ describe 'ceilometer' do :log_dir => '/var/log/ceilometer', :use_stderr => 'True', :purge_config => false, + :host => 'foo.domain' } end @@ -37,6 +38,10 @@ describe 'ceilometer' do is_expected.to contain_ceilometer_config('DEFAULT/http_timeout').with_value(params[:http_timeout]) end + it 'configures host name' do + is_expected.to contain_ceilometer_config('DEFAULT/host').with_value(params[:host]) + end + context 'with rabbit_host parameter' do before { params.merge!( rabbit_params ) } it_configures 'a ceilometer base installation'