Skip to content

Commit

Permalink
Support Podman metrics (#12073)
Browse files Browse the repository at this point in the history
* Support Podman metrics
  • Loading branch information
MichaelKatsoulis authored Dec 23, 2024
1 parent de4aafb commit 804595f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
7 changes: 5 additions & 2 deletions packages/docker/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ The `container_logs` data stream for containers' logs collection is enabled by d

## Compatibility

The Docker module is currently tested on Linux and Mac with the community
edition engine, versions 1.11 and 17.09.0-ce.
The Docker module is currently tested on Linux and Mac with the community edition engine, versions 1.11 and 17.09.0-ce. It is not tested on Windows, but it should also work there.

The Docker module supports collection of metrics from Podman’s Docker-compatible API. It has been tested on Linux and Mac with Podman Rest API v2.0.0 and above.

## Running from within Docker

Expand Down Expand Up @@ -52,6 +53,8 @@ Docker API already takes up to 2 seconds. Specifying less than 3 seconds will
result in requests that timeout, and no data will be reported for those
requests.

In the case of Podman, the configuration parameter podman should be switched to true. This enables streaming of container stats output, which allows for more accurate CPU percentage calculations when using Podman.

## Metrics

### Container
Expand Down
5 changes: 5 additions & 0 deletions packages/docker/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: 2.13.0
changes:
- description: Support for podman metrics collection.
type: enhancement
link: https://github.com/elastic/integrations/pull/12073
- version: 2.12.1
changes:
- description: Update docker network fields.
Expand Down
3 changes: 2 additions & 1 deletion packages/docker/data_stream/cpu/agent/stream/stream.yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ hosts:
- {{this}}
{{/each}}
period: {{period}}
labels.dedot: {{labels.dedot}}
labels.dedot: {{labels.dedot}}
podman: {{podman}}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ hosts:
- {{this}}
{{/each}}
period: {{period}}
labels.dedot: {{labels.dedot}}
labels.dedot: {{labels.dedot}}
podman: {{podman}}
7 changes: 5 additions & 2 deletions packages/docker/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ The `container_logs` data stream for containers' logs collection is enabled by d

## Compatibility

The Docker module is currently tested on Linux and Mac with the community
edition engine, versions 1.11 and 17.09.0-ce.
The Docker module is currently tested on Linux and Mac with the community edition engine, versions 1.11 and 17.09.0-ce. It is not tested on Windows, but it should also work there.

The Docker module supports collection of metrics from Podman’s Docker-compatible API. It has been tested on Linux and Mac with Podman Rest API v2.0.0 and above.

## Running from within Docker

Expand Down Expand Up @@ -52,6 +53,8 @@ Docker API already takes up to 2 seconds. Specifying less than 3 seconds will
result in requests that timeout, and no data will be reported for those
requests.

In the case of Podman, the configuration parameter podman should be switched to true. This enables streaming of container stats output, which allows for more accurate CPU percentage calculations when using Podman.

## Metrics

### Container
Expand Down
14 changes: 12 additions & 2 deletions packages/docker/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: docker
title: Docker
version: 2.12.1
version: 2.13.0
description: Collect metrics and logs from Docker instances with Elastic Agent.
type: integration
icons:
Expand All @@ -19,7 +19,7 @@ categories:
- containers
conditions:
kibana:
version: ^8.8.0
version: ^8.16.2
policy_templates:
- name: docker
title: Docker logs and metrics
Expand All @@ -28,6 +28,16 @@ policy_templates:
- type: docker/metrics
title: Collect Docker metrics
description: Collecting container, cpu, diskio, event, healthcheck, image, info, memory and network metrics from Docker instances
vars:
- name: podman
type: bool
title: Podman
multi: false
required: false
show_user: true
default: false
description: >
If True, Docker integration is used to collect metrics for Podman
- type: filestream
title: Collect Docker container logs
description: Collecting docker container logs
Expand Down

0 comments on commit 804595f

Please sign in to comment.