Skip to content

Commit

Permalink
Removed logspout, added filebeat [DHS-1094, DHS-1058]
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlinssen committed Dec 3, 2020
1 parent d440d64 commit ea67514
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,17 @@ RUN sed -ri \
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
"/etc/httpd/conf/httpd.conf"


###############################################################################
# INSTALLATION FILEBEAT
###############################################################################

### install Filebeat
RUN wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${ENV_FILEBEAT_VERSION}-amd64.deb -O /tmp/filebeat.deb \
&& dpkg -i /tmp/filebeat.deb

ADD filebeat.yml /etc/filebeat/filebeat.yml
RUN chmod go-w /etc/filebeat/filebeat.yml

EXPOSE 80
CMD ["/opt/run-httpd.sh"]
16 changes: 16 additions & 0 deletions filebeat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
filebeat.inputs:
- type: log
json.keys_under_root: true
json.add_error_key: true
json.overwrite_keys: true
enabled: true
paths:
- /var/log/httpd/access.log
- /var/log/httpd/error.log
tags: ["DAVRODS"]

# Disable filebeat monitoring
logging.metrics.enabled: false

output.logstash:
hosts: ["elk.dh.local:5044"]

0 comments on commit ea67514

Please sign in to comment.