Skip to content

Commit

Permalink
Merge pull request #229 from ovanekem/master
Browse files Browse the repository at this point in the history
Creates the filebeat template dynamically (and associated to the corr…
  • Loading branch information
spujadas committed Oct 4, 2018
2 parents 2a9a04e + e60b7ce commit d9bcf09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions nginx-filebeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ RUN chmod 644 /etc/filebeat/filebeat.yml
RUN mkdir -p /etc/pki/tls/certs
ADD logstash-beats.crt /etc/pki/tls/certs/logstash-beats.crt

# create template based on filebeat version (assumption: it is the same version as elasticsearch version)
RUN filebeat export template --es.version ${FILEBEAT_VERSION} > /etc/filebeat/filebeat.template.json

###############################################################################
# DATA
###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion nginx-filebeat/start.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

curl -XPUT 'http://elk:9200/_template/filebeat?pretty' -d@/etc/filebeat/filebeat.template.json
curl -XPUT -H "Content-Type: application/json" 'http://elk:9200/_template/filebeat?pretty' -d@/etc/filebeat/filebeat.template.json
/etc/init.d/filebeat start
nginx
tail -f /var/log/nginx/access.log -f /var/log/nginx/error.log

0 comments on commit d9bcf09

Please sign in to comment.