Skip to content

[auditbeat][fim] Update Auditbeat file_integrity module to default to auto backend with intelligent fallback#47498

Merged
marc-gr merged 12 commits intoelastic:mainfrom
marc-gr:feat/fim-auto-backend
Apr 8, 2026
Merged

[auditbeat][fim] Update Auditbeat file_integrity module to default to auto backend with intelligent fallback#47498
marc-gr merged 12 commits intoelastic:mainfrom
marc-gr:feat/fim-auto-backend

Conversation

@marc-gr
Copy link
Copy Markdown
Contributor

@marc-gr marc-gr commented Nov 6, 2025

Proposed commit message

The auto backend option now tries the backends in order until the best available option is found

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@marc-gr marc-gr requested review from a team as code owners November 6, 2025 09:22
@marc-gr marc-gr added enhancement docs Auditbeat backport-skip Skip notification from the automated backport with mergify Team:Security-Linux Platform Linux Platform Team in Security Solution labels Nov 6, 2025
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 6, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 6, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 6, 2025

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify mergify Bot assigned marc-gr Nov 6, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 6, 2025

@marc-gr marc-gr marked this pull request as draft November 6, 2025 09:45
@marc-gr marc-gr marked this pull request as ready for review November 6, 2025 11:10
Comment thread auditbeat/module/file_integrity/ebpfreader_supported.go
Copy link
Copy Markdown
Contributor

@nicholasberlin nicholasberlin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@colleenmcginnis colleenmcginnis left a comment

Choose a reason for hiding this comment

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

I left some suggestions below on how to structure cumulative documentation.

Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8c44f2bc-ecd0-4e2c-a923-70e17b8584aa

📥 Commits

Reviewing files that changed from the base of the PR and between 0bd2296 and 6cd36d1.

📒 Files selected for processing (2)
  • auditbeat/module/file_integrity/_meta/docs.md
  • docs/reference/auditbeat/auditbeat-module-file_integrity.md

📝 Walkthrough

Walkthrough

The file_integrity module's backend default changed from fsnotify to auto. A centralized event-reader initialization layer was added that selects backends by platform-specific priority (Linux: ebpf → kprobes → fsnotify; Windows: etw → fsnotify; others: fsnotify) and tries initializers in order. Backend initializers now perform upfront availability checks and return errors early. Validation now checks against supportedBackends. Platform-specific eventreader_*.go files provide autoBackendOrder and supportedBackends mappings. Tests, docs, and reference YAMLs were updated accordingly.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR implements all core objectives from #46690: auto backend with platform-specific preferences (Linux: eBPF→kprobes→fsnotify; Windows: ETW→fsnotify) and explicit backend selection without fallback.
Out of Scope Changes check ✅ Passed All changes align with auto backend implementation: config updates, backend initialization refactoring, documentation, tests, and changelog are in scope.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

@marc-gr marc-gr requested a review from colleenmcginnis March 30, 2026 08:52
@marc-gr marc-gr removed the request for review from colleenmcginnis March 31, 2026 11:28
@marc-gr marc-gr added docs and removed docs labels Mar 31, 2026
@marc-gr
Copy link
Copy Markdown
Contributor Author

marc-gr commented Apr 1, 2026

cc @elastic/ingest-docs please if anyone can take a look

Copy link
Copy Markdown
Contributor

@alexandra5000 alexandra5000 left a comment

Choose a reason for hiding this comment

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

LGTM with some minor changes 🙂

Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Copy link
Copy Markdown
Member

@vishaangelova vishaangelova left a comment

Choose a reason for hiding this comment

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

Some suggestions to update the applies_to badges with the syntax for version ranges.

Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@auditbeat/module/file_integrity/_meta/docs.md`:
- Around line 103-104: The Linux backend applicability is inconsistent: the
block showing "{applies_to}`stack: preview 9.4.0+` `auto`" conflicts with the
other occurrence that marks Linux `auto` as GA; update this snippet so the Linux
backend uses the same GA applicability range as the other reference (replace the
preview applicability for `auto` with the GA range used elsewhere), ensuring the
two lines that mention `{applies_to}`stack: preview 9.4.0+` `auto`` and
`{applies_to}`stack: ga 9.0.0-9.3` `fsnotify`` are aligned and consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a26faf8a-e57a-415f-9945-a0cdb2b82156

📥 Commits

Reviewing files that changed from the base of the PR and between c98434e and 0bd2296.

📒 Files selected for processing (2)
  • auditbeat/module/file_integrity/_meta/docs.md
  • docs/reference/auditbeat/auditbeat-module-file_integrity.md

Comment thread auditbeat/module/file_integrity/_meta/docs.md Outdated
Copy link
Copy Markdown
Member

@vishaangelova vishaangelova left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

Auditbeat backport-skip Skip notification from the automated backport with mergify docs enhancement Team:Security-Linux Platform Linux Platform Team in Security Solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[auditbeat][fim] Improve handling of backend choice

6 participants