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

Create API endpoint to return a check's script, interval, HTTP, TTL #623

Closed
pete0emerson opened this issue Jan 21, 2015 · 10 comments
Closed
Labels
theme/api Relating to the HTTP API interface type/enhancement Proposed improvement or new feature

Comments

@pete0emerson
Copy link

I'd like an API call to return a check's script, interval, HTTP, and TTL. Ideally this would be exposed in the UI as well, but I'll create a separate ticket for it.

My use case:

I'm planning on using consul as a Nagios replacement. When I am debugging an issue, the first thing I want to do is replicate the check by hand and see how the check is failing. This is also useful when adding new checks, sometimes the author of a new check doesn't get the check right the first time around.

I would think this could be returned via v1/agent/checks as it would just add four fields, but Armon thinks this would cause backwards incompatibility. See https://groups.google.com/forum/?hl=en#!topic/consul-tool/QsvHza81HFo for discussion.

@armon armon added the type/enhancement Proposed improvement or new feature label Feb 17, 2015
@micahhausler
Copy link

+1

1 similar comment
@andrewhlin
Copy link

+1

@blalor
Copy link
Contributor

blalor commented Aug 7, 2015

I'll add another +1 to this. The check config is persisted in the agent's data directory, but that's really peeking behind the curtain.

@wingsofovnia
Copy link

+1 too. Im writing a Service Discovery Consul wrapper and need to retrieve info about http check interval and it's type, but /v1/agent/checks doesn't report such info...

@Blatwurst
Copy link

+1 - good just for debugging misbehaving checks, like checking that the supplied command line (script) or url (http) is correct.

@slackpad slackpad added the theme/api Relating to the HTTP API interface label May 25, 2017
@cirocosta
Copy link

I'm not sure if it helps but on my side, I've been just encoding the check definitions as JSON and persisting that in 'notes' such that it can be retrieved later. Not the super best option as it's not "first-class" but it's been doing the job so far. Maybe it fits your needs 😁

@psyhomb
Copy link

psyhomb commented Aug 15, 2017

@cirocosta that sounds like a good temporary workaround, thx

@aburmeis
Copy link

aburmeis commented Feb 18, 2019

There seem to be some endpoints capable of doing so (at least using 1.4.2) but the implementations is either incomplete or buggy:

  • /v1/health/service/:name contains an always empty Definition for each check
  • /v1/agent/health/service/name/:name contains a filled Definition but it seems to be broken as al values are defaults not reflecting the real state (like "Interval": "0s")

Wouldn't it be more usefull to fix the existing endpoints instead of creating even more?!

@crhino
Copy link
Contributor

crhino commented Nov 12, 2019

Closing this in favor of #1680, it has the most 👍 's.

@crhino crhino closed this as completed Nov 12, 2019
@ghost
Copy link

ghost commented Jan 25, 2020

Hey there,

This issue has been automatically locked because it is closed and there hasn't been any activity for at least 30 days.

If you are still experiencing problems, or still have questions, feel free to open a new one 👍.

@ghost ghost locked and limited conversation to collaborators Jan 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
theme/api Relating to the HTTP API interface type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests