Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Add MONGO_COLLECTION var and fix collections mismatch (#61 and #62)
Browse files Browse the repository at this point in the history
Co-authored-by: wallrony <wallrony@users.noreply.github.com>
  • Loading branch information
vassalo and wallrony committed Feb 11, 2022
1 parent fb74a34 commit 37bf227
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
1 change: 1 addition & 0 deletions docs/CONFIGURE_MONGO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

The Log Export Container uses [fluentd mongo output plugin](https://docs.fluentd.org/output/mongo). In order to enable it you need to specify `LOG_EXPORT_CONTAINER_OUTPUT=mongo` and provide the following variables:
* **MONGO_URI**. Mongo Connection URI
* **MONGO_COLLECTION**. Mongo Collection to store the Log Export Container logs. Default=sdm_logs.
2 changes: 1 addition & 1 deletion fluentd/etc/classify-default-json.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<rule>
key type
pattern /activity/
tag activity
tag class.activity
</rule>
<rule>
key type
Expand Down
12 changes: 2 additions & 10 deletions fluentd/etc/output-mongo.conf
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
<store class.*>
<store>
@type mongo
connection_string "#{ENV['MONGO_URI']}"
collection logs
collection "#{ENV['MONGO_COLLECTION'] || 'sdm_logs'}"
remove_tag_prefix class.
<buffer>
flush_interval 10s
</buffer>
</store>
<store activity>
@type mongo
connection_string "#{ENV['MONGO_URI']}"
collection activities
<buffer>
flush_interval 15m
</buffer>
</store>

0 comments on commit 37bf227

Please sign in to comment.