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_aironet: add ECS mapping for event.severity #11105

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

zmoog
Copy link
Contributor

@zmoog zmoog commented Sep 11, 2024

Proposed commit message

Add ECS mapping for the event.severity field.

If a field has a string value, Elasticsearch maps it as a keyword. This happens even on stack versions 8.13+ because ecs@mappings does not perform type coercion.

According to the sample_event.json file, the event.severity field has a string value, so Elasticsearch maps it as a keyword instead of a long:

    "event": {
        "action": "ENTRY_DELETED",
        "agent_id_status": "verified",
        "dataset": "cisco_aironet.log",
        "ingested": "2023-09-25T17:34:47Z",
        "original": "<134>WLC001: *SISF BT Process: Aug 20 11:25:50.157: %SISF-6-ENTRY_DELETED: sisf_shim_utils.c:482 Entry deleted A=fe80::aee2:d3ff:feba:56a4 V=0 I=wired:1 P=0000 M=",
        "provider": "SISF",
        "severity": "6",
        "timezone": "+00:00"
    }

By adding the event.severity field to the file fields/ecs.yml we ensure it has the expected ECS mapping.

IMPORTANT: To fully resolve the issue, the input/integration owner should update it so that they can use the expected value to leverage ecs@mappings.

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.

Related issues

@zmoog zmoog added Integration:cisco_aironet Cisco Aironet bugfix Pull request that fixes a bug issue labels Sep 11, 2024
@zmoog zmoog self-assigned this Sep 11, 2024
@zmoog zmoog marked this pull request as ready for review September 11, 2024 22:12
@zmoog zmoog requested a review from a team as a code owner September 11, 2024 22:12
@andrewkroh andrewkroh added the Team:Security-Deployment and Devices Deployment and Devices Security team [elastic/sec-deployment-and-devices] label Sep 11, 2024
@elasticmachine
Copy link

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

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
Copy link
Contributor

@taylor-swanson taylor-swanson left a comment

Choose a reason for hiding this comment

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

The pipeline test is failing because it is expecting event.severity to be a long but is currently a string. We could either add a type annotation to the grok or add a convert processor. I don't have strong opinions either way.

  - grok:
      field: _temp_.full_message
      ignore_failure: true
      patterns:
        - "%{DATA:event.provider}-%{INT:event.severity:long}-%{DATA:event.action}: %{DATA}:%{INT} %{GREEDYDATA:message}"
        - "%{DATA:event.provider}-%{INT:event.severity:long}-%{DATA:event.action}: %{GREEDYDATA:message}"

Once that change is made, sample_event and readme also have to be regenerated.

packages/cisco_aironet/changelog.yml Outdated Show resolved Hide resolved
@botelastic
Copy link

botelastic bot commented Oct 23, 2024

Hi! We just realized that we haven't looked into this PR in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Oct 23, 2024
[git-generate]
cd packages/cisco_aironet
elastic-package test pipeline -g && elastic-package test system -v -g && elastic-package build
@botelastic botelastic bot removed the Stalled label Nov 4, 2024
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @zmoog

@andrewkroh
Copy link
Member

@taylor-swanson Can you please take another look. I addressed your comment in b0f92da.

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_aironet Cisco Aironet Team:Security-Deployment and Devices Deployment and Devices Security team [elastic/sec-deployment-and-devices]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants