Skip to content

Add env variables to podman_container_info #295

@dmennecke1

Description

@dmennecke1

We would love to list the container environment variables in Grafana using Prometheus as a datasource. When running podman_container_info{name="db"} i get

podman_container_info{id="50bd8e611a8e", image="localhost/postgres:latest", instance="localhost:9882", job="ppe", name="db", pod_id="0070d18cd8ab", pod_name="msx", ports="0.0.0.0:4201->420/tcp"}

Is there a way to add the env variables (e.g. coming from podman run -e) like so:

podman_container_info{id="50bd8e611a8e", image="localhost/postgres:latest", instance="localhost:9882", job="ppe", name="db", pod_id="0070d18cd8ab", pod_name="msx", ports="0.0.0.0:4201->420/tcp", env_vars="{db_name:'postgres', db_version: 1}"}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions