in_node_exporter_metrics: add new option 'path.rootfs' - #10723
Conversation
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
WalkthroughIntroduces path.rootfs support to the in_node_exporter_metrics plugin, adds rootfs-based path composition for procfs/sysfs/textfile, updates docker-compose to use path.rootfs with a host root mount, adds a minor error log, and inserts non-functional comments and formatting changes. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant FluentBit
participant in_node_exporter_metrics
participant HostFS
User->>FluentBit: Configure path.rootfs=/host
FluentBit->>in_node_exporter_metrics: Initialize plugin
in_node_exporter_metrics->>in_node_exporter_metrics: Compose procfs/sysfs/textfile paths with path.rootfs
in_node_exporter_metrics->>HostFS: Read /host/proc, /host/sys, textfiles
HostFS-->>in_node_exporter_metrics: Metrics data
in_node_exporter_metrics-->>FluentBit: Emit metrics
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
🧰 Additional context used🧬 Code Graph Analysis (1)plugins/in_node_exporter_metrics/ne_config.c (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (22)
🔇 Additional comments (8)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This PR fixes #10650
This PR introduces a new
path.rootfsconfiguration parameter to thenode_exporter_metricsinput plugin, simplifying containerized deployments by allowing users to specify a single root filesystem mount point instead of mounting /proc and /sys separately.Changes Made
Plugin Configuration:
e.g:
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Summary by CodeRabbit