-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add configuration and install plugins
- Loading branch information
1 parent
73b29e5
commit 8fa7007
Showing
9 changed files
with
254 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
fluentd_sources_conf: [] | ||
# fluentd_sources_conf: | ||
# - "type": forward | ||
# "params": | ||
# "port": 24224 | ||
# "bind": 0.0.0.0 | ||
# - "type": dummy | ||
# "params": | ||
# "dummy": "{\"hello\":\"world\"}" | ||
# "tag": testi | ||
# - "type": exec | ||
# "params": | ||
# "command": cmd arg arg | ||
# "parse": | ||
# "keys": k1 k2 k3 | ||
# "extract": | ||
# "tag_key": k1 | ||
# "time_key": k2 | ||
# "time_format": "%Y-%m-%d %H:%M:%S" | ||
# "run_interval": 10s | ||
|
||
fluentd_outputs_conf: [] | ||
# fluentd_outputs_conf: | ||
# - "type": file | ||
# "tag": "app.*" | ||
# "params": | ||
# "path": /tmp/myapp_log | ||
# "compress": gzip | ||
# "buffer": | ||
# "timekey": 1d | ||
# "timekey_use_utc": true | ||
# "timekey_wait": 10m | ||
# - "type": copy | ||
# "tag": "*" | ||
# "params": | ||
# "store": | ||
# - "type": file | ||
# "path": /tmp/myapp | ||
# "compress": gzip | ||
# "format": | ||
# "localtime": false | ||
# "buffer": | ||
# "timekey_wait": 10m | ||
# "timekey": 86400 | ||
# "timekey_use_utc": true | ||
# "path": /tmp/myapp | ||
# "inject": | ||
# "time_format": "%Y-%m-%d %H:%M:%S" | ||
# "localtime": false | ||
# - "type": elasticsearch | ||
# "host": fluentd | ||
# "port": 9200 | ||
# "index_name": fluentd | ||
# "type_name": fluentd | ||
|
||
fluentd_filters_conf: [] | ||
# fluentd_filters_conf: | ||
# - "type": grep | ||
# "tag": foo.bar | ||
# "params": | ||
# "regexp": | ||
# - "key": message | ||
# "pattern": /cool/ | ||
# - "key": hostname | ||
# "pattern": /^web\d+\.example\.com$/ | ||
# "exclude": | ||
# "key": message | ||
# "pattern": uncool | ||
|
||
# Paths to custom configuration templates | ||
fluentd_custom_conf: [] | ||
|
||
# Fluentd plugins that you want to install | ||
fluentd_plugins: [] | ||
# - { url: "https://raw.githubusercontent.com/emsearcy/fluent-plugin-gelf/master/lib/fluent/plugin/out_gelf.rb" } | ||
# - { name: "fluent-plugin-secure-forward", 'version': 0.2.3 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
- name: Restart td-agent | ||
--- | ||
- name: restart td-agent | ||
service: | ||
name: td-agent | ||
state: restarted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# {{ ansible_managed }} | ||
|
||
{% for filter in fluentd_filters_conf %} | ||
<filter {{ filter.tag }}> | ||
@type {{ filter.type }} | ||
{% for key, value in filter.items()|sort(attribute='0') %} | ||
{% if key == "params" %} | ||
{{ value |fluentd_params_to_text }} | ||
{% endif %} | ||
{% endfor %} | ||
</filter> | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# {{ ansible_managed }} | ||
|
||
{% for output in fluentd_outputs_conf %} | ||
<match {{ output.tag }}> | ||
@type {{ output.type }} | ||
{% for key, value in output.items()|sort(attribute='0') %} | ||
{% if key == "params" %} | ||
{{ value |fluentd_params_to_text }} | ||
{% endif %} | ||
{% endfor %} | ||
</match> | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# {{ ansible_managed }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# {{ ansible_managed }} | ||
|
||
{% for source in fluentd_sources_conf %} | ||
<source> | ||
@type {{ source.type }} | ||
{% for key, value in source.items()|sort(attribute='0') %} | ||
{% if key != "type" %} | ||
{{ value |fluentd_params_to_text }} | ||
{% endif %} | ||
{% endfor %} | ||
</source> | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# {{ ansible_managed }} | ||
|
||
<system> | ||
workers {{ ansible_processor_vcpus }} | ||
</system> | ||
|
||
@include /etc/td-agent/conf.d/*.conf |