From c788ba50b5f8288569b273b8f9afd7a9ce5b8769 Mon Sep 17 00:00:00 2001 From: Lynette Miles Date: Wed, 4 Jun 2025 14:07:42 -0700 Subject: [PATCH 1/2] pipeline: input: docker-metrics: style Signed-off-by: Lynette Miles --- pipeline/inputs/docker-metrics.md | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/pipeline/inputs/docker-metrics.md b/pipeline/inputs/docker-metrics.md index 23c8d2128..689862e60 100644 --- a/pipeline/inputs/docker-metrics.md +++ b/pipeline/inputs/docker-metrics.md @@ -1,31 +1,28 @@ ---- -description: >- - The docker input plugin allows you to collect Docker container metrics such as - memory usage and CPU consumption. ---- - # Docker Metrics -## Configuration Parameters +The _Docker_ input plugin you collect Docker container metrics like memory usage and CPU consumption. + +## Configuration parameters The plugin supports the following configuration parameters: | Key | Description | Default | | ------------ | ----------------------------------------------- | ------- | -| Interval_Sec | Polling interval in seconds | 1 | -| Include | A space-separated list of containers to include | | -| Exclude | A space-separated list of containers to exclude | | -| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` | -| path.containers | Used to specify the container directory if Docker is configured with a custom "data-root" directory. | `/var/lib/docker/containers` | +| `Interval_Sec` | Polling interval in seconds | `1` | +| `Include` | A space-separated list of containers to include. | _none_ | +| `Exclude` | A space-separated list of containers to exclude. | _none_ | +| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` | +| `path.containers` | Used to specify the container directory if Docker is configured with a custom `data-root` directory. | `/var/lib/docker/containers` | -If you set neither `Include` nor `Exclude`, the plugin will try to get metrics from _all_ the running containers. +If you set neither `Include` nor `Exclude`, the plugin will try to get metrics from all running containers. -## Configuration File +## Configuration file -Here is an example configuration that collects metrics from two docker instances (`6bab19c3a0f9` and `14159be4ca2c`). +The following example configuration collects metrics from two docker instances (`6bab19c3a0f9` and `14159be4ca2c`). {% tabs %} {% tab title="fluent-bit.conf" %} + ```python [INPUT] Name docker @@ -34,9 +31,11 @@ Here is an example configuration that collects metrics from two docker instances Name stdout Match * ``` + {% endtab %} {% tab title="fluent-bit.yaml" %} + ```yaml pipeline: inputs: @@ -47,11 +46,12 @@ pipeline: - name: stdout match: '*' ``` + {% endtab %} {% endtabs %} -This configuration will produce records like below. +This configuration will produce records like the following: -``` +```text [1] docker.0: [1571994772.00555745, {"id"=>"6bab19c3a0f9", "name"=>"postgresql", "cpu_used"=>172102435, "mem_used"=>5693400, "mem_limit"=>4294963200}] ``` From 824429d5cb550ab22a109f3c4baa70427b2bfe51 Mon Sep 17 00:00:00 2001 From: Lynette Miles <6818907+esmerel@users.noreply.github.com> Date: Thu, 5 Jun 2025 13:44:56 -0700 Subject: [PATCH 2/2] Update pipeline/inputs/docker-metrics.md Co-authored-by: Craig Norris <112565517+cnorris-cs@users.noreply.github.com> Signed-off-by: Lynette Miles <6818907+esmerel@users.noreply.github.com> --- pipeline/inputs/docker-metrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/inputs/docker-metrics.md b/pipeline/inputs/docker-metrics.md index 689862e60..aad5f15e9 100644 --- a/pipeline/inputs/docker-metrics.md +++ b/pipeline/inputs/docker-metrics.md @@ -1,6 +1,6 @@ # Docker Metrics -The _Docker_ input plugin you collect Docker container metrics like memory usage and CPU consumption. +The _Docker_ input plugin you collect Docker container metrics, including memory usage and CPU consumption. ## Configuration parameters