Correctly cleanup self-monitoring sandboxes
Change-Id: I88e794d7bbd4b056d86fcb6ca9a4cbf610370037
This commit is contained in:
parent
389648c515
commit
b19fd832da
|
@ -118,24 +118,23 @@ define lma_collector::heka (
|
|||
$heka_monitoring_ensure = absent
|
||||
}
|
||||
|
||||
if $heka_monitoring {
|
||||
heka::filter::sandbox { "heka_monitoring_${title}":
|
||||
ensure => $heka_monitoring_ensure,
|
||||
config_dir => $config_dir,
|
||||
filename => "${lma_collector::params::plugins_dir}/filters/heka_monitoring.lua",
|
||||
message_matcher => "Type == 'heka.all-report'",
|
||||
require => ::Heka[$title],
|
||||
module_directory => $lua_modules_dir,
|
||||
notify => Class[$service_class],
|
||||
}
|
||||
heka::filter::sandbox { "heka_monitoring_${title}":
|
||||
ensure => $heka_monitoring_ensure,
|
||||
config_dir => $config_dir,
|
||||
filename => "${lma_collector::params::plugins_dir}/filters/heka_monitoring.lua",
|
||||
message_matcher => "Type == 'heka.all-report'",
|
||||
require => ::Heka[$title],
|
||||
module_directory => $lua_modules_dir,
|
||||
notify => Class[$service_class],
|
||||
}
|
||||
|
||||
# Dashboard is required to enable monitoring messages
|
||||
heka::output::dashboard { "dashboard_${title}":
|
||||
config_dir => $config_dir,
|
||||
dashboard_address => $lma_collector::params::dashboard_address,
|
||||
dashboard_port => $dashboard_port,
|
||||
require => ::Heka[$title],
|
||||
notify => Class[$service_class],
|
||||
}
|
||||
# Dashboard is required to enable monitoring messages
|
||||
heka::output::dashboard { "dashboard_${title}":
|
||||
ensure => $heka_monitoring_ensure,
|
||||
config_dir => $config_dir,
|
||||
dashboard_address => $lma_collector::params::dashboard_address,
|
||||
dashboard_port => $dashboard_port,
|
||||
require => ::Heka[$title],
|
||||
notify => Class[$service_class],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,8 +67,12 @@ describe 'lma_collector::heka' do
|
|||
)
|
||||
should contain_heka__input__tcp('metric')
|
||||
should contain_heka__decoder__sandbox('metric' )
|
||||
is_expected.to_not contain_heka__filter__sandbox('heka_monitoring_metric_collector')
|
||||
is_expected.to_not contain_heka__output__dashboard('dashboard_metric_collector' )
|
||||
should contain_heka__filter__sandbox('heka_monitoring_metric_collector').with(
|
||||
'ensure' => 'absent'
|
||||
)
|
||||
should contain_heka__output__dashboard('dashboard_metric_collector' ).with(
|
||||
'ensure' => 'absent'
|
||||
)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue