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 /metrics endpoint #437

Open
perfectra1n opened this issue Sep 18, 2024 · 6 comments
Open

(Feature request) Support /metrics endpoint #437

perfectra1n opened this issue Sep 18, 2024 · 6 comments
Assignees

Comments

@perfectra1n
Copy link
Contributor

Describe feature

I think it would be cool to support a /metrics endpoint to gather data about a Trilium instance. We could still put it behind authN, this endpoint is common for tools like Prometheus that scrape information from various services to then display in Grafana. If we think this is a trash idea, I'll put it back in the 🗑.

Additional Information

No response

@meichthys
Copy link
Contributor

Related to #81

@eliandoran
Copy link
Contributor

@perfectra1n , what kind of information would you be interested in?

@perfectra1n
Copy link
Contributor Author

perfectra1n commented Sep 19, 2024

(This was inspired by this issue for a Trilium homepage widget)

  • Something like a basic health check (does SELECT 1 against the SQLite DB succeed, does /login return a 200)
  • num. of notes
  • num. of revisions
  • Trilium version
  • Sync version
  • DB version
  • DB size?

I believe are the first things that come to mind...

@perfectra1n
Copy link
Contributor Author

Yeah I think it's slightly related to that issue @meichthys but I think the majority of those requests were for some form of "in app" visibility / metrics, while this would be "outside" of the app in a sense...

@perfectra1n
Copy link
Contributor Author

As a really silly example of something similar, here's my Nextcloud dashboard
image

@pano9000
Copy link
Contributor

  • Trilium version

  • Sync version

  • DB version

if this is already required: that type of information can be checked via /api/app-info already.

I do like the additional idea of metrics though like the ones you mentioned above, so +1 from my side

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