Add getting metrics to runtime interface
Opened this issue · 0 comments
hidalgopl commented
Getting metrics for system and unit should be abstracted, so it can be implemented for each runtime.
Currently, there are two exported functions in pkg/metrics/metrics.go
: GetSystemMetrics
& GetUnitMetrics
.
Those two are used in /rest/v1/status
handler directly. Instead, we can have a pod controller method, which will get system & unit metrics, using runtime interface method(s).
While getting system metrics could be the same for different runtimes, getting unit metrics will vary.
With podman runtime, metrics can be get via podman stats
command.