Skip to content

Commit 93d7eed

Browse files
committed
Update README
Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
1 parent 95eb164 commit 93d7eed

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

README.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# fluent-plugin-fluent-package-update-notifier
22

3-
[Fluentd](https://fluentd.org/) input plugin to do something.
4-
5-
TODO: write description for you plugin.
3+
[Fluentd](https://fluentd.org/) input plugin to notify with
4+
update logging when newer `fluent-package` is available.
65

76
## Installation
87

@@ -28,13 +27,41 @@ $ bundle
2827

2928
## Configuration
3029

31-
You can generate configuration template:
30+
|parameter|type|description|default|
31+
|---|---|---|---|
32+
|lts|bool (optional)|Notify fluent-package updates which depends on channel (e.g. Monitor LTS by default)|`true`|
33+
|notify_major_upgrade|bool (optional)|Notify whether major upgrade is available or not (e.g. from v5 to v6)|`true`|
34+
|notify_level|enum (optional)|Specify notification log level when update is available (`info`, `warn`)|`info`|
35+
|notify_interval|integer (optional)|Notify checking update intervals|`86400`|
36+
37+
## Example
38+
39+
If you want to collect update notification via log stream to specific file, let's configure it with @FLUENT_LOG label:
3240

3341
```
34-
$ fluent-plugin-config-format input fluent-package-update-notifier
42+
<source>
43+
@type fluent_package_update_notifier
44+
</source>
45+
46+
<label @FLUENT_LOG>
47+
<match fluent.{warn,info}>
48+
@type file
49+
path notify-fluent-log
50+
<buffer []>
51+
flush_at_shutdown
52+
</buffer>
53+
</match>
54+
</label>
3555
```
3656

37-
You can copy and paste generated documents here.
57+
When shutting down fluentd, `notify-fluent-log_0.log` or similar file (`notify-fluent-log_N.log`) will be saved.
58+
59+
```
60+
2025-04-21T12:30:53+09:00 fluent.info {"pid":134883,"ppid":134869,"worker":0,"message":"starting fluentd worker pid=134883 ppid=134869 worker=0"}
61+
2025-04-21T12:30:53+09:00 fluent.info {"message":"fluent-package v5.0.6 is available! See https://github.com/fluent/fluent-package-builder/releases/tag/v5.0.6 in details.\n"}
62+
2025-04-21T12:30:53+09:00 fluent.info {"worker":0,"message":"fluentd worker is now running worker=0"}
63+
2025-04-21T12:31:00+09:00 fluent.info {"worker":0,"message":"fluentd worker is now stopping worker=0"}
64+
```
3865

3966
## Copyright
4067

0 commit comments

Comments
 (0)