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

Feature Request: Support Prometheus / Openmetrics #317

Open
Tuxdude opened this issue Sep 6, 2024 · 2 comments
Open

Feature Request: Support Prometheus / Openmetrics #317

Tuxdude opened this issue Sep 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Tuxdude
Copy link

Tuxdude commented Sep 6, 2024

It would be great to get a /metrics endpoint (or an alternative endpoint if /<something> always means the user something) to allow the opengist job to be monitored using Prometheus or other metrics collector that supports the Openmetrics format.

Even if we can expose just an up metric to begin with, that would be a great start to probe the health of through Prometheus. Other metrics to export can be decided and added subsequently.

@thomiceli thomiceli added the enhancement New feature or request label Sep 10, 2024
@thomiceli
Copy link
Owner

/healthcheck already exists. The idea of metrics is interesting indeed

@Tuxdude
Copy link
Author

Tuxdude commented Sep 10, 2024

/healthcheck already exists. The idea of metrics is interesting indeed

Unfortunately the response for /healtcheck doesn't comply with the openmetrics format for a minimum /metrics page.

Prometheus currently returns the following scrape error if I make it scrape the /healthcheck endpoint of opengist.

expected equal, got ":" ("INVALID") while parsing: "{\"database\":"

The actual output from opengist /healthcheck is:

{
  "database": "ok",
  "opengist": "ok",
  "time": "2024-09-10T10:28:09-07:00"
}

Is it possible to expose a /metrics endpoint that just returns an empty response body with 200 status code? That would satisfy the minimum requirements to keep prometheus and other openmetrics based scrapers happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants