Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty configuration options generate <no value> string for azure-eventhub input #24156

Merged
merged 2 commits into from
Feb 23, 2021
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 @@ -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*

Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/azureeventhub/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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" }}

Expand Down
22 changes: 20 additions & 2 deletions x-pack/filebeat/module/azure/auditlogs/config/azure-eventhub.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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" }}

Expand Down
22 changes: 20 additions & 2 deletions x-pack/filebeat/module/azure/signinlogs/config/azure-eventhub.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down