Daniel Jaglowski 40b485f08a Update core for v0.90.0 release (#29539) 1 년 전
..
internal b55549468a [chore][receiver/podman] create metadata (#21786) 1 년 전
testdata 951e875267 [chore] Change receiver config tests to unmarshal config only for that component. (part3) (#14561) 2 년 전
Makefile dad4b2e389 Podman Stats Receiver: Add receiver skeleton (#4459) 3 년 전
README.md 562dc48d10 Link component issue badges to the respective issue page (#24642) 1 년 전
config.go ee403a9067 [receiver/podman] remove duplicate Timeout setting (#26083) 1 년 전
config_test.go ee403a9067 [receiver/podman] remove duplicate Timeout setting (#26083) 1 년 전
doc.go 5133f4ccd6 [chore] use license shortform (#22052) 1 년 전
factory.go 6ce01934ea [receiver/podman] rename struct and function to keep expected receiver.Factory and pass checkapi (#27077) 1 년 전
factory_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 년 전
go.mod 40b485f08a Update core for v0.90.0 release (#29539) 1 년 전
go.sum 40b485f08a Update core for v0.90.0 release (#29539) 1 년 전
libpod_client.go e41a58acbd [receiver/podman] Change the type of `Config.SSHPassphrase` to be `configopaque.String` (#23892) 1 년 전
libpod_client_test.go ee403a9067 [receiver/podman] remove duplicate Timeout setting (#26083) 1 년 전
libpod_data.go f4c44858b5 [all][chore] Moved from interface{} to any for all go code (#29072) 1 년 전
metadata.yaml 8a4348cb00 [chore] add codeowners to metadata (#24404) 1 년 전
metrics.go 5133f4ccd6 [chore] use license shortform (#22052) 1 년 전
metrics_test.go 8510b37b1c [chore] fix exhaustive lint for podmanreceiver (#23823) 1 년 전
podman.go ee403a9067 [receiver/podman] remove duplicate Timeout setting (#26083) 1 년 전
podman_connection.go 5133f4ccd6 [chore] use license shortform (#22052) 1 년 전
podman_connection_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 년 전
podman_test.go ee403a9067 [receiver/podman] remove duplicate Timeout setting (#26083) 1 년 전
receiver.go 6ce01934ea [receiver/podman] rename struct and function to keep expected receiver.Factory and pass checkapi (#27077) 1 년 전
receiver_test.go 6ce01934ea [receiver/podman] rename struct and function to keep expected receiver.Factory and pass checkapi (#27077) 1 년 전
receiver_windows.go f4c44858b5 [all][chore] Moved from interface{} to any for all go code (#29072) 1 년 전
receiver_windows_test.go 6ce01934ea [receiver/podman] rename struct and function to keep expected receiver.Factory and pass checkapi (#27077) 1 년 전

README.md

Podman Stats Receiver

Status
Stability development: metrics
Distributions contrib, observiq, sumo
Issues Open issues Closed issues
Code Owners @rogercoll

The Podman Stats receiver queries the Podman service API to fetch stats for all running containers on a configured interval. These stats are for container resource usage of cpu, memory, network, and the blkio controller.

:information_source: Requires Podman API version 3.3.1+ and Windows is not supported.

Configuration

The following settings are required:

  • endpoint (default = unix:///run/podman/podman.sock): Address to reach the desired Podman daemon.

The following settings are optional:

  • collection_interval (default = 10s): The interval at which to gather container stats.
  • initial_delay (default = 1s): defines how long this receiver waits before starting.
  • timeout (default = 5s): The maximum amount of time to wait for Podman API responses.

Example:

receivers:
  podman_stats:
    endpoint: unix://run/podman/podman.sock
    timeout: 10s
    collection_interval: 10s
    initial_delay: 1s

The full list of settings exposed for this receiver are documented here with detailed sample configurations here.

Connecting over SSH

receivers:
  podman_stats:
    endpoint: ssh://core@localhost:53841/run/user/1000/podman/podman.sock
    ssh_key: /path/to/ssh/private/key
    ssh_passphrase: <password>

Podman API compatibility

The receiver has only been tested with API 3.3.1+ but it may work with older versions as well. If you want to use the receiver with an older API version, please set the api_version to the desired version. For example,

receivers:
  podman_stats:
    endpoint: unix://run/podman/podman.sock
    api_version: 3.2.0

Metrics

The receiver emits the following metrics:

container.memory.usage.limit
container.memory.usage.total
container.memory.percent
container.network.io.usage.tx_bytes
container.network.io.usage.rx_bytes
container.blockio.io_service_bytes_recursive.write
container.blockio.io_service_bytes_recursive.read
container.cpu.usage.system
container.cpu.usage.total
container.cpu.percent
container.cpu.usage.percpu

Building

This receiver uses the official libpod Go bindings for Podman. In order to include this receiver in your build, you'll need to make sure all non-Go dependencies are satisfied or some features are exluded. You can use the below mentioned build tags to exclude the non-Go dependencies. This receiver does not use any features enabled by these deps so excluding these does not affect the functionality in any way.

Recommended build tags to use when including this receiver in your build:

  • containers_image_openpgp
  • exclude_graphdriver_btrfs
  • exclude_graphdriver_devicemapper