Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "API failure" from Elasticsearch 2.3.1 #43

Open
dirkhschulz opened this issue Apr 20, 2016 · 3 comments
Open

Getting "API failure" from Elasticsearch 2.3.1 #43

dirkhschulz opened this issue Apr 20, 2016 · 3 comments

Comments

@dirkhschulz
Copy link

[root@somehost nagios-plugin-elasticsearch-1.1.0]# ./check_elasticsearch -p 9200
API failure

@widhalmt
Copy link

Hi,

I have the same error with Elasticsearch 5.0

Cheers,
Thomas

@darnux
Copy link

darnux commented Nov 27, 2016

Had the same problem after upgrading ES from 1.x to 5.x.
An strace showed that prefix is "/" everytime (I do not use a prefix) and this leads to 404 for //_cluster/health in versions newer than 1.x:
strace sample:
sendto(3, "GET //_cluster/health HTTP/1.1\r\n"..., 134, 0, NULL, 0) = 134 recvfrom(3, "HTTP/1.1 404 Not Found\r\nes.index"..., 8192, 0, NULL, NULL) = 508

This fixed it for me (left original version, right my version):

96,97c96,97
< if not prefix.endswith('/'):
< prefix += '/'
---
> #if not prefix.endswith('/'):
> # prefix += '/'

Second problem arised with stats?all=true whereas the parametr all is not valid anymore.
This fixed it for me (left original version, right my version):`

143c143
< 'stats?all=true' % (host, port, prefix))
---
> 'stats' % (host, port, prefix))

Hope this can help you too.

WBTMagnum added a commit to WIENFLUSS/nagios-plugin-elasticsearch that referenced this issue Nov 28, 2016
@kwisatz
Copy link

kwisatz commented Nov 30, 2016

I'm astonished that the API failure would also happen on 2.3.1, we've been using it on 2.4.2 without a hitch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants