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

[cisco_ios] Improve parsing groks to better handle generic messages #9102

Merged
merged 5 commits into from Mar 4, 2024

Conversation

taylor-swanson
Copy link
Contributor

@taylor-swanson taylor-swanson commented Feb 8, 2024

Proposed commit message

  • The header of the log is now parsed first. A second grok runs afterwards which will look for the Cisco-mnemonic prefix for the message portion of log. If it is not found, the message will be placed into a temporary field until after Cisco messages have been processed, where it will then be placed back into the 'message' field.
  • Add hit count asserts to system tests
  • Add newlines to sample logs so last entries are not missed by logfile system test

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

cd packages/cisco_ios
elastic-package test

Related issues

- The header of the log is now parsed first. A second grok runs
afterwards which will look for the Cisco-mnemonic prefix for the
message portion of log. If it is not found, the message will be
placed into a temporary field until after Cisco messages have been
processed, where it will then be placed back into the 'message' field.
- Add hit count asserts to system tests
- Add newlines to sample logs so last entries are not missed by
logfile system test
@taylor-swanson taylor-swanson added enhancement New feature or request Integration:CiscoIOS Cisco IOS Team:Security-Deployment and Devices Deployment and Devices Security team labels Feb 8, 2024
@taylor-swanson taylor-swanson self-assigned this Feb 8, 2024
Comment on lines -58 to -62
on_failure:
- append:
field: error.message
value: |-
Processor "{{ _ingest.on_failure_processor_type }}" with tag "{{ _ingest.on_failure_processor_tag }}" in pipeline "{{ _ingest.on_failure_pipeline }}" failed with message "{{ _ingest.on_failure_message }}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this is made redundant by the on_failure handler for the pipeline.

@elasticmachine
Copy link

elasticmachine commented Feb 8, 2024

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@taylor-swanson taylor-swanson marked this pull request as ready for review February 8, 2024 17:22
@taylor-swanson taylor-swanson requested a review from a team as a code owner February 8, 2024 17:22
@elasticmachine
Copy link

Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices)

@taylor-swanson
Copy link
Contributor Author

/test benchmark fullreport

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @taylor-swanson

Copy link

@taylor-swanson taylor-swanson merged commit 6b62417 into elastic:main Mar 4, 2024
5 checks passed
@taylor-swanson taylor-swanson deleted the enhance/cisco-ios-groks branch March 4, 2024 20:43
@elasticmachine
Copy link

Package cisco_ios - 1.26.1 containing this change is available at https://epr.elastic.co/search?package=cisco_ios

gizas pushed a commit that referenced this pull request Mar 13, 2024
…9102)

- The header of the log is now parsed first. A second grok runs
afterwards which will look for the Cisco-mnemonic prefix for the
message portion of log. If it is not found, the message will be
placed into a temporary field until after Cisco messages have been
processed, where it will then be placed back into the 'message' field.
- Add hit count asserts to system tests
- Add newlines to sample logs so last entries are not missed by
logfile system test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:CiscoIOS Cisco IOS Team:Security-Deployment and Devices Deployment and Devices Security team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cisco_ios] Improve log parsing groks to better handle generic messages
3 participants