Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logstash should not run when no pipelines #154

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/libraries/get_pipelines.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module RbManager
module Helpers
def get_pipelines
logstash_pipelines = []
sensors = node.run_state['sensors_info_all']
sensors = get_sensors_info()
namespaces = get_namespaces()
main_logstash = determine_main_logstash_node()

Expand Down
4 changes: 2 additions & 2 deletions resources/recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@
vault_nodes node.run_state['sensors_info_all']['vault-sensor']
scanner_nodes node.run_state['sensors_info_all']['scanner-sensor']
device_nodes node.run_state['sensors_info_all']['device-sensor']
logstash_pipelines node.run_state['pipelines']
if manager_services['logstash'] && node.run_state['pipelines'] && !node.run_state['pipelines'].empty?
logstash_pipelines node.default['pipelines']
if manager_services['logstash'] && !node.default['pipelines'].nil? && !node.default['pipelines'].empty?
action [:add, :register]
else
action [:remove, :deregister]
Expand Down
2 changes: 1 addition & 1 deletion resources/recipes/prepare_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
node.run_state['all_flow_sensors_info'] = get_all_flow_sensors_info()

# get logstash pipelines
node.run_state['pipelines'] = get_pipelines()
node.default['pipelines'] = get_pipelines()

# get namespaces
node.run_state['namespaces'] = get_namespaces
Expand Down
Loading