You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/inputs/process-exporter-metrics.md
+53-16Lines changed: 53 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,12 @@ Fluent Bit 2.2 and later includes a process exporter plugin that builds off the
12
12
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.
13
13
14
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 %}
17
15
18
-
This plugin is only supported on Linux based operating systems as it uses the `proc` filesystem to access the relevant metrics.
16
+
All metrics including those collected with this plugin flow through a separate pipeline from logs and current filters don't
17
+
operate on top of metrics. This plugin is only supported on Linux based operating systems as it uses the `proc` filesystem to
18
+
access the relevant metrics. MacOS doesn't have the `proc` filesystem so this plugin won't work for it.
19
19
20
-
macOS doesn't have the `proc` filesystem so this plugin won't work for it.
20
+
{% endhint %}
21
21
22
22
## Configuration
23
23
@@ -53,7 +53,40 @@ This input always runs in its own [thread](../../administration/multithreading.m
53
53
54
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.
55
55
56
-
```python
56
+
{% tabs %}
57
+
{% tab title="fluent-bit.yaml" %}
58
+
59
+
```yaml
60
+
# Process Exporter Metrics + Prometheus Exporter
61
+
# -------------------------------------------
62
+
# The following example collect host metrics on Linux and expose
63
+
# them through a Prometheus HTTP end-point.
64
+
#
65
+
# After starting the service try it with:
66
+
#
67
+
# $ curl http://127.0.0.1:2021/metrics
68
+
#
69
+
service:
70
+
flush: 1
71
+
log_level: info
72
+
73
+
pipeline:
74
+
inputs:
75
+
- name: process_exporter_metrics
76
+
tag: process_metrics
77
+
scrape_interval: 2
78
+
79
+
outputs:
80
+
- name: prometheus_exporter
81
+
match: process_metrics
82
+
host: 0.0.0.0
83
+
port: 2021
84
+
```
85
+
86
+
{% endtab %}
87
+
{% tab title="fluent-bit.conf" %}
88
+
89
+
```text
57
90
# Process Exporter Metrics + Prometheus Exporter
58
91
# -------------------------------------------
59
92
# The following example collect host metrics on Linux and expose
@@ -79,10 +112,13 @@ In the following configuration file, the input plugin `process_exporter_metrics`
79
112
port 2021
80
113
```
81
114
115
+
{% endtab %}
116
+
{% endtabs %}
117
+
82
118
You can see the metrics by using `curl`:
83
119
84
-
```bash
85
-
curl http://127.0.0.1:2021/metrics
120
+
```shell
121
+
$ curl http://127.0.0.1:2021/metrics
86
122
```
87
123
88
124
### Container to collect host metrics
@@ -93,18 +129,19 @@ The following `docker` command deploys Fluent Bit with a specific mount path for
93
129
`procfs` and settings enabled to ensure that Fluent Bit can collect from the host.
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:
0 commit comments