Podman metrics

The Podman metrics input plugin lets Fluent Bit gather Podman container metrics. The procedure for collecting container list and gathering data associated with them is based on filesystem data.

The metrics can be exposed later as, for example, Prometheus counters and gauges.

Configuration parameters

Key
Description
Default

scrape_interval

Interval between each scrape of Podman data (in seconds).

30

scrape_on_start

Sets whether this plugin scrapes Podman data on startup.

false

path.config

Custom path to the Podman containers configuration file.

/var/lib/containers/storage/overlay-containers/containers.json

path.sysfs

Custom path to the sysfs subsystem directory.

/sys/fs/cgroup

path.procfs

Custom path to the proc subsystem directory.

/proc

threaded

Indicates whether to run this input in its own thread.

false

Get started

This plugin doesn't execute podman commands or send HTTP requests to Podman API. It reads a Podman configuration file and metrics exposed by the /sys and /proc filesystems.

This plugin supports and automatically detects both cgroups v1 and v2.

Example curl message for one running container

You can run the following curl command:

curl 0.0.0.0:2021/metrics

Which returns information like:

Configuration file

Command line

Exposed metrics

Currently supported counters are:

  • container_memory_usage_bytes

  • container_memory_max_usage_bytes

  • container_memory_rss

  • container_spec_memory_limit_bytes

  • container_cpu_user_seconds_total

  • container_cpu_usage_seconds_total

  • container_network_receive_bytes_total

  • container_network_receive_errors_total

  • container_network_transmit_bytes_total

  • container_network_transmit_errors_total

This plugin mimics the naming convention of Docker metrics exposed by cadvisor.

Last updated

Was this helpful?