Munin interface graph plugin, 1second accuracy, in rust
  • Rust 95.4%
  • Shell 4.6%
Find a file
2022-12-17 22:37:14 +01:00
.cargo Build fully static using musl. 2022-02-17 11:19:50 +01:00
.github/workflows Use musl target, ensure musl-tools are installed, musl target needs them 2022-05-23 23:29:08 +02:00
.rpm Add building of a basic rpm too 2022-02-16 14:33:36 +01:00
src Use munin-plugin 0.1.14 2022-06-05 14:45:20 +02:00
.gitignore Initial commit 2022-02-11 11:19:37 +01:00
buildall Add small helper to build (release) it all at once, deb and rpm too 2022-02-17 11:21:59 +01:00
Cargo.lock Update dependencies 2022-12-17 22:37:14 +01:00
Cargo.toml Update dependencies 2022-12-17 22:37:14 +01:00
README.md It's generate-rpm and mention musl 2022-02-17 11:46:18 +01:00

if1sec

A munin plugin to collect interface traffic data once every second.

How

The plugin uses the /sys filesystem and reads TX/RX statistics from there. Statistics are read once per second and written to a cachefile, whenever munin asks for the data, the content of the cachefile is send.

Usage

Compile (or load a released binary, if one is there) and put the binary somewhere. Then link it into the munin plugins dir, with a name that ends in _INTERFACE, like if1sec_eth0 to create graphs of the eth0 interface.

When first called without arguments, if1sec will spawn itself into the background to gather data. This can also be triggered by calling it with the acquire parameter.

Local build

Use cargo build as usual. Note that the release build contains much less logging code than the debug build, so if you want to find out, why something does not work as planned, ensure to use a debug build (cargo build instead of cargo build --release).

Musl

Note that I build using musl, as I want fully static binaries. "Normal" rust link against libc, and that may carry symbols that aren't available everywhere (older versions). If you do not have that requirement, not using musl will be fine.

Packages

Note that they do not live up to distribution quality, but they do work for an easy install.

Debian package

A minimal Debian package can be build using cargo deb, provided that you installed this feature (cargo install cargo-deb).

RPM package

A minimal package for RPM based systems can be build using cargo generate-rpm, provided that you installed this feature (cargo install cargo-generate-rpm)