Skip to content

Commit 0c1c48c

Browse files
committed
Pipeline: inputs: podman: style
Signed-off-by: Lynette Miles <[email protected]>
1 parent dca19a0 commit 0c1c48c

File tree

2 files changed

+44
-35
lines changed

2 files changed

+44
-35
lines changed

pipeline/inputs/podman-metrics.md

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
1-
---
2-
description: The Podman Metrics input plugin allows you to collect metrics from podman containers, so they can be exposed later as, for example, Prometheus counters and gauges.
3-
---
1+
# Podman metrics
42

5-
# Podman Metrics
3+
The Podman metrics input plugin allows Fluent Bit to gather Podman container metrics. The procedure for collecting container list and gathering data associated with them is based on filesystem data.
64

7-
## Configuration Parameters
5+
The metrics can be exposed later as, for example, Prometheus counters and gauges.
86

9-
| **Key** | Description | Default |
10-
| ----------------- | ---------------------------------------------------------- | -------------------------------------------------------------- |
11-
| scrape_interval | Interval between each scrape of podman data (in seconds) | 30 |
12-
| scrape_on_start | Should this plugin scrape podman data after it is started | false |
13-
| path.config | Custom path to podman containers configuration file | /var/lib/containers/storage/overlay-containers/containers.json |
14-
| path.sysfs | Custom path to sysfs subsystem directory | /sys/fs/cgroup |
15-
| path.procfs | Custom path to proc subsystem directory | /proc |
16-
| threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
7+
## Configuration parameters
178

18-
## Getting Started
9+
| Key | Description | Default |
10+
| --- | ------------| ------- |
11+
| `scrape_interval` | Interval between each scrape of Podman data (in seconds). | `30` |
12+
| `scrape_on_start` | Sets whether this plugin scrapes Podman data on startup. | `false` |
13+
| `path.config` | Custom path to the Podman containers configuration file. | `/var/lib/containers/storage/overlay-containers/containers.json` |
14+
| `path.sysfs` | Custom path to the `sysfs` subsystem directory. | `/sys/fs/cgroup` |
15+
| `path.procfs` | Custom path to the `proc` subsystem directory. | `/proc` |
16+
| `threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
1917

20-
The podman metrics input plugin allows Fluent Bit to gather podman container metrics. The entire procedure of collecting container list and gathering data associated with them bases on filesystem data.This plugin does not execute podman commands or send http requests to podman api - instead it reads podman configuration file and metrics exposed by */sys* and */proc* filesystems.
18+
## Get started
2119

22-
This plugin supports and automatically detects both cgroups v1 and v2.
20+
This plugin doesn't execute `podman` commands or send HTTP requests to Podman API. It reads a Podman configuration file and metrics exposed by the `/sys` and `/proc` filesystems.
2321

24-
**Example Curl message for one running container**
22+
This plugin supports and automatically detects both `cgroups v1` and `v2`.
2523

24+
### Example `curl` message for one running container
25+
26+
You can run the following `curl` command:
27+
28+
```bash
29+
curl 0.0.0.0:2021/metrics
2630
```
27-
$> curl 0.0.0.0:2021/metrics
31+
32+
Which returns information like:
33+
34+
```text
2835
# HELP fluentbit_input_bytes_total Number of input bytes.
2936
# TYPE fluentbit_input_bytes_total counter
3037
fluentbit_input_bytes_total{name="podman_metrics.0"} 0
@@ -75,9 +82,9 @@ fluentbit_input_storage_chunks_busy{name="podman_metrics.0"} 0
7582
fluentbit_input_storage_chunks_busy_bytes{name="podman_metrics.0"} 0
7683
```
7784

78-
### Configuration File
85+
### Configuration file
7986

80-
```
87+
```python
8188
[INPUT]
8289
name podman_metrics
8390
scrape_interval 10
@@ -86,24 +93,25 @@ fluentbit_input_storage_chunks_busy_bytes{name="podman_metrics.0"} 0
8693
name prometheus_exporter
8794
```
8895

89-
### Command Line
96+
### Command line
9097

91-
```
92-
$> fluent-bit -i podman_metrics -o prometheus_exporter
98+
```bash
99+
fluent-bit -i podman_metrics -o prometheus_exporter
93100
```
94101

95102
### Exposed metrics
96103

97104
Currently supported counters are:
98-
- container_memory_usage_bytes
99-
- container_memory_max_usage_bytes
100-
- container_memory_rss
101-
- container_spec_memory_limit_bytes
102-
- container_cpu_user_seconds_total
103-
- container_cpu_usage_seconds_total
104-
- container_network_receive_bytes_total
105-
- container_network_receive_errors_total
106-
- container_network_transmit_bytes_total
107-
- container_network_transmit_errors_total
108-
109-
> This plugin mimics naming convetion of docker metrics exposed by [cadvisor](https://github.com/google/cadvisor) project
105+
106+
- `container_memory_usage_bytes`
107+
- `container_memory_max_usage_bytes`
108+
- `container_memory_rss`
109+
- `container_spec_memory_limit_bytes`
110+
- `container_cpu_user_seconds_total`
111+
- `container_cpu_usage_seconds_total`
112+
- `container_network_receive_bytes_total`
113+
- `container_network_receive_errors_total`
114+
- `container_network_transmit_bytes_total`
115+
- `container_network_transmit_errors_total`
116+
117+
This plugin mimics the naming convention of Docker metrics exposed by [`cadvisor`](https://github.com/google/cadvisor).

vale-styles/FluentBit/Spelling-exceptions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ OTel
125125
PagerDuty
126126
performant
127127
persistable
128+
Podman
128129
Postgres
129130
PowerShell
130131
prepopulate

0 commit comments

Comments
 (0)