Fix indices_stats_url for ElasticSearch 5.0#21
Open
asterr wants to merge 3 commits intomattweber:masterfrom
Open
Fix indices_stats_url for ElasticSearch 5.0#21asterr wants to merge 3 commits intomattweber:masterfrom
asterr wants to merge 3 commits intomattweber:masterfrom
Conversation
added 3 commits
December 12, 2016 09:35
See: elastic/elasticsearch#21410 The all=true parameter is no longer supported, and causes the HTTP GET to return: $ curl 'http://ny2-laa-005:9200/_stats?all=true' {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/_stats] contains unrecognized parameter: [all]"}],"type":"illegal_argument_exception","reason":"request [/_stats] contains unrecognized parameter: [all]"},"status":400} This causes the es2graphite.py to throw this stack trace and continuously retry: 2016-12-12 09:31:08,006 [MainThread] [INFO ] 2016-12-12 09:31:06: GET http://ny2-laa-005:9200/_stats?all=true 2016-12-12 09:31:08,352 [MainThread] [ERROR ] Traceback+%28most+recent+call+last%29%3A%0A++File+%22.%2Fes2graphite.py%22%2C+line+328%2C+in+%3Cmodule%3E%0A++++get_metrics%28%29%0A++File+%22.%2Fes2graphite.py%22%2C+line+34%2C+in+timed%0A++++result+%3D+method%28%2Aargs%2C+%2A%2Akw%29%0A++File+%22.%2Fes2graphite.py%22%2C+line+274%2C+in+get_metrics%0A++++indices_stats_data+%3D+urllib2.urlopen%28indices_stats_url%29.read%28%29%0A++File+%22%2FSystem%2FLibrary%2FFrameworks%2FPython.framework%2FVersions%2F2.7%2Flib%2Fpython2.7%2Furllib2.py%22%2C+line+154%2C+in+urlopen%0A++++return+opener.open%28url%2C+data%2C+timeout%29%0A++File+%22%2FSystem%2FLibrary%2FFrameworks%2FPython.framework%2FVersions%2F2.7%2Flib%2Fpython2.7%2Furllib2.py%22%2C+line+437%2C+in+open%0A++++response+%3D+meth%28req%2C+response%29%0A++File+%22%2FSystem%2FLibrary%2FFrameworks%2FPython.framework%2FVersions%2F2.7%2Flib%2Fpython2.7%2Furllib2.py%22%2C+line+550%2C+in+http_response%0A++++%27http%27%2C+request%2C+response%2C+code%2C+msg%2C+hdrs%29%0A++File+%22%2FSystem%2FLibrary%2FFrameworks%2FPython.framework%2FVersions%2F2.7%2Flib%2Fpython2.7%2Furllib2.py%22%2C+line+475%2C+in+error%0A++++return+self._call_chain%28%2Aargs%29%0A++File+%22%2FSystem%2FLibrary%2FFrameworks%2FPython.framework%2FVersions%2F2.7%2Flib%2Fpython2.7%2Furllib2.py%22%2C+line+409%2C+in+_call_chain%0A++++result+%3D+func%28%2Aargs%29%0A++File+%22%2FSystem%2FLibrary%2FFrameworks%2FPython.framework%2FVersions%2F2.7%2Flib%2Fpython2.7%2Furllib2.py%22%2C+line+558%2C+in+http_error_default%0A++++raise+HTTPError%28req.get_full_url%28%29%2C+code%2C+msg%2C+hdrs%2C+fp%29%0AHTTPError%3A+HTTP+Error+400%3A+Bad+Request%0A
Fixes broken HTTP GET for index statistics. Should be backwards compatible because the all=true parameter has not been used by elasticsearch for a long time. See: elastic/elasticsearch#21410
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes broken HTTP GET for index statistics.
Should be backwards compatible because the all=true parameter has not been used by ElasticSearch for a long time.
See: elastic/elasticsearch#21410