-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add option to further filter Consul Watch -type=checks -state=X by Tag #17642
Comments
@mcousens , thanks for your suggestions. This sounds a good enhancement and we will look into it. |
@mcousens , we would like to gather more information from you regarding the feature request. The current version (1.15) of
So,
I noticed |
Hi @huikang, yes exactly - we are proposing to make the checks watch support the Ex:
To clarify the additional note we made about also being able to filter by
While it would be a nice feature to also be able to filter by |
@mcousens , thanks for your response. That totall makes sense. We will look into it and get back to you soon. |
Will go ahead and close this issue @mcousens as the PR which addresses this issue is now merged. Thanks for the feedback! |
We'll go ahead and try to backport to 1.16.x to get this out in the next 1.16.1 patch release. |
Apologies for the late reply, I was out of the office - thanks so much for the quick turnaround on this feature! |
Feature Description
We are requesting to add the ability to further filter Consul Watch
type=checks
state=<state>
data by-tag
to monitor a more narrow scope of data. Ideally, we'd love to be able to filter by-service
as well to narrow it even further.currently allowed:
consul watch -type=checks -state=critical
ideal state, example:
consul watch -type=checks -service=redis -state=critical -tag=autoscaling_group
Use Case(s)
AWS Autoscaling Groups provide a set-instance-health endpoint so that you can mark an instance as unhealthy from an external system.
When using Consul for service discovery, you have a variety of health checks for nodes that can let you know when a service is in a critical state and the application may not be able to run correctly. By monitoring the Consul health checks via a Consul Watch, you can call the AWS
set-instance-health
endpoint when a node has a critical health check so that the AWS Autoscaling Group can replace the instance.We use the below Consul Watch to monitor critical health checks for our AWS Autoscaling Groups so that we can mark the node as Unhealthy in the AWS ASG and replace the instance with a healthy one.
consul watch -type=checks -state=critical
Because we can't filter checks in the critical state by Tag, we must monitor critical health checks across our entire system and constantly ingest and parse the input to find relevant health checks. It would be very helpful if we could tell the Consul Watch to only monitor critical health checks for nodes that are a part of the autoscaling group via a tag. Ideally, we could also further filter by Service to get a very specific view of what you need:
consul watch -type=checks -service=redis -state=critical -tag=autoscaling_group
The text was updated successfully, but these errors were encountered: