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

[filebeat][netflow] filebeat does't start when internal_networks variable isn't defined in config file #24094

Closed
abraxxa opened this issue Feb 18, 2021 · 2 comments · Fixed by #24110
Labels

Comments

@abraxxa
Copy link

abraxxa commented Feb 18, 2021

The new variable 'internal_networks' is also neither documented in https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-netflow.html nor https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-netflow.html.

Error messages from journalctl -u filebeat --no-pager:

Feb 18 09:38:03 tsa-tc-tsses-1 filebeat[2411]: 2021-02-18T09:38:03.352+0100        INFO        instance/beat.go:474        filebeat stopped.
Feb 18 09:38:03 tsa-tc-tsses-1 filebeat[2411]: 2021-02-18T09:38:03.352+0100        ERROR        instance/beat.go:971        Exiting: Failed to start crawler: creating module reloader failed: could not create module registry for filesets: Error getting config for fileset netflow/log: Error interpreting the template of the input: template: text:8:5: executing "text" at <.internal_networks>: map has no entry for key "internal_networks"
Feb 18 09:38:03 tsa-tc-tsses-1 filebeat[2411]: Exiting: Failed to start crawler: creating module reloader failed: could not create module registry for filesets: Error getting config for fileset netflow/log: Error interpreting the template of the input: template: text:8:5: executing "text" at <.internal_networks>: map has no entry for key "internal_networks"
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Feb 18, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Feb 18, 2021
andrewkroh added a commit to andrewkroh/beats that referenced this issue Feb 18, 2021
Documentation for the `internal_networks` option of the Netflow input and module was missing.
Also the module's manifest did not declare the option so if it was not set in the module config
it would cause an error.

I did not see where a default was set for the netflow input's internal_networks option so I set that
to `private` to keep the old behavior before this was configurable.

Fixes elastic#24094
@andrewkroh
Copy link
Member

andrewkroh commented Feb 18, 2021

I opened a fix at #24110.

To workaround the issue you'll have to update the module config to add the var.private_networks like at

- module: netflow
log:
enabled: true
var:
netflow_host: localhost
netflow_port: 2055
# internal_networks specifies which networks are considered internal or private
# you can specify either a CIDR block or any of the special named ranges listed
# at: https://www.elastic.co/guide/en/beats/filebeat/current/defining-processors.html#condition-network
internal_networks:
- private

andrewkroh added a commit that referenced this issue Feb 20, 2021
Documentation for the `internal_networks` option of the Netflow input and module was missing.
Also the module's manifest did not declare the option so if it was not set in the module config
it would cause an error.

I did not see where a default was set for the netflow input's internal_networks option so I set that
to `private` to keep the old behavior before this was configurable.

Fixes #24094
andrewkroh added a commit to andrewkroh/beats that referenced this issue Mar 1, 2021
…c#24110)

Documentation for the `internal_networks` option of the Netflow input and module was missing.
Also the module's manifest did not declare the option so if it was not set in the module config
it would cause an error.

I did not see where a default was set for the netflow input's internal_networks option so I set that
to `private` to keep the old behavior before this was configurable.

Fixes elastic#24094

(cherry picked from commit 3ca53aa)
andrewkroh added a commit to andrewkroh/beats that referenced this issue Mar 1, 2021
…c#24110)

Documentation for the `internal_networks` option of the Netflow input and module was missing.
Also the module's manifest did not declare the option so if it was not set in the module config
it would cause an error.

I did not see where a default was set for the netflow input's internal_networks option so I set that
to `private` to keep the old behavior before this was configurable.

Fixes elastic#24094

(cherry picked from commit 3ca53aa)
andrewkroh added a commit that referenced this issue Mar 4, 2021
#24278)

Documentation for the `internal_networks` option of the Netflow input and module was missing.
Also the module's manifest did not declare the option so if it was not set in the module config
it would cause an error.

I did not see where a default was set for the netflow input's internal_networks option so I set that
to `private` to keep the old behavior before this was configurable.

Fixes #24094

(cherry picked from commit 3ca53aa)
andrewkroh added a commit to andrewkroh/beats that referenced this issue Mar 4, 2021
…c#24110)

Documentation for the `internal_networks` option of the Netflow input and module was missing.
Also the module's manifest did not declare the option so if it was not set in the module config
it would cause an error.

I did not see where a default was set for the netflow input's internal_networks option so I set that
to `private` to keep the old behavior before this was configurable.

Fixes elastic#24094

(cherry picked from commit 3ca53aa)
andrewkroh added a commit that referenced this issue Mar 17, 2021
#24279)

Documentation for the `internal_networks` option of the Netflow input and module was missing.
Also the module's manifest did not declare the option so if it was not set in the module config
it would cause an error.

I did not see where a default was set for the netflow input's internal_networks option so I set that
to `private` to keep the old behavior before this was configurable.

Fixes #24094

(cherry picked from commit 3ca53aa)
andrewkroh added a commit that referenced this issue Mar 17, 2021
#24280)

Documentation for the `internal_networks` option of the Netflow input and module was missing.
Also the module's manifest did not declare the option so if it was not set in the module config
it would cause an error.

I did not see where a default was set for the netflow input's internal_networks option so I set that
to `private` to keep the old behavior before this was configurable.

Fixes #24094

(cherry picked from commit 3ca53aa)
leweafan pushed a commit to leweafan/beats that referenced this issue Apr 28, 2023
…c#24110) (elastic#24280)

Documentation for the `internal_networks` option of the Netflow input and module was missing.
Also the module's manifest did not declare the option so if it was not set in the module config
it would cause an error.

I did not see where a default was set for the netflow input's internal_networks option so I set that
to `private` to keep the old behavior before this was configurable.

Fixes elastic#24094

(cherry picked from commit 563e964)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants