diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 21c1d90a394..6af78023970 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -281,6 +281,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Change the `event.created` in Netflow events to be the time the event was created by Filebeat to be consistent with ECS. {pull}23094[23094] - Update `filestream` reader offset when a line is skipped. {pull}23417[23417] +- Add check for empty values in azure module. {pull}24156[24156] *Filebeat* diff --git a/x-pack/filebeat/input/azureeventhub/config.go b/x-pack/filebeat/input/azureeventhub/config.go index 68ad8d109e0..e24f3f2b0f6 100644 --- a/x-pack/filebeat/input/azureeventhub/config.go +++ b/x-pack/filebeat/input/azureeventhub/config.go @@ -33,7 +33,7 @@ func (conf *azureInputConfig) Validate() error { return errors.New("no event hub name configured") } if conf.SAName == "" || conf.SAKey == "" { - return errors.New("missing storage account information") + return errors.New("no storage account or storage account key configured") } if conf.SAContainer == "" { conf.SAContainer = fmt.Sprintf("%s-%s", ephContainerName, conf.EventHubName) diff --git a/x-pack/filebeat/module/azure/activitylogs/config/azure-eventhub.yml b/x-pack/filebeat/module/azure/activitylogs/config/azure-eventhub.yml index 8701cae46fb..a949730a58f 100644 --- a/x-pack/filebeat/module/azure/activitylogs/config/azure-eventhub.yml +++ b/x-pack/filebeat/module/azure/activitylogs/config/azure-eventhub.yml @@ -1,11 +1,29 @@ type: azure-eventhub -connection_string: {{ .connection_string }} +{{ if .eventhub }} eventhub: {{ .eventhub }} +storage_account_container: filebeat-activitylogs-{{ .eventhub }} +{{ end }} + +{{ if .connection_string }} +connection_string: {{ .connection_string }} +{{ end }} + +{{ if .consumer_group }} consumer_group: {{ .consumer_group }} +{{ end }} + +{{ if .storage_account }} storage_account: {{ .storage_account }} +{{ end }} + +{{ if .storage_account_key }} storage_account_key: {{ .storage_account_key }} +{{ end }} + +{{ if .resource_manager_endpoint }} resource_manager_endpoint: {{ .resource_manager_endpoint }} -storage_account_container: filebeat-activitylogs-{{ .eventhub }} +{{ end }} + tags: {{.tags | tojson}} publisher_pipeline.disable_host: {{ inList .tags "forwarded" }} diff --git a/x-pack/filebeat/module/azure/auditlogs/config/azure-eventhub.yml b/x-pack/filebeat/module/azure/auditlogs/config/azure-eventhub.yml index 7f5eb091550..a5460ed456e 100644 --- a/x-pack/filebeat/module/azure/auditlogs/config/azure-eventhub.yml +++ b/x-pack/filebeat/module/azure/auditlogs/config/azure-eventhub.yml @@ -1,11 +1,29 @@ type: azure-eventhub -connection_string: {{ .connection_string }} +{{ if .eventhub }} eventhub: {{ .eventhub }} +storage_account_container: filebeat-auditlogs-{{ .eventhub }} +{{ end }} + +{{ if .connection_string }} +connection_string: {{ .connection_string }} +{{ end }} + +{{ if .consumer_group }} consumer_group: {{ .consumer_group }} +{{ end }} + +{{ if .storage_account }} storage_account: {{ .storage_account }} +{{ end }} + +{{ if .storage_account_key }} storage_account_key: {{ .storage_account_key }} +{{ end }} + +{{ if .resource_manager_endpoint }} resource_manager_endpoint: {{ .resource_manager_endpoint }} -storage_account_container: filebeat-auditlogs-{{ .eventhub }} +{{ end }} + tags: {{.tags | tojson}} publisher_pipeline.disable_host: {{ inList .tags "forwarded" }} processors: diff --git a/x-pack/filebeat/module/azure/platformlogs/config/azure-eventhub.yml b/x-pack/filebeat/module/azure/platformlogs/config/azure-eventhub.yml index 80a73bc9905..49cfcef3a84 100644 --- a/x-pack/filebeat/module/azure/platformlogs/config/azure-eventhub.yml +++ b/x-pack/filebeat/module/azure/platformlogs/config/azure-eventhub.yml @@ -1,11 +1,29 @@ type: azure-eventhub -connection_string: {{ .connection_string }} +{{ if .eventhub }} eventhub: {{ .eventhub }} +storage_account_container: filebeat-platformlogs-{{ .eventhub }} +{{ end }} + +{{ if .connection_string }} +connection_string: {{ .connection_string }} +{{ end }} + +{{ if .consumer_group }} consumer_group: {{ .consumer_group }} +{{ end }} + +{{ if .storage_account }} storage_account: {{ .storage_account }} +{{ end }} + +{{ if .storage_account_key }} storage_account_key: {{ .storage_account_key }} +{{ end }} + +{{ if .resource_manager_endpoint }} resource_manager_endpoint: {{ .resource_manager_endpoint }} -storage_account_container: filebeat-platformlogs-{{ .eventhub }} +{{ end }} + tags: {{.tags | tojson}} publisher_pipeline.disable_host: {{ inList .tags "forwarded" }} diff --git a/x-pack/filebeat/module/azure/signinlogs/config/azure-eventhub.yml b/x-pack/filebeat/module/azure/signinlogs/config/azure-eventhub.yml index e37c7c61a4d..9a6a86e08fa 100644 --- a/x-pack/filebeat/module/azure/signinlogs/config/azure-eventhub.yml +++ b/x-pack/filebeat/module/azure/signinlogs/config/azure-eventhub.yml @@ -1,11 +1,29 @@ type: azure-eventhub -connection_string: {{ .connection_string }} +{{ if .eventhub }} eventhub: {{ .eventhub }} +storage_account_container: filebeat-signinlogs-{{ .eventhub }} +{{ end }} + +{{ if .connection_string }} +connection_string: {{ .connection_string }} +{{ end }} + +{{ if .consumer_group }} consumer_group: {{ .consumer_group }} +{{ end }} + +{{ if .storage_account }} storage_account: {{ .storage_account }} +{{ end }} + +{{ if .storage_account_key }} storage_account_key: {{ .storage_account_key }} +{{ end }} + +{{ if .resource_manager_endpoint }} resource_manager_endpoint: {{ .resource_manager_endpoint }} -storage_account_container: filebeat-signinlogs-{{ .eventhub }} +{{ end }} + tags: {{.tags | tojson}} publisher_pipeline.disable_host: {{ inList .tags "forwarded" }} processors: