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

x-pack/filebeat/module/cisco Fix Cisco module Grok pattern #36326

Merged
merged 3 commits into from
Aug 16, 2023

Conversation

bhapas
Copy link
Contributor

@bhapas bhapas commented Aug 15, 2023

Proposed commit message

Fix Grok pattern in Cisco shared ingest pipeline.

  1. Users have observed the following warning messages in Elasticsearch:
[2023-08-14T11:09:30,093][WARN ][o.e.i.c.GrokProcessor    ] [ES-NODE] character class has '-' without escape
  1. The above warning message reports a problem with a pattern defined in a grok processor where a hyphen character is used as a literal character in a character class [ .... ] but the hyphen character is not escaped.

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.

How to test this PR locally

  1. Download Filebeat, configure it to connect to an Elasticsearch cluster and run filebeat setup -e. Wait for all the Filebeat assets (dashboards, ingest pipelines, etc.) to be loaded.

  2. Check the Elasticsearch logs and observe the above warning message.

  3. Delete all the ingest pipelines related to Filebeat (can be done in batch through Kibana > Stack Management > Ingest Pipelines)

  4. Modify the file filebeat/module/cisco/shared/ingest/asa-ftd-pipeline.yml to replace the 5 occurrences:

FROM:

HOSTNAME: "\\b(?:[0-9A-Za-z][0-9A-Za-z-_]{0,62})(?:\\.(?:[0-9A-Za-z][0-9A-Za-z-_]{0,62}))*(\\.?|\\b)"

TO:

HOSTNAME: "\\b(?:[0-9A-Za-z][0-9A-Za-z\\-_]{0,62})(?:\\.(?:[0-9A-Za-z][0-9A-Za-z\\-_]{0,62}))*(\\.?|\\b)"
  1. run filebeat setup -e. Wait for all the Filebeat artefacts (dashboards, ingest pipelines, etc.) to be loaded.

  2. Check the Elasticsearch: above warning message is no longer observed.

Related issues

@bhapas bhapas self-assigned this Aug 15, 2023
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Aug 15, 2023
@bhapas bhapas force-pushed the cisco-grok-issue-36325 branch from 1882a19 to 8efb44e Compare August 15, 2023 13:42
@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 15, 2023

💚 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: 2023-08-16T03:45:26.969+0000

  • Duration: 76 min 23 sec

Test stats 🧪

Test Results
Failed 0
Passed 3132
Skipped 176
Total 3308

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the 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!)

@bhapas bhapas marked this pull request as ready for review August 15, 2023 15:02
@bhapas bhapas requested a review from a team as a code owner August 15, 2023 15:02
@elasticmachine
Copy link
Collaborator

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

@bhapas bhapas changed the title x-paxk/filebeat/module/cisco Fix Cisco module Grok pattern x-pack/filebeat/module/cisco Fix Cisco module Grok pattern Aug 15, 2023
@bhapas bhapas requested a review from efd6 August 16, 2023 03:45
@bhapas bhapas merged commit ff96091 into elastic:main Aug 16, 2023
@bhapas bhapas deleted the cisco-grok-issue-36325 branch August 16, 2023 05:36
mergify bot pushed a commit that referenced this pull request Aug 16, 2023
* Fix Cisco module Grok pattern

* Fix PR comments

(cherry picked from commit ff96091)
bhapas added a commit that referenced this pull request Aug 16, 2023
…36330)

* Fix Cisco module Grok pattern

* Fix PR comments

(cherry picked from commit ff96091)

Co-authored-by: Bharat Pasupula <[email protected]>
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.9.0 Automated backport with mergify bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ingest pipelines from cisco modules are causing warning messages in Elasticsearch
3 participants