48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# File 'lib/logstash/outputs/elastic_app_search.rb', line 48
def register
log_message = "The App Search product is deprecated and not supported from version 9 of the Elastic Stack. " +
"The Elastic App Search output plugin is deprecated and will only receive security updates and critical bug fixes. " +
"Please migrate to the Elastic Connector for continued support. " +
"For more details, please visit https://www.elastic.co/guide/en/search-ui/current/tutorials-elasticsearch.html"
deprecation_logger.deprecated log_message
@retry_disabled = false
@client = LogStash::PluginMixins::EnterpriseSearch::AppSearch::Client.new(client_options, params: params)
check_connection!
rescue => e
if e.message =~ /401/
raise ::LogStash::ConfigurationError, "Failed to connect to App Search. Please check your credentials. Error: #{e.message}"
elsif e.message =~ /404/
raise ::LogStash::ConfigurationError, "Failed to connect to App Search. Please check if url '#{@url}' is correct and you've created an engine with name '#{@engine}'. Error: #{e.message}"
else
raise ::LogStash::ConfigurationError, "Failed to connect to App Search. Error: #{e.message}"
end
end
|