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] Enable dynamic inputs (TCP) for Cisco syslog modules #26159

Merged
merged 5 commits into from
Dec 16, 2021

Conversation

legoguy1000
Copy link
Contributor

@legoguy1000 legoguy1000 commented Jun 7, 2021

What does this PR do?

Enables the Cisco filesets to use TCP or UDP for syslog input.

Why is it important?

TCP is more reliable than UDP and cisco devices can use both and shouldn't be limited to UDP.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

How to test this PR locally

cd beats/x-pack/filebeat
TESTING_FILEBEAT_MODULES=cisco mage -v pythonIntegTest

Related issues

Use cases

Screenshots

Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 7, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 7, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-12-03T16:26:08.259+0000

  • Duration: 95 min 41 sec

  • Commit: ae3eb78

Test stats 🧪

Test Results
Failed 0
Passed 2413
Skipped 152
Total 2565

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 14, 2021
@jamiehynds jamiehynds added enhancement needs_team Indicates that the issue/PR needs a Team:* label labels Jun 14, 2021
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 14, 2021
@legoguy1000 legoguy1000 marked this pull request as ready for review July 18, 2021 00:46
@elasticmachine
Copy link
Collaborator

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

@legoguy1000
Copy link
Contributor Author

@andrewkroh could u take a look at this when you get a chance. I think this is the best way to enable backwards compatibility with the existing syslog inputs but if there are other thoughts, let me know.

@legoguy1000
Copy link
Contributor Author

I also think IDK if i need additional sample data to account for the syslog vs tcp/udp inputs??

@mergify
Copy link
Contributor

mergify bot commented Jul 21, 2021

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b 26118-cisco-tcp upstream/26118-cisco-tcp
git merge upstream/master
git push upstream 26118-cisco-tcp

@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2021

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b 26118-cisco-tcp upstream/26118-cisco-tcp
git merge upstream/master
git push upstream 26118-cisco-tcp

@marc-gr
Copy link
Contributor

marc-gr commented Aug 6, 2021

/test

@mergify
Copy link
Contributor

mergify bot commented Aug 10, 2021

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b 26118-cisco-tcp upstream/26118-cisco-tcp
git merge upstream/master
git push upstream 26118-cisco-tcp

@mergify
Copy link
Contributor

mergify bot commented Sep 22, 2021

This pull request does not have a backport label. Could you fix it @legoguy1000? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Sep 22, 2021
legoguy1000 and others added 3 commits December 2, 2021 15:30
- call out tcp or udp directly in asa and ftd config
- add tcp to ios
- add ssl config option for asa & ftd over tcp

Closes elastic#28821
@leehinman
Copy link
Contributor

/test

@leehinman leehinman added the backport-v7.16.0 Automated backport with mergify label Dec 3, 2021
@leehinman leehinman added the backport-v8.0.0 Automated backport with mergify label Dec 3, 2021
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Dec 3, 2021
@legoguy1000
Copy link
Contributor Author

@leehinman Anything more need to be done with this PR?

@leehinman leehinman merged commit 9201a92 into elastic:master Dec 16, 2021
@leehinman
Copy link
Contributor

@leehinman Anything more need to be done with this PR?

nope. Thanks for the reminder.

mergify bot pushed a commit that referenced this pull request Dec 16, 2021
- Add tcp option to asa, ftd & ios filesets
- Add SSL option

Closes #28821

Co-authored-by: Lee E. Hinman <lee.e.hinman@elastic.co>
(cherry picked from commit 9201a92)
mergify bot pushed a commit that referenced this pull request Dec 16, 2021
- Add tcp option to asa, ftd & ios filesets
- Add SSL option

Closes #28821

Co-authored-by: Lee E. Hinman <lee.e.hinman@elastic.co>
(cherry picked from commit 9201a92)
leehinman pushed a commit that referenced this pull request Dec 16, 2021
…) (#29472)

- Add tcp option to asa, ftd & ios filesets
- Add SSL option

Closes #28821

Co-authored-by: Lee E. Hinman <lee.e.hinman@elastic.co>
(cherry picked from commit 9201a92)

Co-authored-by: Alex Resnick <adr8292@gmail.com>
leehinman pushed a commit that referenced this pull request Dec 16, 2021
…) (#29473)

- Add tcp option to asa, ftd & ios filesets
- Add SSL option

Closes #28821

Co-authored-by: Lee E. Hinman <lee.e.hinman@elastic.co>
(cherry picked from commit 9201a92)

Co-authored-by: Alex Resnick <adr8292@gmail.com>
@andrewkroh
Copy link
Member

andrewkroh commented Jan 27, 2022

This causes an issue for users with existing ASA and FTD configs that upgrade. The existing config contains var.input: syslog, but this fails under the new templates that are specific to the udp and tcp input types. I think to keep compatibility that the Go template needs to retain an {{ if eq .input "syslog" }}.

# Example of an existing config.
- module: cisco
  asa:
    enabled: true
    var.input: syslog
    var.syslog_host: 0.0.0.0
    var.syslog_port: 5144
    var.log_level: 7
  ftd:
    enabled: true
    var.input: syslog
    var.syslog_host: 0.0.0.0
    var.syslog_port: 5145
    var.log_level: 7

@legoguy1000
Copy link
Contributor Author

If I recall the thought process, since syslog was the default for var.input if they didn't actually set the setting, when they upgraded it would use the new default of udp which is what it was already using. That being said, I see your point.

@andrewkroh
Copy link
Member

I've added back an if in #30072.

andrewkroh added a commit to andrewkroh/beats that referenced this pull request Feb 9, 2022
elastic#26159 accidentally introduced a breaking change for existing users of Cisco ASA
and FTD that specified `var.input: syslog`. `syslog` was effectively an alias for the UDP
input and the alias support was removed.

This change allows `var.input: syslog` to continue working as it did before.
andrewkroh added a commit that referenced this pull request Feb 10, 2022
#26159 accidentally introduced a breaking change for existing users of Cisco ASA
and FTD that specified `var.input: syslog`. `syslog` was effectively an alias for the UDP
input and the alias support was removed.

This change allows `var.input: syslog` to continue working as it did before.
mergify bot pushed a commit that referenced this pull request Feb 10, 2022
#26159 accidentally introduced a breaking change for existing users of Cisco ASA
and FTD that specified `var.input: syslog`. `syslog` was effectively an alias for the UDP
input and the alias support was removed.

This change allows `var.input: syslog` to continue working as it did before.

(cherry picked from commit 3ddfd1f)

# Conflicts:
#	x-pack/filebeat/module/cisco/asa/config/input.yml
#	x-pack/filebeat/module/cisco/ftd/config/input.yml
mergify bot pushed a commit that referenced this pull request Feb 10, 2022
#26159 accidentally introduced a breaking change for existing users of Cisco ASA
and FTD that specified `var.input: syslog`. `syslog` was effectively an alias for the UDP
input and the alias support was removed.

This change allows `var.input: syslog` to continue working as it did before.

(cherry picked from commit 3ddfd1f)
mergify bot pushed a commit that referenced this pull request Feb 10, 2022
#26159 accidentally introduced a breaking change for existing users of Cisco ASA
and FTD that specified `var.input: syslog`. `syslog` was effectively an alias for the UDP
input and the alias support was removed.

This change allows `var.input: syslog` to continue working as it did before.

(cherry picked from commit 3ddfd1f)
andrewkroh added a commit that referenced this pull request Feb 10, 2022
…) (#30327)

#26159 accidentally introduced a breaking change for existing users of Cisco ASA
and FTD that specified `var.input: syslog`. `syslog` was effectively an alias for the UDP
input and the alias support was removed.

This change allows `var.input: syslog` to continue working as it did before.

(cherry picked from commit 3ddfd1f)

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
andrewkroh added a commit that referenced this pull request Feb 10, 2022
… var.input syslog (#30326)

* [Filebeat] Fix Cisco ASA/FTD configs that used var.input syslog (#30072)

#26159 accidentally introduced a breaking change for existing users of Cisco ASA
and FTD that specified `var.input: syslog`. `syslog` was effectively an alias for the UDP
input and the alias support was removed.

This change allows `var.input: syslog` to continue working as it did before.

(cherry picked from commit 3ddfd1f)

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
andrewkroh pushed a commit that referenced this pull request Feb 10, 2022
- Add tcp option to asa, ftd & ios filesets
- Add SSL option

Closes #28821

Co-authored-by: Lee E. Hinman <lee.e.hinman@elastic.co>
andrewkroh added a commit that referenced this pull request Feb 15, 2022
…d var.input syslog (#30325)

* [Filebeat] Enable dynamic inputs (TCP) for Cisco syslog modules (#26159)

- Add tcp option to asa, ftd & ios filesets
- Add SSL option

Closes #28821

Co-authored-by: Lee E. Hinman <lee.e.hinman@elastic.co>

* [Filebeat] Fix Cisco ASA/FTD configs that used var.input syslog (#30072)

and FTD that specified `var.input: syslog`. `syslog` was effectively an alias for the UDP
input and the alias support was removed.

This change allows `var.input: syslog` to continue working as it did before.

Co-authored-by: Alex Resnick <adr8292@gmail.com>
Co-authored-by: Lee E. Hinman <lee.e.hinman@elastic.co>
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.16.0 Automated backport with mergify backport-v8.0.0 Automated backport with mergify enhancement Integration:Cisco
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Filebeat's Cisco > ASA config to reflect UDP [Filebeat][Cisco] Allow for TCP syslog input
6 participants