Skip to content

Add --cgroup.disable-fanotify to force walk-based cgroup discovery#614

Open
lordofire wants to merge 4 commits intocloudflare:masterfrom
lordofire:add-support-for-fanotify-on-mounted-cgroups
Open

Add --cgroup.disable-fanotify to force walk-based cgroup discovery#614
lordofire wants to merge 4 commits intocloudflare:masterfrom
lordofire:add-support-for-fanotify-on-mounted-cgroups

Conversation

@lordofire
Copy link

@lordofire lordofire commented Feb 23, 2026

Adds a --cgroup.disable-fanotify flag so the exporter can run without fanotify-based cgroup discovery. When set, only walk-based discovery is used, and fanotify (and thus CAP_DAC_READ_SEARCH) is not required. Useful on kernels before 6.6, when that capability is unavailable, or when fanotify on the cgroup mount fails.

  • main.go: New flag (default false), passed into the exporter.
  • exporter.go: Pass flag through to cgroup.NewMonitor().
  • cgroup/monitor.go: When flag is true, skip fanotify and use walker; log "fanotify disabled by flag".
  • README.md: New "Cgroup Discovery" section documenting the flag.

@lordofire lordofire changed the title Add support for fanotify on mounted cgroups Add --cgroup.disable-fanotify to force walk-based cgroup discovery Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant