Skip to content

Commit 492fc0a

Browse files
authored
in_head: add examples for yaml configuration (#1323)
Signed-off-by: Takahiro Yamashita <[email protected]>
1 parent add261c commit 492fc0a

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

pipeline/inputs/head.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ siblings : 1
3939

4040
Cpu frequency is "cpu MHz : 2791.009". We can get the line with this configuration file.
4141

42+
{% tabs %}
43+
{% tab title="fluent-bit.conf" %}
4244
```python
4345
[INPUT]
4446
Name head
@@ -57,6 +59,27 @@ Cpu frequency is "cpu MHz : 2791.009". We can get the line with this configurati
5759
Name stdout
5860
Match *
5961
```
62+
{% endtab %}
63+
64+
{% tab title="fluent-bit.yaml" %}
65+
```yaml
66+
pipeline:
67+
inputs:
68+
- name: head
69+
tag: head.cpu
70+
file: /proc/cpuinfo
71+
lines: 8
72+
split_line: true
73+
filters:
74+
- name: record_modifier
75+
match: '*'
76+
whitelist_key: line7
77+
outputs:
78+
- name: stdout
79+
match: '*'
80+
```
81+
{% endtab %}
82+
{% endtabs %}
6083
6184
Output is
6285
@@ -102,6 +125,8 @@ Fluent Bit v1.x.x
102125
103126
In your main configuration file append the following _Input_ & _Output_ sections:
104127
128+
{% tabs %}
129+
{% tab title="fluent-bit.conf" %}
105130
```python
106131
[INPUT]
107132
Name head
@@ -115,6 +140,24 @@ In your main configuration file append the following _Input_ & _Output_ sections
115140
Name stdout
116141
Match *
117142
```
143+
{% endtab %}
144+
145+
{% tab title="fluent-bit.yaml" %}
146+
```yaml
147+
pipeline:
148+
inputs:
149+
- name: head
150+
tag: uptime
151+
file: /proc/uptime
152+
buf_size: 256
153+
interval_sec: 1
154+
interval_nsec: 0
155+
outputs:
156+
- name: stdout
157+
match: '*'
158+
```
159+
{% endtab %}
160+
{% endtabs %}
118161
119162
Note: Total interval \(sec\) = Interval\_Sec + \(Interval\_Nsec / 1000000000\).
120163

0 commit comments

Comments
 (0)