[GH-ISSUE #375] The new /api/v1/metrics/ endpoint is not documented #288

Closed
opened 2026-02-25 23:41:54 +03:00 by kerem · 3 comments
Owner

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

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
kerem closed this issue 2026-02-25 23:41:54 +03:00
Author
Owner

@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.

<!-- gh-comment-id:639119740 --> @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.
Author
Owner

@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_KEY environment 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?

<!-- gh-comment-id:639452787 --> @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](https://status.healthchecks.io/). I didn't want this to be world-public, so added the `METRICS_KEY` environment 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?
Author
Owner

@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.

<!-- gh-comment-id:639457091 --> @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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#288
No description provided.