{"id":18497818,"url":"https://github.com/containers/prometheus-podman-exporter","last_synced_at":"2025-04-04T22:06:37.415Z","repository":{"id":41395361,"uuid":"507939057","full_name":"containers/prometheus-podman-exporter","owner":"containers","description":"Prometheus exporter for podman environments exposing containers, pods, images, volumes and networks information.","archived":false,"fork":false,"pushed_at":"2024-10-30T01:00:59.000Z","size":27596,"stargazers_count":136,"open_issues_count":4,"forks_count":23,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-10-30T03:50:51.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/containers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-27T14:19:26.000Z","updated_at":"2024-10-30T01:00:57.000Z","dependencies_parsed_at":"2023-11-14T01:35:20.637Z","dependency_job_id":"a462bd8d-8c78-4271-9d22-a0072a541940","html_url":"https://github.com/containers/prometheus-podman-exporter","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containers%2Fprometheus-podman-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containers%2Fprometheus-podman-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containers%2Fprometheus-podman-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containers%2Fprometheus-podman-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/containers","download_url":"https://codeload.github.com/containers/prometheus-podman-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256112,"owners_count":20909240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T13:36:04.348Z","updated_at":"2025-04-04T22:06:37.399Z","avatar_url":"https://github.com/containers.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prometheus-podman-exporter\n\n![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/containers/prometheus-podman-exporter)\n[![Go Report](https://img.shields.io/badge/go%20report-A%2B-brightgreen.svg)](https://goreportcard.com/report/github.com/containers/prometheus-podman-exporter)\n![Go](https://github.com/containers/prometheus-podman-exporter/workflows/Go/badge.svg)\n\nPrometheus exporter for podman environment exposing containers, pods, images, volumes and networks information.\n\nprometheus-podman-exporter uses the podman (libpod) library to fetch the statistics and therefore no need to enable podman.socket service unless using the container image.\n\n- [**Compatibility matrix**](#compatibility-matrix-with-podman)\n- [**Installation**](#installation)\n- [**Usage and Options**](#usage-and-options)\n- [**Collectors**](#collectors)\n- [**License**](#license)\n\n## Compatibility matrix\n\n| Exporter  | Podman |\n| --------- | ------ |\n| \u003e= 1.11.y | v5.x.y |\n| \u003c= 1.10.x | v4.x.y |\n\n## Installation\n\nBuilding from source, using container image or installing packaged versions are detailed in [install guide](install.md).\n\n## Usage and Options\n\n```shell\nUsage:\n  prometheus-podman-exporter [flags]\n\nFlags:\n  -t, --collector.cache_duration int          Duration (seconds) to retrieve container, size and refresh the cache. (default 3600)\n  -a, --collector.enable-all                  Enable all collectors by default.\n      --collector.enhance-metrics             enhance all metrics with the same field as for their podman_\u003c...\u003e_info metrics.\n  -i, --collector.image                       Enable image collector.\n  -n, --collector.network                     Enable network collector.\n  -o, --collector.pod                         Enable pod collector.\n  -b, --collector.store_labels                Convert pod/container/image labels on prometheus metrics for each pod/container/image.\n  -s, --collector.system                      Enable system collector.\n  -v, --collector.volume                      Enable volume collector.\n  -w, --collector.whitelisted_labels string   Comma separated list of pod/container/image labels to be converted\n                                              to labels on prometheus metrics for each pod/container/image.\n                                              collector.store_labels must be set to false for this to take effect.\n  -d, --debug                                 Set log level to debug.\n  -h, --help                                  help for prometheus-podman-exporter\n      --version                               Print version and exit.\n      --web.config.file string                [EXPERIMENTAL] Path to configuration file that can enable TLS or authentication.\n  -e, --web.disable-exporter-metrics          Exclude metrics about the exporter itself (promhttp_*, process_*, go_*).\n  -l, --web.listen-address string             Address on which to expose metrics and web interface. (default \":9882\")\n  -m, --web.max-requests int                  Maximum number of parallel scrape requests. Use 0 to disable (default 40)\n  -p, --web.telemetry-path string             Path under which to expose metrics. (default \"/metrics\")\n```\n\nBy default only container collector is enabled, in order to enable all collectors use `--collector.enable-all` or use `--collector.enable-\u003cname\u003e` flag to enable other collector.\n\n`Example:` enable all available collectors:\n\n```shell\n$ ./bin/prometheus-podman-exporter --collector.enable-all\n```\n\nThe exporter uses plain HTTP without any form of authentication to expose the metrics by default.\nUse `--web.config.file` with a configuration file to use TLS for confidentiality and/or to enable authentication.\nVisit [this page](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md) for more information about the syntax of the configuration file.\n\n## Collectors\nThe table below list all existing collector and their description.\n\n| Name      | Description |\n| --------- | ----------- |\n| container | exposes containers information\n| image     | exposes images information\n| network   | exposes networks information\n| pod       | exposes pod information\n| volume    | exposes volume information\n| system    | exposes system (host) information\n\n### Collectors examples output\n\n#### `container`\n\n```shell\n# HELP podman_container_info Container information.\n# TYPE podman_container_info gauge\npodman_container_info{id=\"19286a13dc23\",image=\"docker.io/library/sonarqube:latest\",name=\"sonar01\",pod_id=\"\",pod_name=\"\",ports=\"0.0.0.0:9000-\u003e9000/tcp\"} 1\npodman_container_info{id=\"482113b805f7\",image=\"docker.io/library/httpd:latest\",name=\"web_server\",pod_id=\"\",pod_name=\"\",ports=\"0.0.0.0:8000-\u003e80/tcp\"} 1\n\n# HELP podman_container_state Container current state (-1=unknown,0=created,1=initialized,2=running,3=stopped,4=paused,5=exited,6=removing,7=stopping).\n# TYPE podman_container_state gauge\npodman_container_state{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 2\npodman_container_state{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 4\n\n# HELP podman_container_health Container current health (-1=unknown,0=healthy,1=unhealthy,2=starting).\n# TYPE podman_container_health gauge\npodman_container_health{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} -1\npodman_container_health{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_block_input_total Container block input.\n# TYPE podman_container_block_input_total counter\npodman_container_block_input_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 49152\npodman_container_block_input_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_block_output_total Container block output.\n# TYPE podman_container_block_output_total counter\npodman_container_block_output_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 1.790976e+06\npodman_container_block_output_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 8192\n\n# HELP podman_container_cpu_seconds_total total CPU time spent for container in seconds.\n# TYPE podman_container_cpu_seconds_total counter\npodman_container_cpu_seconds_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 83.231904\npodman_container_cpu_seconds_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0.069712\n\n# HELP podman_container_cpu_system_seconds_total total system CPU time spent for container in seconds.\n# TYPE podman_container_cpu_system_seconds_total counter\npodman_container_cpu_system_seconds_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 0.007993418\npodman_container_cpu_system_seconds_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 4.8591e-05\n\n# HELP podman_container_created_seconds Container creation time in unixtime.\n# TYPE podman_container_created_seconds gauge\npodman_container_created_seconds{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 1.655859887e+09\npodman_container_created_seconds{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 1.655859728e+09\n\n# HELP podman_container_started_seconds Container started time in unixtime.\n# TYPE podman_container_started_seconds gauge\npodman_container_started_seconds{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 1.659253804e+09\npodman_container_started_seconds{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 1.659253804e+09\n\n# HELP podman_container_exit_code Container exit code, if the container has not exited or restarted then the exit code will be 0.\n# TYPE podman_container_exit_code gauge\npodman_container_exit_code{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 130\npodman_container_exit_code{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_exited_seconds Container exited time in unixtime.\n# TYPE podman_container_exited_seconds gauge\npodman_container_exited_seconds{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 1.659253805e+09\npodman_container_exited_seconds{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 1.659253805e+09\n\n# HELP podman_container_mem_limit_bytes Container memory limit.\n# TYPE podman_container_mem_limit_bytes gauge\npodman_container_mem_limit_bytes{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 9.713655808e+09\npodman_container_mem_limit_bytes{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 9.713655808e+09\n\n# HELP podman_container_mem_usage_bytes Container memory usage.\n# TYPE podman_container_mem_usage_bytes gauge\npodman_container_mem_usage_bytes{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 1.029062656e+09\npodman_container_mem_usage_bytes{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 2.748416e+06\n\n# HELP podman_container_net_input_dropped_total Container network input dropped.\n# TYPE podman_container_net_input_dropped_total counter\npodman_container_net_input_dropped_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 0\npodman_container_net_input_dropped_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_net_input_errors_total Container network input errors.\n# TYPE podman_container_net_input_errors_total counter\npodman_container_net_input_errors_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 0\npodman_container_net_input_errors_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_net_input_packets_total Container network input packets.\n# TYPE podman_container_net_input_packets_total counter\npodman_container_net_input_packets_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 26\npodman_container_net_input_packets_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_net_input_total Container network input.\n# TYPE podman_container_net_input_total counter\npodman_container_net_input_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 2060\npodman_container_net_input_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_net_output_dropped_total Container network output dropped.\n# TYPE podman_container_net_output_dropped_total counter\npodman_container_net_output_dropped_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 0\npodman_container_net_output_dropped_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_net_output_errors_total Container network output errors.\n# TYPE podman_container_net_output_errors_total counter\npodman_container_net_output_errors_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 0\npodman_container_net_output_errors_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_net_output_packets_total Container network output packets.\n# TYPE podman_container_net_output_packets_total counter\npodman_container_net_output_packets_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 13\npodman_container_net_output_packets_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_net_output_total Container network output.\n# TYPE podman_container_net_output_total counter\npodman_container_net_output_total{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 978\npodman_container_net_output_total{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 0\n\n# HELP podman_container_pids Container pid number.\n# TYPE podman_container_pids gauge\npodman_container_pids{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 94\npodman_container_pids{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 82\n\n# HELP podman_container_rootfs_size_bytes Container root filesystem size in bytes.\n# TYPE podman_container_rootfs_size_bytes gauge\npodman_container_rootfs_size_bytes{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 1.452382e+06\npodman_container_rootfs_size_bytes{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 1.135744e+06\n\n# HELP podman_container_rw_size_bytes Container top read-write layer size in bytes.\n# TYPE podman_container_rw_size_bytes gauge\npodman_container_rw_size_bytes{id=\"19286a13dc23\",pod_id=\"\",pod_name=\"\"} 26261\npodman_container_rw_size_bytes{id=\"482113b805f7\",pod_id=\"\",pod_name=\"\"} 3551\n```\n\n#### `pod`\n\n```shell\n# HELP podman_pod_state Pods current state current state (-1=unknown,0=created,1=error,2=exited,3=paused,4=running,5=degraded,6=stopped).\n# TYPE podman_pod_state gauge\npodman_pod_state{id=\"3e8bae64e9af\"} 5\npodman_pod_state{id=\"959a0a3530db\"} 0\npodman_pod_state{id=\"d05cda23085a\"} 2\n\n# HELP podman_pod_info Pod information\n# TYPE podman_pod_info gauge\npodman_pod_info{id=\"3e8bae64e9af\",infra_id=\"dda983cc3ecf\",name=\"pod01\"} 1\npodman_pod_info{id=\"959a0a3530db\",infra_id=\"22e3d69be889\",name=\"pod02\"} 1\npodman_pod_info{id=\"d05cda23085a\",infra_id=\"390ac740fa80\",name=\"pod03\"} 1\n\n# HELP podman_pod_containers Number of containers in a pod.\n# TYPE podman_pod_containers gauge\npodman_pod_containers{id=\"3e8bae64e9af\"} 2\npodman_pod_containers{id=\"959a0a3530db\"} 1\npodman_pod_containers{id=\"d05cda23085a\"} 1\n\n# HELP podman_pod_created_seconds Pods creation time in unixtime.\n# TYPE podman_pod_created_seconds gauge\npodman_pod_created_seconds{id=\"3e8bae64e9af\"} 1.655859839e+09\npodman_pod_created_seconds{id=\"959a0a3530db\"} 1.655484892e+09\npodman_pod_created_seconds{id=\"d05cda23085a\"} 1.655489348e+09\n```\n\n#### `image`\n\n```shell\n# HELP podman_image_info Image information.\n# TYPE podman_image_info gauge\npodman_image_info{id=\"48565a8e6250\",parent_id=\"\",repository=\"docker.io/bitnami/prometheus\",tag=\"latest\",digest=\"sha256:4d7fdebe2a853aceb15019554b56e58055f7a746c0b4095eec869d5b6c11987e\"} 1\npodman_image_info{id=\"62aedd01bd85\",parent_id=\"\",repository=\"docker.io/library/busybox\",tag=\"latest\",digest=\"sha256:6d9ac9237a84afe1516540f40a0fafdc86859b2141954b4d643af7066d598b74\"} 1\npodman_image_info{id=\"75c013514322\",parent_id=\"\",repository=\"docker.io/library/sonarqube\",tag=\"latest\",digest=\"sha256:548f3d4246cda60c311a035620c26ea8fb21b3abc870c5806626a32ef936982b\"} 1\npodman_image_info{id=\"a45fa0117c2b\",parent_id=\"\",repository=\"localhost/podman-pause\",tag=\"4.1.0-1651853754\",digest=\"sha256:218169c5590870bb95c06e9f7e80ded58f6644c1974b0ca7f2c3405b74fc3b57\"} 1\npodman_image_info{id=\"b260a49eebf9\",parent_id=\"\",repository=\"docker.io/library/httpd\",tag=\"latest\",digest=\"sha256:ba846154ade27292d216cce2d21f1c7e589f3b66a4a643bff0cdd348efd17aa3\"} 1\npodman_image_info{id=\"c4b778290339\",parent_id=\"b260a49eebf9\",repository=\"docker.io/grafana/grafana\",tag=\"latest\",digest=\"sha256:7567a7c70a3c1d75aeeedc968d1304174a16651e55a60d1fb132a05e1e63a054\"} 1\n\n# HELP podman_image_created_seconds Image creation time in unixtime.\n# TYPE podman_image_created_seconds gauge\npodman_image_created_seconds{id=\"48565a8e6250\",repository=\"docker.io/bitnami/prometheus\",tag=\"latest\"} 1.655436988e+09\npodman_image_created_seconds{id=\"62aedd01bd85\",repository=\"docker.io/library/busybox\",tag=\"latest\"} 1.654651161e+09\npodman_image_created_seconds{id=\"75c013514322\",repository=\"docker.io/library/sonarqube\",tag=\"latest\"} 1.654883091e+09\npodman_image_created_seconds{id=\"a45fa0117c2b\",repository=\"localhost/podman-pause\",tag=\"4.1.0-1651853754\"} 1.655484887e+09\npodman_image_created_seconds{id=\"b260a49eebf9\",repository=\"docker.io/library/httpd\",tag=\"latest\"} 1.655163309e+09\npodman_image_created_seconds{id=\"c4b778290339\",repository=\"docker.io/grafana/grafana\",tag=\"latest\"} 1.655132996e+09\n\n# HELP podman_image_size Image size\n# TYPE podman_image_size gauge\npodman_image_size{id=\"48565a8e6250\",repository=\"docker.io/bitnami/prometheus\",tag=\"latest\"} 5.11822059e+08\npodman_image_size{id=\"62aedd01bd85\",repository=\"docker.io/library/busybox\",tag=\"latest\"} 1.468102e+06\npodman_image_size{id=\"75c013514322\",repository=\"docker.io/library/sonarqube\",tag=\"latest\"} 5.35070053e+08\npodman_image_size{id=\"a45fa0117c2b\",repository=\"localhost/podman-pause\",tag=\"4.1.0-1651853754\"} 815742\npodman_image_size{id=\"b260a49eebf9\",repository=\"docker.io/library/httpd\",tag=\"latest\"} 1.49464899e+08\npodman_image_size{id=\"c4b778290339\",repository=\"docker.io/grafana/grafana\",tag=\"latest\"} 2.98969093e+08\n```\n\n#### `network`\n\n```shell\n# HELP podman_network_info Network information.\n# TYPE podman_network_info gauge\npodman_network_info{driver=\"bridge\",id=\"2f259bab93aa\",interface=\"podman0\",labels=\"\",name=\"podman\"} 1\npodman_network_info{driver=\"bridge\",id=\"420272a98a4c\",interface=\"podman3\",labels=\"\",name=\"network03\"} 1\npodman_network_info{driver=\"bridge\",id=\"6eb310d4b0bb\",interface=\"podman2\",labels=\"\",name=\"network02\"} 1\npodman_network_info{driver=\"bridge\",id=\"a5a6391121a5\",interface=\"podman1\",labels=\"\",name=\"network01\"} 1\n```\n\n#### `volume`\n\n```shell\n# HELP podman_volume_info Volume information.\n# TYPE podman_volume_info gauge\npodman_volume_info{driver=\"local\",mount_point=\"/home/navid/.local/share/containers/storage/volumes/vol01/_data\",name=\"vol01\"} 1\npodman_volume_info{driver=\"local\",mount_point=\"/home/navid/.local/share/containers/storage/volumes/vol02/_data\",name=\"vol02\"} 1\npodman_volume_info{driver=\"local\",mount_point=\"/home/navid/.local/share/containers/storage/volumes/vol03/_data\",name=\"vol03\"} 1\n\n# HELP podman_volume_created_seconds Volume creation time in unixtime.\n# TYPE podman_volume_created_seconds gauge\npodman_volume_created_seconds{name=\"vol01\"} 1.655484915e+09\npodman_volume_created_seconds{name=\"vol02\"} 1.655484926e+09\npodman_volume_created_seconds{name=\"vol03\"} 1.65548493e+09\n```\n\n#### `system`\n\n```shell\n# HELP podman_system_api_version Podman system api version.\n# TYPE podman_system_api_version gauge\npodman_system_api_version{version=\"4.1.1\"} 1\n\n# HELP podman_system_buildah_version Podman system buildahVer version.\n# TYPE podman_system_buildah_version gauge\npodman_system_buildah_version{version=\"1.26.1\"} 1\n\n# HELP podman_system_conmon_version Podman system conmon version.\n# TYPE podman_system_conmon_version gauge\npodman_system_conmon_version{version=\"2.1.0\"} 1\n\n# HELP podman_system_runtime_version Podman system runtime version.\n# TYPE podman_system_runtime_version gauge\npodman_system_runtime_version{version=\"crun version 1.4.5\"} 1\n```\n\n## License\n\nLicensed under the [Apache 2.0](LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontainers%2Fprometheus-podman-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontainers%2Fprometheus-podman-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontainers%2Fprometheus-podman-exporter/lists"}