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

Catch "Connection refused" error #8

Napsty opened this Issue Apr 3, 2019 · 1 comment


None yet
1 participant
Copy link

Napsty commented Apr 3, 2019

When ES is not running under the given port, the plugin currently simply outputs this:

# /usr/lib/nagios/plugins/ -H "myesnode" -t status
ES SYSTEM UNKNOWN - Authentication required but missing username and password

But using curl itself clearly shows that the connection to port 9200 cannot be established:

# curl http://myesnode:9200/_cluster/stats
curl: (7) Failed to connect to myesnode port 9200: Connection refused

In the plugin we can't see that because we use a silent curl output, however we can use curl's exit status:

# curl -k -s --max-time 30 http://myesnode:9200/_cluster/stats
# echo $?

This comment has been minimized.

Copy link
Owner Author

Napsty commented Apr 3, 2019

Fixed in version 1.3

@Napsty Napsty closed this Apr 3, 2019

@Napsty Napsty added the enhancement label Apr 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.