mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-20 13:50:45 +00:00
ELK merge - includes new Elastalert, Logstash, Kibana, Elastalert, Auditbeat, Filebeat modules and other misc changes.
This commit is contained in:
15
lib/helpers/scenario.rb
Normal file
15
lib/helpers/scenario.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class ScenarioHelper
|
||||
|
||||
def self.get_scenario_name(scenario_path)
|
||||
scenario_path.split('/').last.split('.').first + '-'
|
||||
end
|
||||
|
||||
def self.get_prefix(options, scenario_name)
|
||||
options[:prefix] ? (options[:prefix] + '-' + scenario_name) : ('SecGen-' + scenario_name)
|
||||
end
|
||||
|
||||
def self.get_hostname(options, scenario_path, system_name)
|
||||
"#{get_prefix(options, get_scenario_name(scenario_path))}#{system_name}".tr('_', '-')
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user