Skip to content

Conversation

@mjwolf
Copy link
Contributor

@mjwolf mjwolf commented Apr 7, 2025

Proposed commit message

In some cases messages with FQDN hostnames were not being parsed properly. The message body and header were not being properly parsed, so some header data (e.g. event.code) was not being parsed. This corrects parsing of these cases.

The problem was the most greedy case of consuming the most of the body into message was hit before the case of properly parsing more header fields, so rearranging the patterns fixes things. This also reduces the number of patterns by combining very similar patterns.

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.
  • [ ] I have verified that any added dashboard complies with Kibana's Dashboard good practices
Cisco hostnames support digits as the first character in the hostname, but this was not supported by the ingest pipeline, causing errors when ingesting documents with such names. This updates the pipeline to properly parse hostnames with a leading digit. This does not allow all-digit hostnames. While this could be a supported Cisco hostname, it causes confustion with the Cisco sequence number in some output formats, as the position of hostname and sequence number can be similar depending on the output format, and the grok patterns will match on both. So this excludes all-digit hostnames to maintain compatibility with all Cisco IOS output formats.
@mjwolf mjwolf requested a review from a team as a code owner April 7, 2025 20:24
@mjwolf mjwolf added Integration:cisco_ios Cisco IOS bugfix Pull request that fixes a bug issue Team:Security-Deployment and Devices DEPRECATED Deployment and Devices Security team [elastic/sec-deployment-and-devices] labels Apr 7, 2025
@elasticmachine
Copy link

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

@mjwolf mjwolf force-pushed the cisco_ios_hostname branch from a4b2ed0 to 82b5566 Compare April 8, 2025 04:23
@mjwolf mjwolf force-pushed the cisco_ios_hostname branch from 82b5566 to c5d2971 Compare April 8, 2025 04:25
@mjwolf mjwolf enabled auto-merge (squash) April 8, 2025 04:26
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@mjwolf mjwolf disabled auto-merge April 8, 2025 16:05
@mjwolf mjwolf changed the title [cisco_ios] Allow parsing of hostnames with leading digits [cisco_ios] Fix parsing of hostnames with leading digits and FQDN hostnames Apr 8, 2025
@mjwolf mjwolf enabled auto-merge (squash) April 8, 2025 20:53
@mjwolf mjwolf changed the title [cisco_ios] Fix parsing of hostnames with leading digits and FQDN hostnames [cisco_ios] Fix parsing of FQDN hostnames Apr 9, 2025
@mjwolf mjwolf requested review from ilyannn and qcorporation April 9, 2025 23:16
@mjwolf mjwolf requested a review from qcorporation April 11, 2025 16:40
@elasticmachine
Copy link

💚 Build Succeeded

History

Copy link
Contributor

@qcorporation qcorporation left a comment

Choose a reason for hiding this comment

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

Thanks for the updates

@mjwolf mjwolf merged commit 4012174 into elastic:main Apr 11, 2025
7 checks passed
@elastic-vault-github-plugin-prod

Package cisco_ios - 1.30.1 containing this change is available at https://epr.elastic.co/package/cisco_ios/1.30.1/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:cisco_ios Cisco IOS Team:Security-Deployment and Devices DEPRECATED Deployment and Devices Security team [elastic/sec-deployment-and-devices]

4 participants