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
| const requestContext = require("../request-context"); | |
| function getHeaderName(config) { | |
| if (!config.dynamicLogLevel || !config.dynamicLogLevel.header) { | |
| return "x-log-level"; | |
| } | |
| return config.dynamicLogLevel.header; | |
| } |
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
| { | |
| "metrics" : { | |
| "order" : 0, | |
| "template" : "metrics-*", | |
| "settings" : { | |
| "index" : { | |
| "refresh_interval" : "5s" | |
| } | |
| }, | |
| "mappings" : { |
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
| namespace :tests do | |
| task :test_config do | |
| puts "TESTING CONFIG..." | |
| name = ENV['IMAGE_NAME'] || raise('You must specify an IMAGE_NAME') | |
| tag = ENV['GO_PIPELINE_LABEL'] || raise('No label specified') | |
| docker_hub_user_or_registry = ENV['DOCKER_REGISTRY'] || ENV['DOCKER_HUB_USER'] || raise('No registry or docker hub user specified') | |
| docker_file_location = ENV['DOCKER_FILE_LOCATION'] || "." | |
| full_image_id = "#{docker_hub_user_or_registry}/#{name}:#{tag}" |
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 logstash:1.5.4 | |
| RUN /opt/logstash/bin/plugin install logstash-filter-translate | |
| RUN /opt/logstash/bin/plugin install logstash-filter-json_encode | |
| RUN mkdir -p /geoip \ | |
| && curl -SLo /geoip/GeoLiteCity.dat.gz http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz \ | |
| && curl -SLo /geoip/GeoIPASNum.dat.gz http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz \ | |
| && gunzip /geoip/*.gz \ | |
| && rm -f /geoip/*.gz |
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
| task :default => [ :build_image ] | |
| task :build_image do | |
| name = ENV['IMAGE_NAME'] || raise('You must specify an IMAGE_NAME') | |
| tag = ENV['GO_PIPELINE_LABEL'] || raise('No label specified') | |
| docker_hub_user_or_registry = ENV['DOCKER_REGISTRY'] || ENV['DOCKER_HUB_USER'] || raise('No registry or docker hub user specified') | |
| docker_file_location = ENV['DOCKER_FILE_LOCATION'] || "." | |
| full_image_id = "#{docker_hub_user_or_registry}/#{name}:#{tag}" | |
| local_image_id = "#{name}:#{tag}" |
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
| task :build_image do | |
| name = ENV['IMAGE_NAME'] || raise('You must specify an IMAGE_NAME') | |
| tag = ENV['GO_PIPELINE_LABEL'] || raise('No label specified') | |
| docker_hub_user_or_registry = ENV['DOCKER_REGISTRY'] || ENV['DOCKER_HUB_USER'] || raise('No registry or docker hub user specified') | |
| docker_file_location = ENV['DOCKER_FILE_LOCATION'] || "." | |
| full_image_id = "#{docker_hub_user_or_registry}/#{name}:#{tag}" | |
| Dir.chdir("../../#{docker_file_location}") |
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
| full_image_id = "#{registry_or_docker_hub_user}/#{name}:#{tag}" | |
| // Example: docker-registry.laterooms.com:5000/tlrg-logstash-central:7e88f94a87d90312ad315d15ab4f34a90b1daf97 | |
| sudo docker build -t #{full_image_id} . |
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 logstash:1.5.3 | |
| RUN /opt/logstash/bin/plugin install logstash-filter-translate | |
| RUN /opt/logstash/bin/plugin install logstash-filter-json_encode |
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
| logstash: | |
| image: pblittle/docker-logstash | |
| volumes: | |
| - ./logstash-config:/opt/logstash/conf.d/ | |
| - /var/log/logstash:/var/log/logstash | |
| - ./geoip:/opt/logstash/vendor/geoip/ | |
| - ./ssl:/opt/ssl/ |
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
| if [url_path] =~ /^\/status$/ { | |
| mutate { add_tag => "health-check" } | |
| } else if [url_path] =~ /^\/beacon\// { | |
| mutate { add_tag => "beacon" } | |
| } else { | |
| mutate { add_tag => "content" } | |
| } |
NewerOlder