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

Warning healthcheck should also be passing #2452

Closed
takeda opened this issue Oct 31, 2016 · 4 comments
Closed

Warning healthcheck should also be passing #2452

takeda opened this issue Oct 31, 2016 · 4 comments
Labels
theme/health-checks Health Check functionality type/enhancement Proposed improvement or new feature

Comments

@takeda
Copy link

takeda commented Oct 31, 2016

Currently warning health checks are not listed when querying for nodes in passing state.

This behavior makes the warning state somewhat useless, because in order to also get nodes in warning state one has to query for it explicitly.

Perhaps new query state should be created e.g. passing-only which would have the old behavior and have passing to include both passing and warnng.

@bdclark
Copy link

bdclark commented Nov 29, 2016

I discovered the same thing today when testing node and service checks resulting in warning.

DNS queries seem to give a list of "non-failing" services (those in warning and passing state), which I now realize isn't the same as the "passing" param on /v1/health/service/<service> (returns only passing).

So, in order for a health query to give results similar to a DNS query, I'd need to stop using the "passing" param, then add extra filtering logic in my applications to filter-out services in critical state.

As @takeda said, it would be helpful if a param (or params) existed to include "non-failing" services... ie. both passing and warning.

@slackpad slackpad added this to the 0.7.4 milestone Dec 20, 2016
@slackpad slackpad removed this from the Triaged milestone Apr 18, 2017
@slackpad slackpad added the type/enhancement Proposed improvement or new feature label May 3, 2017
@slackpad
Copy link
Contributor

slackpad commented May 3, 2017

This is closely related to #802.

@slackpad slackpad added the theme/health-checks Health Check functionality label May 25, 2017
@bluebob
Copy link

bluebob commented Aug 17, 2017

+1 for takeda's comment. We're using consul-template and it's causing us some grief when a "degraded" node gets deconfigured from a cluster because the service status on that node has slipped to 'warning'.
If you want an example, Elasticsearch data nodes. It's handy to know when they're approaching full disks, but you definitely don't want ES to mark the node as dead and try and migrate all it's data!
Any progress folks?

@ChipV223 ChipV223 closed this as completed Apr 8, 2021
@ChipV223 ChipV223 reopened this Apr 8, 2021
@jkirschner-hashicorp
Copy link
Contributor

Hi @takeda, @bdclark, @bluebob, and others,

If I understand correctly, you were looking for a way to get a list of nodes or services which are in either the passing or warning states (just exclude critical).

As of version 1.5, the node and service health endpoints support filtering expressions to filter the query's results based on field values (like Status):

  • /v1/health/node/:node's filter query parameter
  • /v1/health/service/:service's filter query parameter

This functionality was implemented in this PR.

For example, the below should return all non-critical services:

curl --get \
    http://127.0.0.1:8500/v1/health/service/my-service
    --data-urlencode 'filter=Status == "passing" or Status == "warning"'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/health-checks Health Check functionality type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

6 participants