Skip to content

Commit

Permalink
Add FLUENT_ELASTICSEARCH_RELOAD_ON_FAILURE envvar to suppress sniffering
Browse files Browse the repository at this point in the history
This is reported in
uken/fluent-plugin-elasticsearch#525.

Invalid sniffer information is obtained by default, but we can avoid
the following configuration:

```aconf
reload_connections false
reconnect_on_error true
reload_on_failure true
```

To specify reload_on_failure on fluentd-kubernetes-daemonset,
we should introduce a new envver to specify it.

Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
  • Loading branch information
cosmo0920 committed Mar 22, 2019
1 parent 9b9aec0 commit 7cf883b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

IMAGE_NAME := fluent/fluentd-kubernetes
ALL_IMAGES := \
v1.3/debian-elasticsearch:v1.3.3-debian-elasticsearch-1.4,v1.3-debian-elasticsearch-1 \
v1.3/debian-elasticsearch:v1.3.3-debian-elasticsearch-1.5,v1.3-debian-elasticsearch-1 \
v1.3/debian-loggly:v1.3.3-debian-loggly-1.2,v1.3-debian-loggly-1 \
v1.3/debian-logentries:v1.3.3-debian-logentries-1.2,v1.3-debian-logentries-1 \
v1.3/debian-cloudwatch:v1.3.3-debian-cloudwatch-1.3,v1.3-debian-cloudwatch-1 \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ See also dockerhub tags page: https://hub.docker.com/r/fluent/fluentd-kubernetes

### Debian

- `v1.3.3-debian-elasticsearch-1.4,v1.3-debian-elasticsearch-1` [docker-image/v1.3/debian-elasticsearch/Dockerfile](docker-image/v1.3/debian-elasticsearch/Dockerfile)
- `v1.3.3-debian-elasticsearch-1.5,v1.3-debian-elasticsearch-1` [docker-image/v1.3/debian-elasticsearch/Dockerfile](docker-image/v1.3/debian-elasticsearch/Dockerfile)
- `v1.3.3-debian-loggly-1.2,v1.3-debian-loggly-1` [docker-image/v1.3/debian-loggly/Dockerfile](docker-image/v1.3/debian-loggly/Dockerfile)
- `v1.3.3-debian-logentries-1.2,v1.3-debian-logentries-1` [docker-image/v1.3/debian-logentries/Dockerfile](docker-image/v1.3/debian-logentries/Dockerfile)
- `v1.3.3-debian-cloudwatch-1.3,v1.3-debian-cloudwatch-1` [docker-image/v1.3/debian-cloudwatch/Dockerfile](docker-image/v1.3/debian-cloudwatch/Dockerfile)
Expand Down
1 change: 1 addition & 0 deletions docker-image/v1.3/debian-elasticsearch/conf/fluent.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
password "#{ENV['FLUENT_ELASTICSEARCH_PASSWORD']}"
reload_connections "#{ENV['FLUENT_ELASTICSEARCH_RELOAD_CONNECTIONS'] || 'true'}"
reconnect_on_error "#{ENV['FLUENT_ELASTICSEARCH_RECONNECT_ON_ERROR'] || 'false'}"
reload_on_failure "#{ENV['FLUENT_ELASTICSEARCH_RELOAD_ON_FAILURE'] || 'false'}"
logstash_prefix "#{ENV['FLUENT_ELASTICSEARCH_LOGSTASH_PREFIX'] || 'logstash'}"
logstash_format "#{ENV['FLUENT_ELASTICSEARCH_LOGSTASH_FORMAT'] || 'true'}"
index_name "#{ENV['FLUENT_ELASTICSEARCH_LOGSTASH_INDEX_NAME'] || 'logstash'}"
Expand Down
2 changes: 1 addition & 1 deletion docker-image/v1.3/debian-elasticsearch/hooks/post_push
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tagStart=$(expr index "$IMAGE_NAME" :)
repoName=${IMAGE_NAME:0:tagStart-1}

# Tag and push image for each additional tag
for tag in {v1.3.3-debian-elasticsearch-1.4,v1.3-debian-elasticsearch-1}; do
for tag in {v1.3.3-debian-elasticsearch-1.5,v1.3-debian-elasticsearch-1}; do
docker tag $IMAGE_NAME ${repoName}:${tag}
docker push ${repoName}:${tag}
done
1 change: 1 addition & 0 deletions templates/conf/fluent.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
password "#{ENV['FLUENT_ELASTICSEARCH_PASSWORD']}"
reload_connections "#{ENV['FLUENT_ELASTICSEARCH_RELOAD_CONNECTIONS'] || 'true'}"
reconnect_on_error "#{ENV['FLUENT_ELASTICSEARCH_RECONNECT_ON_ERROR'] || 'false'}"
reload_on_failure "#{ENV['FLUENT_ELASTICSEARCH_RELOAD_ON_FAILURE'] || 'false'}"
logstash_prefix "#{ENV['FLUENT_ELASTICSEARCH_LOGSTASH_PREFIX'] || 'logstash'}"
logstash_format "#{ENV['FLUENT_ELASTICSEARCH_LOGSTASH_FORMAT'] || 'true'}"
index_name "#{ENV['FLUENT_ELASTICSEARCH_LOGSTASH_INDEX_NAME'] || 'logstash'}"
Expand Down

0 comments on commit 7cf883b

Please sign in to comment.