add some initial support for cgroups v2. Not all the stats
supported on cgroups v1 are supported, e.g. it is not possible to read
percpu usage.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
PerDiskStats reported from cgroups were not being surfaced into
prometheus. In order to properly correlate the metrics, we need to
assign a device label to each metric (which is the FS or device path).
Since blkio cgroup tracks devices, we create a synthetic device
`/dev/NAME` for the metric.
Assign a Device label to each PerDiskStat for the handlers up front, and
then surface the PerDiskStat values into the prometheus metrics. Report
two new metrics - total bytes read and total bytes written.
- Pull out the root container cases, since they're only relevant in the
raw container handler
- Pass parameters rather than depending on AbstractContainerInterface