appsignal / probes-rs

Rust library to read out system stats from a machine running Unix
MIT License
15 stars 2 forks source link

Report memory metrics as percentages #66

Closed tombruijn closed 1 year ago

tombruijn commented 1 year ago

Some metrics we only report as absolute numbers, but let's also try to report them as percentages as possible. Something which is more easy to set alerts on (but not necessarily better!).

To do

⚠️ Important context: https://github.com/appsignal/probes-rs/issues/66#issuecomment-1641676269

tombruijn commented 1 year ago

https://app.intercom.com/a/inbox/yzor8gyw/inbox/shared/all/conversation/16410700221387#part_id=comment-16410700221387-21909527151

tombruijn commented 1 year ago

Looks like we already collect the memory usage as a percentage already, but the calculation is done in the agent:

https://github.com/appsignal/appsignal-agent/blob/9c7aaf0d8397c67e85f41fec19cde0ffe14b302a/agent/src/host_metrics.rs#L208

We should still check if we want to report the other memory states as percentages too.

luismiramirez commented 1 year ago

I just added the free memory metric as a percentage here: https://github.com/appsignal/appsignal-agent/pull/1058

If we're OK with adding the swap > 100% metrics that can also be done. I'm not sure if it'll add much value.