Consul + Consul Template + Filebeat

Description

This image starts Consul and other processes in folder /docker/run. In this folder, scripts have been created to run Consul Template and Filebeat. To customize, just remove processes that's no matters, and/or add others.

Processes

Consul

The Consul process, which is initialized by /consul.sh script, uses dump-init to run the process, this allows Consul process to capture signals from OS like SIGTERM and SIGHUP to reload configuration or be gracefully shutdown.

Consul Template

Consul Template watches for updates on key-pair values stored by Consul to reload templates that use these key-pair values. Any update to this information triggers the rewrite of template and, optionally, runs a command that could be to restart a service that uses the template.

This image contains a template defined to Filebeat, the template configurations are founded on /etc/consul-template, are files with .list extension. The script /etc/consul-template/consul-template-loader.sh read all files inside /etc/consul-template folder with .list extension, sorting by name, and for each line of these files is created a entry for Consul template configuration.

$APPLICATION_NAME/filebeat/prospectors/paths: Path to logs that be send to Kibana

Note: By default, the value of $APPLICATION_NAME variable is the value defined in $APPLICATION_DEFAULT_NAME, which is consul-filebeat-agents. Set a value in $APPLICATION_NAME to change default application name.

Locale e Localtime Configuration

By default, this image is configured to use en_US.UTF-8 locale and UTC localtime.