Created
June 18, 2020 23:40
-
-
Save Creatiwww/0967f794a4f115cdea9d5c553a47c92c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| FROM docker.elastic.co/beats/filebeat:7.7.0 | |
| # Copy our custom configuration file | |
| COPY filebeat.yml /usr/share/filebeat/filebeat.yml | |
| USER root | |
| RUN chown root:filebeat /usr/share/filebeat/filebeat.yml | |
| RUN mkdir /usr/share/filebeat/dockerlogs | |
| RUN chown -R root /usr/share/filebeat/ | |
| RUN chmod -R go-w /usr/share/filebeat/ | |
| CMD ./filebeat -e |
This file contains hidden or 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
| filebeat.config: | |
| modules: | |
| path: ${path.config}/modules.d/*.yml | |
| reload.enabled: false | |
| output.logstash: | |
| hosts: ["logstash:5044"] | |
| filebeat.inputs: | |
| - type: log | |
| enabled: true | |
| paths: | |
| - /var/log/app.log | |
| tags: ["test-app"] | |
| scan_frequency: 5s | |
| # processors to filter and enhance data before sending it to the configured output | |
| processors: | |
| - add_fields: | |
| target: '' | |
| fields: | |
| service_name: TEST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment