From 0dc2cf95c8624a653e51a4d8b0f3800faea8bad6 Mon Sep 17 00:00:00 2001 From: Ilya Tyaptin Date: Tue, 27 Sep 2016 12:41:48 +0300 Subject: [PATCH] Add prune input to Hindsight Prune input deletes the log files generated by the input and analysis plugins when all the analysis and output plugins are done consumining them (within ticker_interval seconds). Change-Id: I20be8e169117c166090b260eb52f1c2d3124ab89 --- deployment_scripts/puppet/manifests/hindsight.pp | 9 ++++++++- .../telemetry/files/hindsight/run/input/prune_input.cfg | 3 +++ .../telemetry/templates/hindsight/hindsight.cfg.erb | 2 -- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 deployment_scripts/puppet/modules/telemetry/files/hindsight/run/input/prune_input.cfg diff --git a/deployment_scripts/puppet/manifests/hindsight.pp b/deployment_scripts/puppet/manifests/hindsight.pp index 632202a..c218b38 100644 --- a/deployment_scripts/puppet/manifests/hindsight.pp +++ b/deployment_scripts/puppet/manifests/hindsight.pp @@ -139,6 +139,10 @@ create_resources(file, $configs, $files_defaults) #kafka_input_cfg_creator { $sufix: } # Files +file { '/usr/share/luasandbox/sandboxes/heka/input/prune_input.lua': + ensure => 'link', + target => "${run_dir}/input/prune_input.lua", +} $scripts = { "${run_dir}/output/influxdb_tcp.lua" => { @@ -149,7 +153,10 @@ $scripts = { }, "${run_dir}/output/elasticsearch_bulk_tcp.lua" => { source => 'puppet:///modules/telemetry/hindsight/run/output/elasticsearch_bulk_tcp.lua' - } + }, + "${run_dir}/input/prune_input.cfg" => { + source => 'puppet:///modules/telemetry/hindsight/run/input/prune_input.cfg', + }, } create_resources(file, $scripts, $files_defaults) diff --git a/deployment_scripts/puppet/modules/telemetry/files/hindsight/run/input/prune_input.cfg b/deployment_scripts/puppet/modules/telemetry/files/hindsight/run/input/prune_input.cfg new file mode 100644 index 0000000..b14d429 --- /dev/null +++ b/deployment_scripts/puppet/modules/telemetry/files/hindsight/run/input/prune_input.cfg @@ -0,0 +1,3 @@ +ticker_interval = 60 +input = true +analysis = true \ No newline at end of file diff --git a/deployment_scripts/puppet/modules/telemetry/templates/hindsight/hindsight.cfg.erb b/deployment_scripts/puppet/modules/telemetry/templates/hindsight/hindsight.cfg.erb index b06e41c..e6891ba 100644 --- a/deployment_scripts/puppet/modules/telemetry/templates/hindsight/hindsight.cfg.erb +++ b/deployment_scripts/puppet/modules/telemetry/templates/hindsight/hindsight.cfg.erb @@ -1,8 +1,6 @@ max_message_size = 3 * 1024 * 1024 -backpressure_disk_free = 100 output_size = 100 * 1024 * 1024 -backpressure = 25 output_path = "<%= @output_dir %>" sandbox_load_path = "<%= @hindsight_dir %>/load"