Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Remove deprecated fields in coredns module. {pull}28196[28196]
- Remove old `httpjson` config implementation. {pull}28054[28054]
- Added dataset `threatq` to the `threatintel` module to ingest indicators from ThreatQ {issue}27423[27423]
- Fail to start Filebat if none between `queue_url`, `bucket_arn` or `non_aws_bucket_name` is set for a configured aws-s3 input {issue}13911[13911] {pull}28666[28666]

*Heartbeat*

Expand Down
4 changes: 1 addition & 3 deletions x-pack/filebeat/input/awss3/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (

"github.com/elastic/beats/v7/libbeat/common/cfgtype"
"github.com/elastic/beats/v7/libbeat/common/match"
"github.com/elastic/beats/v7/libbeat/logp"
"github.com/elastic/beats/v7/libbeat/reader/parser"
"github.com/elastic/beats/v7/libbeat/reader/readfile"
"github.com/elastic/beats/v7/libbeat/reader/readfile/encoding"
Expand Down Expand Up @@ -65,8 +64,7 @@ func (c *config) Validate() error {
}
}
if len(enabled) == 0 {
logp.NewLogger(inputName).Warnf("neither queue_url, bucket_arn, non_aws_bucket_name were provided, input %s will stop", inputName)
return nil
return errors.New("neither queue_url, bucket_arn nor non_aws_bucket_name were provided")
} else if len(enabled) > 1 {
return fmt.Errorf("queue_url <%v>, bucket_arn <%v>, non_aws_bucket_name <%v> "+
"cannot be set at the same time", c.QueueURL, c.BucketARN, c.NonAWSBucketName)
Expand Down
13 changes: 6 additions & 7 deletions x-pack/filebeat/input/awss3/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,17 @@ func TestConfig(t *testing.T) {
},
},
{
"error on no queueURL and s3Bucket",
"error on no queueURL and s3Bucket and nonAWSS3Bucket",
"",
"",
"",
common.MapStr{
"queue_url": "",
"bucket_arn": "",
},
"",
func(queueURL, s3Bucket string, nonAWSS3Bucket string) config {
return makeConfig("", "", "")
"queue_url": "",
"bucket_arn": "",
"non_aws_bucket_name": "",
},
"neither queue_url, bucket_arn nor non_aws_bucket_name were provided",
nil,
},
{
"error on both queueURL and s3Bucket",
Expand Down