Repository navigation
[probes.system] Add a system probe that exports machine metrics - #1183
Merged
Merged
Conversation
manugarg
force-pushed
the
system_probe
branch
from
December 8, 2025 20:42
a0827a5 to
123f12e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a new native
SYSTEMprobe type to Cloudprober. This probe collects system-level metrics (CPU, Memory, Disk, Network, etc.) directly from the underlying OS (Linux/procfilesystem and syscalls) without requiring external agents or dependencies likegopsutil.The system probe is enabled by default to provide immediate value out-of-the-box, but can be disabled via a command-line flag (
--disable_sys_metrics) or configured explicitly.Changes
New Probe:
probes/systemProbestruct and interface./proc/net/dev).GAUGE(snapshot values like memory/load) andCUMULATIVE(monotonic counters like network/disk I/O).To be added:
- Memory: Total, free, available, buffers, and cached memory (from
/proc/meminfo).- Disk Usage: Total, free, used bytes and percentage for root volume (via
syscall.Statfs).- Disk I/O: Read/write bytes and counts per device (from
/proc/diskstats).Example Configuration
The probe runs automatically, but can be customized:
probe { name: "sys_metrics" type: SYSTEM interval: "1m" system_probe { disable_net_dev_stats: true } }