sensu-plugins / sensu-plugins-consul

This plugin provides native instrumentation for monitoring Consul, including: Consul server service and cluster health, and querying the Consul API to check for passing/critical services.
http://sensu-plugins.io
MIT License
13 stars 25 forks source link

check-consul-failures.rb returns a 405 when attempting to remove a node #40

Closed majormoses closed 6 years ago

majormoses commented 6 years ago

We are seeing:

Name: <REDACTED_HOSTNAME>
ConsulStatus UNKNOWN: Consul returned: 405 Method Not Allowed

After inspecting the relevant code: https://github.com/sensu-plugins/sensu-plugins-consul/blob/master/bin/check-consul-failures.rb#L80-L84 and the consul documentation: https://www.consul.io/api/agent.html#force-leave-and-shutdown it should be a put not a get.

majormoses commented 6 years ago

I looked through git history and that call never worked or this was prompted by a change in some version of consul. cc @sstarcher as the original author of the check to validate.