Skip to content

Commit 75bcc3c

Browse files
authored
Adding YAML examples and standardizing shell usage. Fixes #1852. (#1855)
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 02d346e commit 75bcc3c

File tree

1 file changed

+52
-12
lines changed

1 file changed

+52
-12
lines changed

pipeline/inputs/process.md

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Process Metrics
2-
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=91b97a84-1cd9-41fb-9189-a4f3b30b6bce" />
3-
42
_Process_ input plugin allows you to check how healthy a process is. It does so by performing a service check at every certain interval of time specified by the user.
53

64
The Process metrics plugin creates metrics that are log-based, such as JSON payload.
7-
For Prometheus-based metrics, see the Node Exporter Metrics input plugin.
5+
6+
For Prometheus-based metrics, see the [Node Exporter Metrics input plugin](node-exporter-metrics).
87

98
## Configuration Parameters
109

@@ -26,15 +25,36 @@ In order to start performing the checks, you can run the plugin from the command
2625

2726
The following example will check the health of _crond_ process.
2827

29-
```bash
28+
```shell
3029
$ fluent-bit -i proc -p proc_name=crond -o stdout
3130
```
3231

3332
### Configuration File
3433

35-
In your main configuration file append the following _Input_ & _Output_ sections:
34+
In your main configuration file append the following:
35+
36+
{% tabs %}
37+
{% tab title="fluent-bit.yaml" %}
38+
39+
```yaml
40+
pipeline:
41+
inputs:
42+
- name: proc
43+
proc_name: crond
44+
interval_sec: 1
45+
interval_nsec: 0
46+
fd: true
47+
mem: true
48+
49+
outputs:
50+
- name: stdout
51+
match: '*'
52+
```
53+
54+
{% endtab %}
55+
{% tab title="fluent-bit.conf" %}
3656
37-
```python
57+
```text
3858
[INPUT]
3959
Name proc
4060
Proc_Name crond
@@ -48,21 +68,41 @@ In your main configuration file append the following _Input_ & _Output_ sections
4868
Match *
4969
```
5070

71+
{% endtab %}
72+
{% endtabs %}
73+
5174
## Testing
5275

5376
Once Fluent Bit is running, you will see the health of process:
5477

55-
```bash
78+
```shell
5679
$ fluent-bit -i proc -p proc_name=fluent-bit -o stdout
57-
Fluent Bit v1.x.x
58-
* Copyright (C) 2019-2020 The Fluent Bit Authors
59-
* Copyright (C) 2015-2018 Treasure Data
80+
81+
Fluent Bit v4.0.3
82+
* Copyright (C) 2015-2025 The Fluent Bit Authors
6083
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
6184
* https://fluentbit.io
6285

63-
[2017/01/30 21:44:56] [ info] [engine] started
86+
______ _ _ ______ _ _ ___ _____
87+
| ___| | | | | ___ (_) | / || _ |
88+
| |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __/ /| || |/' |
89+
| _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| || /| |
90+
| | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /\___ |\ |_/ /
91+
\_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ |_(_)___/
92+
93+
94+
[2025/07/01 14:44:47] [ info] [fluent bit] version=4.0.3, commit=f5f5f3c17d, pid=1
95+
[2025/07/01 14:44:47] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
96+
[2025/07/01 14:44:47] [ info] [simd ] disabled
97+
[2025/07/01 14:44:47] [ info] [cmetrics] version=1.0.3
98+
[2025/07/01 14:44:47] [ info] [ctraces ] version=0.6.6
99+
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] initializing
100+
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] storage_strategy='memory' (memory only)
101+
[2025/07/01 14:44:47] [ info] [sp] stream processor started
102+
[2025/07/01 14:44:47] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
103+
[2025/07/01 14:44:47] [ info] [output:stdout:stdout.0] worker #0 started
64104
[0] proc.0: [1485780297, {"alive"=>true, "proc_name"=>"fluent-bit", "pid"=>10964, "mem.VmPeak"=>14740000, "mem.VmSize"=>14740000, "mem.VmLck"=>0, "mem.VmHWM"=>1120000, "mem.VmRSS"=>1120000, "mem.VmData"=>2276000, "mem.VmStk"=>88000, "mem.VmExe"=>1768000, "mem.VmLib"=>2328000, "mem.VmPTE"=>68000, "mem.VmSwap"=>0, "fd"=>18}]
65105
[1] proc.0: [1485780298, {"alive"=>true, "proc_name"=>"fluent-bit", "pid"=>10964, "mem.VmPeak"=>14740000, "mem.VmSize"=>14740000, "mem.VmLck"=>0, "mem.VmHWM"=>1148000, "mem.VmRSS"=>1148000, "mem.VmData"=>2276000, "mem.VmStk"=>88000, "mem.VmExe"=>1768000, "mem.VmLib"=>2328000, "mem.VmPTE"=>68000, "mem.VmSwap"=>0, "fd"=>18}]
66106
[2] proc.0: [1485780299, {"alive"=>true, "proc_name"=>"fluent-bit", "pid"=>10964, "mem.VmPeak"=>14740000, "mem.VmSize"=>14740000, "mem.VmLck"=>0, "mem.VmHWM"=>1152000, "mem.VmRSS"=>1148000, "mem.VmData"=>2276000, "mem.VmStk"=>88000, "mem.VmExe"=>1768000, "mem.VmLib"=>2328000, "mem.VmPTE"=>68000, "mem.VmSwap"=>0, "fd"=>18}]
67107
[3] proc.0: [1485780300, {"alive"=>true, "proc_name"=>"fluent-bit", "pid"=>10964, "mem.VmPeak"=>14740000, "mem.VmSize"=>14740000, "mem.VmLck"=>0, "mem.VmHWM"=>1152000, "mem.VmRSS"=>1148000, "mem.VmData"=>2276000, "mem.VmStk"=>88000, "mem.VmExe"=>1768000, "mem.VmLib"=>2328000, "mem.VmPTE"=>68000, "mem.VmSwap"=>0, "fd"=>18}]
68-
```
108+
```

0 commit comments

Comments
 (0)