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

There's no easy, or any, way of check if consul is actually up and running #108

Open
JJ opened this issue Jan 27, 2021 · 4 comments
Open

Comments

@JJ
Copy link

JJ commented Jan 27, 2021

I haven't found it. I'd simply would like to check, using this library, if consul daemon is running, or do something else instead if it's not.

@sSeewald
Copy link

sSeewald commented Jul 5, 2021

Hi @JJ you could retry, if you get an http error. After some tries you can kill your service and let the environment deal with that state.

@JJ
Copy link
Author

JJ commented Jul 5, 2021

That's not easy, and it's not an "official" way of doing it. I was looking for something along the lines of the status subcommand that some services (if not most) have.

@silas
Copy link
Owner

silas commented Jul 5, 2021

The last time I looked consul didn't have a dedicated health endpoint (for the agent).

I consider the scope of this library to be about the same as the Go API client. If that client has method that does what you want I'd look into implementing it.

@jdmarshall
Copy link

jdmarshall commented Feb 24, 2022

There's /v1/status/host that has a great deal of data, perhaps too much. Perhaps the same for /v1/agent/self. I wonder how much information /v1/status/leader reveals about the cluster.

You'll know if the agent is up. If your agent isn't part of the cluster, what do you get back from leader?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants