-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide fluentd service to ship logs to logging infrastructure
- Loading branch information
1 parent
4ba9b31
commit b38de32
Showing
3 changed files
with
44 additions
and
1 deletion.
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,3 @@ | ||
FROM fluent/fluentd:v1.16.0-debian-1.0 | ||
USER root | ||
RUN ["gem", "install", "fluent-plugin-opensearch", "--no-document"] |
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,31 @@ | ||
## match tag=debug.** and dump to console | ||
<match debug.**> | ||
@type stdout | ||
@id output_stdout | ||
</match> | ||
|
||
# Getting logs from pdnssoc to send to OpenSearch | ||
<source> | ||
@type tail | ||
path /var/pDNSSOC/alerts/matches.json | ||
tag pdnssoc | ||
read_from_head true | ||
pos_file /fluentd/etc/alerts.log.pos | ||
<parse> | ||
@type json | ||
</parse> | ||
</source> | ||
|
||
<match pdnssoc> | ||
@type opensearch | ||
hosts https://opensearch_instance | ||
index_name ${tag}-%Y.%m.%d #=> e.g.) elastic.20170811 | ||
<buffer tag, time> | ||
@type memory | ||
flush_mode immediate | ||
timekey 3600 | ||
</buffer> | ||
user %{CHANGE_ME} | ||
password %{CHANGE_ME} | ||
ssl_verify false | ||
</match> |