Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tiny Rust exporter that scrapes low-level Linux metrics; Prometheus-ready

Notifications You must be signed in to change notification settings

Paulius0112/proctap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proctap — tiny Linux host metrics exporter (Rust + axum + Prometheus)

proctap scrapes high-signal, low-overhead metrics straight from /proc and /sys, and exposes them at GET /metrics for Prometheus scraping. Built in Rust with axum and the Prometheus client crate.


Features

  • diskstat — Block device I/O stats from /sys/class/block//stat.
  • ethtool — Driver/firmware NIC counters via ethtool -S <iface>.
  • interrupts — IRQ distribution from /proc/interrupts (per IRQ × CPU).
  • memstat — Memory info from /proc/meminfo.
  • netdev_stat — Per-interface NIC stats from /sys/class/net//statistics/*.
  • proc — Process scheduler stats from /proc//sched (per matching process).
  • queues — Per-queue NIC sysfs values from /sys/class/net//queues/{rx,tx}-*/.
  • snmp — Kernel TCP/UDP/IP counters from /proc/net/snmp.
  • softirqs — SoftIRQ totals from /proc/softirqs (per CPU).
  • softnet_stat — Per-CPU networking backlog stats from /proc/net/softnet_stat.

Quick start

1) Build & run (host)

# Requires Rust (stable)
cargo build --release

# Run the exporter
./target/release/proctap \
  --interval 5 \
  --proc-prefixes ping

Scrape at: http://<host>:9000/metrics.

Finding the right --proc-prefixes: it matches Linux comm (truncated to 15 chars). Check with: cat /proc/<PID>/comm Example: if you run ping 127.0.0.1, the comm is likely ping.


CLI

Flag Default Description
--interval 5 Collection interval (seconds).
--proc-prefixes (none) Match comm; exporter publishes per-PID metrics for that process.
--monitor (optional) Comma-separated subset, e.g. sched,net,disks,interrupts,meminfo.

Note: Linux truncates comm to 15 chars.


About

Tiny Rust exporter that scrapes low-level Linux metrics; Prometheus-ready

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published