Skip to content

Conversation

@mohitjha-elastic
Copy link
Collaborator

@mohitjha-elastic mohitjha-elastic commented Mar 31, 2025

Proposed Commit Message

cisco_meraki: Extended ECS Field Support in Event Pipeline and Improved DHCP Event Parsing with Grok Pattern

Enhanced the event pipeline to populate client.mac and source.ip ECS fields for specific event types that were previously missing from the pipeline.

Addressed pipeline errors in the Meraki integration by adding a Grok pattern to handle cases where Meraki MX logs contain events without DHCP offers. This ensures smooth parsing for all event types.

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

Clone integrations repo.
Install the elastic package locally.
Start the elastic stack using the elastic package.
Move to integrations/packages/cisco_meraki directory.
Run the following command to run tests.
elastic-package test -v

Related issues

@mohitjha-elastic mohitjha-elastic requested a review from a team as a code owner March 31, 2025 10:21
@mohitjha-elastic mohitjha-elastic self-assigned this Mar 31, 2025
@mohitjha-elastic mohitjha-elastic added Integration:cisco_meraki Cisco Meraki bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:Sit-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] labels Mar 31, 2025
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

Comment on lines +50 to +51
<134>1 1736917251.802993170 game_Office_DMC_47_Floor events type=disassociation radio='1' vap='0' client_mac='E4-F4-18-79-1F-E1' band='5' channel='161' reason='1' da_vendor='none' duration='1869.922025769' auth_neg_dur='0.142860677' last_auth_ago='1869.779207384' is_8021x='1' full_conn='0.317524167' ip_resp='0.317524167' ip_src='89.160.20.112' http_resp='56.027654771' arp_resp='0.179391823' arp_src='20.22.20.157' dns_server='20.142.20.250' dns_req_rtt='0.002535260' dns_resp='0.289948906' identity='xxxx_xxx' aid='401480346'
<134>1 1736917275.649842796 game_Office_DMC_47_Floor events type=disassociation radio='1' vap='0' client_mac='E4-F4-18-79-1F-E1' band='5' channel='161' reason='1' da_vendor='none' duration='31.22725353' auth_neg_dur='0.012057865' last_auth_ago='31.152091238' is_8021x='1' full_conn='12.115982391' ip_resp='12.115982391' ip_src='89.160.20.112' arp_resp='0.241727656' arp_src='20.22.20.39' identity='xxxx_xxx' aid='1607913618'
Copy link
Contributor

Choose a reason for hiding this comment

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

Whats changed between these events and the ones described in the enhancement issue?
They don't seem to match exactly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No major changes were made- only the values of mac, and ip_src were updated to the Elastic test IP, and a priority number was added at the beginning.

- rename:
field: cisco_meraki.{{{cisco_meraki.event_subtype}}}.client_mac
target_field: client.mac
if: ctx.cisco_meraki?.event_subtype != null && ['dfs_event', 'association', 'disassociation', 'aps_association_reject', 'multiple_dhcp_servers_detected', 'wpa_deauth', 'wpa_auth', '8021x_eap_failure', '8021x_auth', '8021x_deauth', '8021x_eap_success', 'splash_auth', 'device_packet_flood'].contains(ctx.cisco_meraki.event_subtype)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this list is correct. For example, for splash_auth, the field is called mac and its already handled else where. Please verify them all.
Same for below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kcreddy I verified that client.mac was only set for splash_auth events hence removed it from this list.
For the ip_src field, none of the events are mapped to the source.ip.
Therefore, if the client_mac and ip_src fields appear in any of these events, they will be mapped to the corresponding ECS fields.

Remove splash_auth from the list while setting client.mac.
@mohitjha-elastic mohitjha-elastic requested a review from kcreddy April 2, 2025 11:01
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @mohitjha-elastic

@kcreddy
Copy link
Contributor

kcreddy commented Apr 2, 2025

@mohitjha-elastic, can you expand on the commit message please, instead of this oneliner?
Extend the event pipeline with some ECS fields and a Grok pattern to improve DHCP event parsing.

Example: #13298 (comment)

@mohitjha-elastic
Copy link
Collaborator Author

@mohitjha-elastic, can you expand on the commit message please, instead of this oneliner? Extend the event pipeline with some ECS fields and a Grok pattern to improve DHCP event parsing.

Example: #13298 (comment)

@kcreddy Thanks, I have updated the commit message.
Can you please confirm if we need to follow this in all upcoming PRs?

@kcreddy
Copy link
Contributor

kcreddy commented Apr 3, 2025

Thanks, I have updated the commit message.
Can you please confirm if we need to follow this in all upcoming PRs?

@mohitjha-elastic, thank you! Yes that will be great.

@kcreddy kcreddy merged commit b8605a5 into elastic:main Apr 3, 2025
7 checks passed
@elastic-vault-github-plugin-prod

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

flexitrev pushed a commit that referenced this pull request Apr 3, 2025
…#13358) cisco_meraki: Extended ECS Field Support in Event Pipeline and Improved DHCP Event Parsing with Grok Pattern Enhanced the event pipeline to populate client.mac and source.ip ECS fields for specific event types that were previously missing from the pipeline. Addressed pipeline errors in the Meraki integration by adding a Grok pattern to handle cases where Meraki MX logs contain events without DHCP offers. This ensures smooth parsing for all event types.
@mohitjha-elastic mohitjha-elastic deleted the cisco_meraki-1.28.1 branch May 15, 2025 07:23
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_meraki Cisco Meraki Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:Sit-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors]

3 participants