Skip to content

Support for monitoring multiple podman.sock files #400

@makondes2

Description

@makondes2

Is your feature request related to a problem? Please describe.
Currently, the prometheus-podman-exporter can only connect to and expose metrics for a single Podman socket (podman.sock). This limitation forces us to deploy a separate instance of the exporter for each user or Podman instance we want to monitor on the same host.

This approach introduces several issues:

Resource Overhead: Running multiple containers or processes for the same exporter increases resource consumption (CPU, RAM).

Management Complexity: Managing systemd services or containers becomes more complicated, as each Podman instance requires a unique service configuration.

Prometheus Configuration: The Prometheus configuration file (prometheus.yml) grows verbose and repetitive, requiring a distinct scrape_job entry for each exporter instance.

The core problem is the lack of a simple and efficient way to monitor a multi-user or multi-instance Podman environment from a single point.

Describe the solution you'd like
I would like to see a feature that allows a single instance of the prometheus-podman-exporter to monitor metrics from multiple Podman sockets simultaneously.

Potential implementations could include:

Accepting a list of socket paths via a command-line argument (e.g., --podman.sockets=/path/to/socket1,/path/to/socket2).

Supporting a configuration file to specify these paths.

Additionally, it would be essential for the exporter to add a label to the collected metrics (e.g., podman_instance="user1" or podman_socket="/path/to/socket1") to clearly distinguish the source of each metric in Prometheus.

Additional context
In environments where multiple users or applications share a single machine running Podman, this feature would greatly simplify monitoring. Instead of deploying and managing multiple exporter instances, we could maintain just one, significantly reducing complexity and resource usage. This enhancement would make prometheus-podman-exporter a more scalable and versatile tool for multi-user systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions