Expose procfs metrics
- Dominant language
- Go
- Stars
- 276
- Forks
- 343
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
/area monitoring
/area networking
/kind feature
/kind good-first-issue
## Expected Behavior
I'd like to see us exporting a number of system stats available from `/proc/...` via opencensus. This includes, but isn't limited to the `/proc/net/sockstat` info we started dumping when our http reverse proxying fails (to try to determine socket exhaustion).
## Actual Behavior
We don't.
## Additional Info
I'd recommend we use something like github.com/prometheus/procfs to reach `/proc` in a structured way, however, it currently lacks `/proc/net/sockstat`. It does however have at least one sibling of `sockstat`, with [good documentation for how to chase down the format of these files](https://github.com/prometheus/procfs/blob/de25ac347ef9305868b04dc42425c973b863b18c/net_softnet.go#L23-L25) for parsing.
I'd recommend that we implement `sockstat` support in `procfs` upstream and then use it (and what's already available) to expose a number of system metrics periodically.
cc @Harwayne @tcnghia @mdemirhan @dprotaso
Contributor guide
Research direction
Start with the linked procfs net_softnet.go example and the /proc/net/sockstat format documentation to understand how procfs parses these files. Investigate adding sockstat support upstream, then review the existing opencensus metrics path in this repository. Done means sockstat and other selected /proc system statistics are exposed periodically as metrics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, prometheus
- Domain
- networking, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100