elastic / integrations

Elastic Integrations
https://www.elastic.co/integrations
Other
30 stars 447 forks source link

crowdstrike.falcon: Fix Falcon Overview dashboard errors. #11739

Closed kcreddy closed 1 day ago

kcreddy commented 1 week ago

Proposed commit message

crowdstrike.falcon data-stream doesn't set host.hostname unlike crowdstrike.alert or crowdstrike.host. But it uses host.hostname in Falcon Overview dashboard, which leads to empty data.

Fixes made to Falcon Overview dashboard:

[!NOTE] host.name is used instead of host.hostname due to following reasons:

  1. As per ECS definitions, host.name can contain a more generic hostname and applies to several cases, rather than host.hostname which should contain what hostname command returns which may not be always available in the event.
  2. host.name presence is more within Security Solution, such as in Hosts flyout.
  3. host.name:repo:elastic/detection-rules path:/^rules\// /host\.name/ is also widely used in Detection Rules than host.hostname: repo:elastic/detection-rules path:/^rules\// /host\.hostname/

Checklist

How to test this PR locally

  1. Run system tests with --defer-cleanup 30m elastic-package stack down && elastic-package build && elastic-package stack up --version=8.13.0 -d -v && eval "$(elastic-package stack shellinit)" && elastic-package test system --generate -v --defer-cleanup 30m --data-streams=falcon
  2. Navigate to local Kibana and check if the Flacon Overview dashboard is fixed.
  3. Terminate the waiting system test run.
  4. Check system tests are successful.
    --- Test results for package: crowdstrike - START ---
    ╭─────────────┬─────────────┬───────────┬───────────┬────────┬───────────────╮
    │ PACKAGE     │ DATA STREAM │ TEST TYPE │ TEST NAME │ RESULT │  TIME ELAPSED │
    ├─────────────┼─────────────┼───────────┼───────────┼────────┼───────────────┤
    │ crowdstrike │ falcon      │ system    │ logfile   │ PASS   │ 36.104079292s │
    ╰─────────────┴─────────────┴───────────┴───────────┴────────┴───────────────╯
    --- Test results for package: crowdstrike - END   ---
    Done

Related issues

Screenshots

Before:

Screenshot 2024-11-14 at 3 05 32 PM Screenshot 2024-11-14 at 3 06 14 PM

After:

Screenshot 2024-11-14 at 3 23 40 PM
elasticmachine commented 1 week ago

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

kcreddy commented 1 day ago

I'm able to replicate the filter issue and see it fixed by this, but cannot replicate the issue with the table with the system test cases. Could we have some additional test cases that exercise the dashboards?

@efd6, the screenshot is taken from running system tests sample. I think the table is probably not visible due to timestamp filter. Last 10 years worked for me. Let me know if I have to adjust the timestamps in the log samples.

Resolved the conflicts.

elastic-vault-github-plugin-prod[bot] commented 1 day ago

:rocket: Benchmarks report

To see the full report comment with /test benchmark fullreport

elastic-sonarqube[bot] commented 1 day ago

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
98.6% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube

elasticmachine commented 1 day ago

:green_heart: Build Succeeded

History

cc @kcreddy

elastic-vault-github-plugin-prod[bot] commented 1 day ago

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