Skip to content

Commit ebe77db

Browse files
committed
Add in_sample article and update links
Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
1 parent ef9b86e commit ebe77db

File tree

8 files changed

+132
-99
lines changed

8 files changed

+132
-99
lines changed

SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
* [http](/plugins/input/http.md)
6060
* [syslog](/plugins/input/syslog.md)
6161
* [exec](/plugins/input/exec.md)
62-
* [dummy](/plugins/input/dummy.md)
62+
* [sample](/plugins/input/sample.md)
6363
* [monitor_agent](/plugins/input/monitor_agent.md)
6464
* [windows_eventlog](/plugins/input/windows_eventlog.md)
6565
* [Output Plugins](/plugins/output/README.md)

developer/api-plugin-helper-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ This method updates the stored value using a `Proc` object.
157157

158158
## Plugins using `storage`
159159

160-
- [`in_dummy`](/plugins/input/dummy.md)
160+
- [`in_sample`](/plugins/input/sample.md)
161161
- [`in_windows_eventlog`](/plugins/input/windows_eventlog.md)
162162

163163

developer/api-plugin-helper-thread.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ thread_create(:example_plugin_main) {
7777

7878
- [`out_forward`](/plugins/output/forward.md)
7979
- [`in_monitor_agent`](/plugins/input/monitor_agent.md)
80-
- [`in_dummy`](/plugins/input/dummy.md)
80+
- [`in_sample`](/plugins/input/sample.md)
8181

8282

8383
------------------------------------------------------------------------

developer/api-plugin-helper-timer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ end
6464

6565
- [`out_forward`](/plugins/output/forward.md)
6666
- [`in_monitor_agent`](/plugins/input/monitor_agent.md)
67-
- [`in_dummy`](/plugins/input/dummy.md)
67+
- [`in_sample`](/plugins/input/sample.md)
6868

6969

7070
------------------------------------------------------------------------

plugins/input/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ data sources.
3232
- [`in_http`](/plugins/input/http.md)
3333
- [`in_syslog`](/plugins/input/syslog.md)
3434
- [`in_exec`](/plugins/input/exec.md)
35-
- [`in_dummy`](/plugins/input/dummy.md)
35+
- [`in_sample`](/plugins/input/sample.md)
3636
- [`in_windows_eventlog`](/plugins/input/windows_eventlog.md)
3737

3838

plugins/input/dummy.md

Lines changed: 4 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
# `dummy` Input Plugin
22

3-
![](/images/plugins/input/dummy.png)
3+
`in_dummy` has been renamed `in_sample` since fluetd v1.11.12.
4+
See [`sample` input plugin](/plugins/input/sample.md) article for more details.
45

5-
The `in_dummy` input plugin generates dummy events. It is useful for
6-
testing, debugging, benchmarking and getting started with Fluentd.
7-
8-
It is included in Fluentd's core.
9-
10-
11-
## Example Configuration
6+
You can keep to use following configuration in v1:
127

138
```
149
<source>
@@ -17,89 +12,7 @@ It is included in Fluentd's core.
1712
</source>
1813
```
1914

20-
Please see the [Config File](/configuration/config-file.md) article for the basic
21-
structure and syntax of the configuration file.
22-
23-
24-
## Plugin Helpers
25-
26-
- [`thread`](/developer/api-plugin-helper-thread.md)
27-
- [`storage`](/developer/api-plugin-helper-storage.md)
28-
- See also: [Input Plugin Overview](/plugins/input/README.md)
29-
30-
31-
## Parameters
32-
33-
See [Common Parameters](/configuration/plugin-common-parameters.md).
34-
35-
### `@type`
36-
37-
The value must be `dummy`.
38-
39-
40-
### `tag`
41-
42-
| type | default | version |
43-
|:-------|:--------|:--------|
44-
| string | Nothing | 0.14.0 |
45-
46-
The value is the tag assigned to the generated events.
47-
48-
49-
### `size`
50-
51-
| type | default | version |
52-
|:--------|:--------|:--------|
53-
| integer | 1 | 0.14.4 |
54-
55-
The number of events in event stream of each emits.
56-
57-
58-
### `rate`
59-
60-
| type | default | version |
61-
|:--------|:--------|:--------|
62-
| integer | 1 | 0.14.0 |
63-
64-
It configures how many events to generate per second.
65-
66-
67-
### `auto_increment_key`
68-
69-
| type | default | version |
70-
|:-------|:--------|:--------|
71-
| string | nil | 0.14.0 |
72-
73-
If specified, each generated event has an auto-incremented key field.
74-
75-
For example, with `auto_increment_key foo_key`, the first couple of
76-
events look like:
77-
78-
```
79-
2014-12-14 23:23:38 +0000 test: {"message":"dummy","foo_key":0}
80-
2014-12-14 23:23:38 +0000 test: {"message":"dummy","foo_key":1}
81-
2014-12-14 23:23:38 +0000 test: {"message":"dummy","foo_key":2}
82-
```
83-
84-
85-
### `suspend`
86-
87-
| type | default | version |
88-
|:-----|:--------|:--------|
89-
| bool | false | 0.14.2 |
90-
91-
This parameter is removed since v1.10.0. This feature is automatically handled in the core.
92-
93-
94-
### `dummy`
95-
96-
| type | default | version |
97-
|:-------|:-------------------------|:--------|
98-
| string | `[{"message": "dummy"}]` | 0.14.0 |
99-
100-
The dummy data to be generated. It should be either an array of JSON
101-
hashes or a single JSON hash. If it is an array of JSON hashes, the
102-
hashes in the array are cycled through in order.
15+
Fluentd v2 will remove this plugin name.
10316

10417

10518
------------------------------------------------------------------------

plugins/input/sample.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# `sample` Input Plugin
2+
3+
![](/images/plugins/input/dummy.png)
4+
5+
The `in_sample` input plugin generates sample events. It is useful for
6+
testing, debugging, benchmarking and getting started with Fluentd.
7+
8+
It is included in Fluentd's core.
9+
10+
This plugin is the renamed version of `in_dummy`.
11+
12+
## Example Configuration
13+
14+
```
15+
<source>
16+
@type sample
17+
sample {"hello":"world"}
18+
</source>
19+
20+
# If you use fluentd v1.11.1 or earlier, use following configuration
21+
<source>
22+
@type dummy
23+
dummy {"hello":"world"}
24+
</source>
25+
```
26+
27+
Please see the [Config File](/configuration/config-file.md) article for the basic
28+
structure and syntax of the configuration file.
29+
30+
31+
## Plugin Helpers
32+
33+
- [`thread`](/developer/api-plugin-helper-thread.md)
34+
- [`storage`](/developer/api-plugin-helper-storage.md)
35+
- See also: [Input Plugin Overview](/plugins/input/README.md)
36+
37+
38+
## Parameters
39+
40+
See [Common Parameters](/configuration/plugin-common-parameters.md).
41+
42+
### `@type`
43+
44+
The value must be `sample`.
45+
46+
If you use fluentd v1.11.1 or earlier, use `dummy`.
47+
48+
### `tag`
49+
50+
| type | default | version |
51+
|:-------|:--------|:--------|
52+
| string | Nothing | 0.14.0 |
53+
54+
The value is the tag assigned to the generated events.
55+
56+
57+
### `size`
58+
59+
| type | default | version |
60+
|:--------|:--------|:--------|
61+
| integer | 1 | 0.14.4 |
62+
63+
The number of events in event stream of each emits.
64+
65+
66+
### `rate`
67+
68+
| type | default | version |
69+
|:--------|:--------|:--------|
70+
| integer | 1 | 0.14.0 |
71+
72+
It configures how many events to generate per second.
73+
74+
75+
### `auto_increment_key`
76+
77+
| type | default | version |
78+
|:-------|:--------|:--------|
79+
| string | nil | 0.14.0 |
80+
81+
If specified, each generated event has an auto-incremented key field.
82+
83+
For example, with `auto_increment_key foo_key`, the first couple of
84+
events look like:
85+
86+
```
87+
2014-12-14 23:23:38 +0000 test: {"message":"sample","foo_key":0}
88+
2014-12-14 23:23:38 +0000 test: {"message":"sample","foo_key":1}
89+
2014-12-14 23:23:38 +0000 test: {"message":"sample","foo_key":2}
90+
```
91+
92+
93+
### `suspend`
94+
95+
| type | default | version |
96+
|:-----|:--------|:--------|
97+
| bool | false | 0.14.2 |
98+
99+
This parameter is removed since v1.10.0. This feature is automatically handled in the core.
100+
101+
102+
### `sample`
103+
104+
| type | default | version |
105+
|:-------|:-------------------------|:--------|
106+
| string | `[{"message":"sample"}]` | 0.14.0 |
107+
108+
The sample data to be generated. It should be either an array of JSON
109+
hashes or a single JSON hash. If it is an array of JSON hashes, the
110+
hashes in the array are cycled through in order.
111+
112+
If you use fluentd v1.11.1 or earlier, use `dummy`.
113+
114+
------------------------------------------------------------------------
115+
116+
If this article is incorrect or outdated, or omits critical information, please
117+
[let us know](https://github.com/fluent/fluentd-docs-gitbook/issues?state=open).
118+
[Fluentd](http://www.fluentd.org/) is an open-source project under [Cloud Native
119+
Computing Foundation (CNCF)](https://cncf.io/). All components are available
120+
under the Apache 2 License.

plugins/storage/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ For an input, an output, and filter plugin that supports Storage, the
2828
`<storage>` directive can be used to store key-value pair into the a key-value
2929
store such as JSON file, MongoDB, Redis and so on.
3030

31-
Here is an example with `in_dummy`:
31+
Here is an example with `in_sample`:
3232

3333
```
3434
<source>
35-
@type dummy
35+
@type sample
3636
tag docs.fluentd.storage
3737
<storage awesome_path>
3838
@type my_custom_storage
@@ -48,7 +48,7 @@ Here is an example with `in_dummy`:
4848

4949
## List of Core Plugins with Storage support
5050

51-
- [`in_dummy`](/plugins/input/dummy.md)
51+
- [`in_sample`](/plugins/input/sample.md)
5252

5353

5454
------------------------------------------------------------------------

0 commit comments

Comments
 (0)