diff --git a/x-pack/filebeat/module/aws/cloudtrail/config/file.yml b/x-pack/filebeat/module/aws/cloudtrail/config/file.yml new file mode 100644 index 00000000000..8bfbcc9f802 --- /dev/null +++ b/x-pack/filebeat/module/aws/cloudtrail/config/file.yml @@ -0,0 +1,6 @@ +type: log +paths: + {{ range $i, $path := .paths }} + - {{$path}} + {{ end }} +exclude_files: [".gz$"] diff --git a/x-pack/filebeat/module/aws/cloudtrail/config/cloudtrail.yml b/x-pack/filebeat/module/aws/cloudtrail/config/s3.yml similarity index 74% rename from x-pack/filebeat/module/aws/cloudtrail/config/cloudtrail.yml rename to x-pack/filebeat/module/aws/cloudtrail/config/s3.yml index 18087c4769b..48640b255c8 100644 --- a/x-pack/filebeat/module/aws/cloudtrail/config/cloudtrail.yml +++ b/x-pack/filebeat/module/aws/cloudtrail/config/s3.yml @@ -1,5 +1,3 @@ -{{ if eq .input "s3" }} - type: s3 queue_url: {{ .queue_url }} expand_event_list_from_field: Records @@ -23,14 +21,3 @@ api_timeout: {{ .api_timeout }} {{ if .endpoint }} endpoint: {{ .endpoint }} {{ end }} - -{{ else if eq .input "file" }} - -type: log -paths: -{{ range $i, $path := .paths }} - - {{$path}} -{{ end }} -exclude_files: [".gz$"] - -{{ end }} diff --git a/x-pack/filebeat/module/aws/cloudtrail/manifest.yml b/x-pack/filebeat/module/aws/cloudtrail/manifest.yml index 0b8f629bad1..b71b96bbef1 100644 --- a/x-pack/filebeat/module/aws/cloudtrail/manifest.yml +++ b/x-pack/filebeat/module/aws/cloudtrail/manifest.yml @@ -11,4 +11,4 @@ var: - name: endpoint ingest_pipeline: ingest/pipeline.yml -input: config/cloudtrail.yml +input: config/{{.input}}.yml diff --git a/x-pack/filebeat/module/aws/cloudwatch/config/cloudwatch.yml b/x-pack/filebeat/module/aws/cloudwatch/config/s3.yml similarity index 100% rename from x-pack/filebeat/module/aws/cloudwatch/config/cloudwatch.yml rename to x-pack/filebeat/module/aws/cloudwatch/config/s3.yml diff --git a/x-pack/filebeat/module/aws/ec2/config/ec2.yml b/x-pack/filebeat/module/aws/ec2/config/s3.yml similarity index 100% rename from x-pack/filebeat/module/aws/ec2/config/ec2.yml rename to x-pack/filebeat/module/aws/ec2/config/s3.yml