mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 06:55:53 +03:00
[GH-ISSUE #375] The new /api/v1/metrics/ endpoint is not documented #288
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#288
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mountaindude on GitHub (Jun 4, 2020).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/375
Can't find any documentation for this new endpoint, so it's been a bit trial and error finding it, so far no luck. Running as Docker container, exposing healthchecks on port 8000.
Tried things like
http://myurl:8000/api/v1/metrics/
http://myurl:8000/admin/api/v1/metrics/
What's the correct URL, and is it documented somewhere?
Thx
@mountaindude commented on GitHub (Jun 4, 2020):
Partly caused by myself being new to Healtchchecks. Got a bit further:
I enabled API access a project, then used the generated API key in the X-Api-Key HTTP header.
Works when doing a GET on the /api/v1/checks/ endpoint, but the /api/v1/metrics/ returns a "403 Forbidden" error.
Looking in the source there seems to be a new config/environment variable METRICS_KEY, not clear what it does or what it should be set to, though.
@cuu508 commented on GitHub (Jun 5, 2020):
Sorry – it's undocumented at the moment. I wanted to expose a few service-wide metrics to be used in a status page. I didn't want this to be world-public, so added the
METRICS_KEYenvironment value. If the client specifies a correct key, they get a response, otherwise they get 403. I mentioned this in CHANGELOG but didn't document it.Are you interested in instance-wide metrics, or per-project metrics?
@mountaindude commented on GitHub (Jun 5, 2020):
That's totally fine, no problem. I know but too well how many things need fixing when doing these kind of releases.
I'd be interested in both project specific and global metrics, I guess.
Most of all I'm interested in a way to get a history for run-times (#371). This is not possible in the current API, from what I understand. I have on my todo list to pull the data from the db, but an API would of course be nice.