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

Gonic data via API #372

Closed
bensmith2697 opened this issue Sep 12, 2023 · 9 comments
Closed

Gonic data via API #372

bensmith2697 opened this issue Sep 12, 2023 · 9 comments

Comments

@bensmith2697
Copy link

Is it possible to get information via an exposed api relating to stats in Gonic so that information can be used in a dashboard like homepage?

image

example response would be

image

@betapictoris
Copy link
Contributor

We could solve this and #150 by adding /metrics and /metrics/json or /metrics?f=json.

@sentriz
Copy link
Owner

sentriz commented Sep 13, 2023

if the GONIC_EXPVAR or -expvar options are provided, this can be retrieved from /debug/vars

image

@sentriz
Copy link
Owner

sentriz commented Sep 13, 2023

We could solve this and #150 by adding /metrics and /metrics/json or /metrics?f=json.

i agree, but decided to go with Go's builtin expvar package

@bensmith2697
Copy link
Author

@sentriz Nice thank you for add this option. when will this be available in the docker nightly version?

@sentriz
Copy link
Owner

sentriz commented Sep 13, 2023

i think it should be there already, it builds daily

@bensmith2697
Copy link
Author

then I shall wait for the next update and let you know how it goes, thank you so much for implementing this so fast.

@bensmith2697
Copy link
Author

Works perfectly:

image

@sentriz
Copy link
Owner

sentriz commented Sep 14, 2023

nice 👌

@playitforless
Copy link

@bensmith2697 did you modify the widget for homepage if so are you going to submit it to their GitHub?

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

No branches or pull requests

4 participants