Skip to content

Commit

Permalink
Remove irrelevant warning (#1202)
Browse files Browse the repository at this point in the history
* Remove irrelevant warning

This commit removes an old warning which is no longer relevant to any supported
stack version. It is noisy and there is no action for the user to take.

* Add changelog entry for log removal

* 11.22.11 release prep

Update version in preparation for a release.
  • Loading branch information
donoghuc authored Jan 15, 2025
1 parent 6a32bbe commit e761a3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 11.22.11
- Remove irrelevant log warning about elastic stack version [#1202](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1202)

## 11.22.10
- Add `x-elastic-product-origin` header to Elasticsearch requests [#1195](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1195)

Expand Down
9 changes: 1 addition & 8 deletions lib/logstash/outputs/elasticsearch/http_client/pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -515,20 +515,13 @@ def set_last_es_version(version, url)
major = major_version(version)
if @maximum_seen_major_version.nil?
@logger.info("Elasticsearch version determined (#{version})", es_version: major)
set_maximum_seen_major_version(major)
@maximum_seen_major_version = major
elsif major > @maximum_seen_major_version
warn_on_higher_major_version(major, url)
@maximum_seen_major_version = major
end
end

def set_maximum_seen_major_version(major)
if major >= 6
@logger.warn("Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type", es_version: major)
end
@maximum_seen_major_version = major
end

def warn_on_higher_major_version(major, url)
@logger.warn("Detected a node with a higher major version than previously observed, " +
"this could be the result of an Elasticsearch cluster upgrade",
Expand Down
2 changes: 1 addition & 1 deletion logstash-output-elasticsearch.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'logstash-output-elasticsearch'
s.version = '11.22.10'
s.version = '11.22.11'
s.licenses = ['apache-2.0']
s.summary = "Stores logs in Elasticsearch"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand Down

0 comments on commit e761a3c

Please sign in to comment.