Skip to content

Commit 52fd9e2

Browse files
authored
Merge pull request #1774 from fluent/lynettemiles/sc-136194/update-fluent-bit-docs-pipeline-inputs-process
2 parents 3a77202 + 3c32c15 commit 52fd9e2

File tree

1 file changed

+39
-37
lines changed

1 file changed

+39
-37
lines changed
Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,59 @@
11
---
2-
description: >-
3-
A plugin based on Process Exporter to collect process level of metrics of system
2+
description: A plugin based on Process Exporter to collect process level of metrics of system
43
metrics
54
---
65

7-
# Process Exporter Metrics
6+
# Process Exporter metrics
87

9-
[Prometheus Node Exporter](https://github.com/prometheus/node_exporter) is a popular way to collect system level metrics from operating systems, such as CPU / Disk / Network / Process statistics.
10-
Fluent Bit 2.2 onwards includes a process exporter plugin that builds off the Prometheus design to collect process level metrics without having to manage two separate processes or agents.
8+
[Prometheus Node exporter](https://github.com/prometheus/node_exporter) is a popular way to collect system level metrics from operating systems such as CPU, disk, network, and process statistics.
9+
10+
Fluent Bit 2.2 and later includes a process exporter plugin that builds off the Prometheus design to collect process level metrics without having to manage two separate processes or agents.
1111

1212
The Process Exporter Metrics plugin implements collecting of the various metrics available from [the third party implementation of Prometheus Process Exporter](https://github.com/ncabatoff/process-exporter) and these will be expanded over time as needed.
1313

14-
**Important note:** All metrics including those collected with this plugin flow through a separate pipeline from logs and current filters do not operate on top of metrics.
14+
{% hint style="info" %}
15+
All metrics including those collected with this plugin flow through a separate pipeline from logs and current filters don't operate on top of metrics.
16+
{% endhint %}
1517

1618
This plugin is only supported on Linux based operating systems as it uses the `proc` filesystem to access the relevant metrics.
1719

18-
macOS does not have the `proc` filesystem so this plugin will not work for it.
19-
20+
macOS doesn't have the `proc` filesystem so this plugin won't work for it.
2021

2122
## Configuration
2223

23-
| Key | Description | Default |
24-
| ------------------------- | -------------------------------------------------------------------------------------- | --------- |
25-
| scrape\_interval | The rate at which metrics are collected. | 5 seconds |
26-
| path.procfs | The mount point used to collect process information and metrics. Read-only is enough | /proc/ |
27-
| process\_include\_pattern | regex to determine which names of processes are included in the metrics produced by this plugin | It is applied for all process unless explicitly set. Default is `.+`. |
28-
| process\_exclude\_pattern | regex to determine which names of processes are excluded in the metrics produced by this plugin | It is not applied unless explicitly set. Default is `NULL`. |
29-
| metrics | To specify which process level of metrics are collected from the host operating system. These metrics depend on `/proc` fs. The actual values of metrics will be read from `/proc` when needed. cpu, io, memory, state, context\_switches, fd, start\_time, thread\_wchan, thread depend on procfs. | `cpu,io,memory,state,context_switches,fd,start_time,thread_wchan,thread` |
24+
| Key | Description | Default |
25+
| ----| ----------- | --------- |
26+
| `scrape_interval` | The rate, in seconds, at which metrics are collected. | `5` |
27+
| `path.procfs` | The mount point used to collect process information and metrics. Read-only permissions are enough. | `/proc/` |
28+
| `process_include_pattern` | Regular expression to determine which names of processes are included in the metrics produced by this plugin. It's applied for all process unless explicitly set. | `.+` |
29+
| `process_exclude_pattern` | Regular expression to determine which names of processes are excluded in the metrics produced by this plugin. It's not applied unless explicitly set. | `NULL` |
30+
| `metrics` | Specify which process level of metrics are collected from the host operating system. Actual values of metrics will be read from `/proc` when needed. `cpu`, `io`, `memory`, `state`, `context_switches`, `fd,` `start_time`, `thread_wchan`, and `thread` metrics depend on `procfs`. | `cpu,io,memory,state,context_switches,fd,start_time,thread_wchan,thread` |
3031

31-
## Metrics Available
32+
## Available metrics
3233

33-
| Name | Description |
34+
| Name | Description |
3435
| ----------------- | -------------------------------------------------- |
35-
| cpu | Exposes CPU statistics from `/proc`. |
36-
| io | Exposes I/O statistics from `/proc`. |
37-
| memory | Exposes memory statistics from `/proc`. |
38-
| state | Exposes process state statistics from `/proc`. |
39-
| context\_switches | Exposes context\_switches statistics from `/proc`. |
40-
| fd | Exposes file descriptors statistics from `/proc`. |
41-
| start\_time | Exposes start\_time statistics from `/proc`. |
42-
| thread\_wchan | Exposes thread\_wchan from `/proc`. |
43-
| thread | Exposes thread statistics from `/proc`. |
36+
| `cpu` | Exposes CPU statistics from `/proc`. |
37+
| `io` | Exposes I/O statistics from `/proc`. |
38+
| `memory` | Exposes memory statistics from `/proc`. |
39+
| `state` | Exposes process state statistics from `/proc`. |
40+
| `context_switches` | Exposes `context_switches` statistics from `/proc`. |
41+
| `fd` | Exposes file descriptors statistics from `/proc`. |
42+
| `start_time` | Exposes `start_time` statistics from `/proc`. |
43+
| `thread_wchan` | Exposes `thread_wchan` from `/proc`. |
44+
| `thread` | Exposes thread statistics from `/proc`. |
4445

4546
## Threading
4647

4748
This input always runs in its own [thread](../../administration/multithreading.md#inputs).
4849

49-
## Getting Started
50+
## Getting started
5051

51-
### Simple Configuration File
52+
### Configuration file
5253

53-
In the following configuration file, the input plugin _process\_exporter\_metrics collects _metrics every 2 seconds and exposes them through our [Prometheus Exporter](../outputs/prometheus-exporter.md) output plugin on HTTP/TCP port 2021.
54+
In the following configuration file, the input plugin `process_exporter_metrics` collects metrics every 2 seconds and exposes them through the [Prometheus Exporter](../outputs/prometheus-exporter.md) output plugin on HTTP/TCP port 2021.
5455

55-
```
56+
```python
5657
# Process Exporter Metrics + Prometheus Exporter
5758
# -------------------------------------------
5859
# The following example collect host metrics on Linux and expose
@@ -78,20 +79,21 @@ In the following configuration file, the input plugin _process\_exporter\_metric
7879
port 2021
7980
```
8081

81-
You can see the metrics by using _curl:_
82+
You can see the metrics by using `curl`:
8283

8384
```bash
8485
curl http://127.0.0.1:2021/metrics
8586
```
8687

87-
### Container to Collect Host Metrics
88+
### Container to collect host metrics
8889

8990
When deploying Fluent Bit in a container you will need to specify additional settings to ensure that Fluent Bit has access to the process details.
91+
9092
The following `docker` command deploys Fluent Bit with a specific mount path for
9193
`procfs` and settings enabled to ensure that Fluent Bit can collect from the host.
9294
These are then exposed over port 2021.
9395

94-
```
96+
```bash
9597
docker run -ti -v /proc:/host/proc:ro \
9698
-p 2021:2021 \
9799
fluent/fluent-bit:2.2 \
@@ -101,8 +103,8 @@ docker run -ti -v /proc:/host/proc:ro \
101103
-f 1
102104
```
103105

104-
## Enhancement Requests
106+
## Enhancement requests
107+
108+
Development prioritises a subset of the available collectors in the [third party implementation of Prometheus Process Exporter](https://github.com/ncabatoff/process-exporter). To request others, open a GitHub issue by using the following template:
105109

106-
Development prioritises a subset of the available collectors in the [the third party implementation of Prometheus Process Exporter](https://github.com/ncabatoff/process-exporter), to request others please open a Github issue by using the following template:\
107-
\
108-
\- [in_process_exporter_metrics](https://github.com/fluent/fluent-bit/issues/new?assignees=\&labels=\&template=feature_request.md\&title=in_process_exporter_metrics:%20add%20ABC%20collector)
110+
- [`in_process_exporter_metrics`](https://github.com/fluent/fluent-bit/issues/new?assignees=\&labels=\&template=feature_request.md\&title=in_process_exporter_metrics:%20add%20ABC%20collector)

0 commit comments

Comments
 (0)