Skip to content

Commit

Permalink
Use root path, "/" to get cluster_name
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle committed Dec 20, 2023
1 parent 9f6d983 commit 1bafa17
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def nr_cluster_name
return if nr_hosts.empty?

NewRelic::Agent.disable_all_tracing do
@nr_cluster_name ||= perform_request('GET', '_cluster/health').body['cluster_name']
@nr_cluster_name ||= perform_request('GET', '/').body['cluster_name']
end
rescue StandardError => e
NewRelic::Agent.logger.error('Failed to get cluster name for elasticsearch', e)
Expand Down

0 comments on commit 1bafa17

Please sign in to comment.