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

Healthcheck api #154

Open
beardedeagle opened this issue Feb 6, 2017 · 3 comments
Open

Healthcheck api #154

beardedeagle opened this issue Feb 6, 2017 · 3 comments
Labels
Milestone

Comments

@beardedeagle
Copy link

According to the docs: https://docs.amon.cx/api/#health-checks there are healthcheck api endpoints. When I try to do a curl to the list endpoint for healthchecks as per the documentation I get the following:

curl https://redacted.com/api/v1/healthchecks/list/?api_key=redactedapikey
<h1>Not Found</h1><p>The requested URL /api/v1/healthchecks/list/ was not found on this server.</p>

Digging through the code, I am not seeing the endpoints listed in the docs in the api urls. Was this just prematurely added to the docs?

@martinrusev
Copy link
Member

@beardedeagle In this case the opposite - there was a health check API in Amon 5.X and I did a big refactoring for 6.0 and most of the functionality got moved to alerts. Will restore list though, because it still makes sense.

healthchecks_urls = patterns('',
	url(r'^v1/healthchecks/list/$', HealthChecksListView.as_view(), name='api_healthchecks_list'),
	url(r'^v1/healthchecks/pause/all/$', HealthChecksPauseAllView.as_view(), name='api_healthchecks_pause_all'),
	url(r'^v1/healthchecks/resume/all/$', HealthChecksResumeAllView.as_view(), name='api_healthchecks_resume_all'),
	url(r'^v1/healthchecks/pause/(?P<check_id>\w+)/$', HealthChecksPauseView.as_view(), name='api_healthchecks_pause'),
	url(r'^v1/healthchecks/resume/(?P<check_id>\w+)/$', HealthChecksResumeView.as_view(), name='api_healthchecks_resume'),
	url(r'^v1/healthchecks/delete/(?P<check_id>\w+)/$', HealthChecksDeleteView.as_view(), name='api_healthchecks_delete'),
)

@beardedeagle
Copy link
Author

beardedeagle commented Feb 7, 2017

@martinrusev I would think it would make sense to restore list AND delete. For instance, I have some healthchecks that I no longer run still sitting in my dashboard because I am unable to remove them either via api call or via a button click. So I basically have to wait for the retention policy to kick in and remove the stale data as far as I am understanding it (I could be wrong, I just started using this monitoring solution). And you should be able to cascade the delete to alerts as well so you don't end up with orphaned alerts.

@martinrusev
Copy link
Member

@beardedeagle list and delete will be restored. Not sure about alerts, because they are quite complicated with the groups and tagging

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

No branches or pull requests

2 participants