in this config
input {
file {
mode => "read"
path => "/opt/stromReciever/parsed_data/changedRights/csv/*.json"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => "json"
type => "csv"
}
file {
mode => "read"
path => "/opt/stromReciever/parsed_data/changedRights/cve_mitre/*.json"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => "json"
type => "cve_mitre"
}
file {
mode => "read"
path => "/opt/stromReciever/parsed_data/changedRights/cwe_mitre/*.json"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => "json"
type => "cwe_mitre"
}
file {
mode => "read"
path => "/opt/stromReciever/parsed_data/changedRights/ibm_x_force/*.json"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => "json"
type => "ibm_x_force"
}
and 10 more similar inputs.
How can i extract name of any, that located between parsed_data/changedRights/ and /*.json
I need it to make opensearch index based on subfolder name, but write only one input, smt like this:
input {
file {
mode => "read"
path => "/opt/stromReciever/parsed_data/changedRights/*/*.json"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => "json"
}
}