Allow multiple checks attached to a service #230

Closed
tarrant opened this Issue Jun 25, 2014 · 13 comments

Projects

None yet

8 participants

@tarrant
tarrant commented Jun 25, 2014

It would be useful if a service can have multiple checks associated with it. For example you might want a check for seeing if the service is alive and a check to make sure that the service is running the correct software version.

By allowing multiple checks its then possible to build generic checks for checking version while having a check specific to the service for checking if the service is running.

@abursavich
Contributor

I ran into a similar situation where I wanted multiple checks for a single service and was surprised to realize that it wasn't allowed.

@armon
Member
armon commented Jun 27, 2014

So internally we allow multiple checks per service, it is just a limitation of our config file format. We can probably add a "checks" key such that a list of checks can be provided instead of a single "check" block.

@armon
Member
armon commented Jun 27, 2014

As a work around, using the API will allow multiple checks to be registered

@abursavich
Contributor

The only way that I could see to register multiple was to go through the catalog endpoints instead of the agent endpoints. Will the anti-entropy in the agent remove any services/checks/etc that weren't registered through it?

@armon
Member
armon commented Jun 29, 2014

@abursavich Hmm that is a good point. I think you are right, the agent will deregister them when anti-entropy happens.

@geku
geku commented Jun 30, 2014

From my point of view it's important to be able to register/deregister service health checks independent of the service itself. This allows to add health checks at a later time without re-regestring the service itself. Currently it's only possible to register the one service health check together with the service.

@abursavich
Contributor

This is really a different issue, but if there will be changes to service registration I'd just like to note that it's important to be able to mutate a service definition without having to deregister then reregister it. Consider acquiring a lock and then needing to add a tag (e.g. "master") without losing the lock by first deregistering the service and its associated health checks.

@armon
Member
armon commented Jul 1, 2014

I agree with all of the above ๐Ÿ‘

@armon armon added the enhancement label Oct 14, 2014
@DevBOFH
Contributor
DevBOFH commented Nov 18, 2014

Any updates on this one? Allowing multiple checks on a service is desperately needed.

@armon
Member
armon commented Nov 18, 2014

Not yet, but it is top of mind!

@janitha
janitha commented Dec 11, 2014

+1 Would be really useful to be able to attach multiple health checks per service

@amiorin
amiorin commented Dec 17, 2014

๐Ÿ‘

@rrreeeyyy

๐Ÿ‘

@ryanuber ryanuber closed this in #591 Jan 21, 2015
@vkostetski vkostetski referenced this issue in OrbitzWorldwide/consul-client Sep 4, 2015
Closed

Add ability to register multiple checks per service #59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment