Metrics endpoint for Prometheus 📈 #1541
Replies: 8 comments 5 replies
-
|
Is this something which needs to be integrated into paperless itself? To me, it sounds like a great companion, using the API to generate the stats and send them where ever. Potentially, this could be changed from polling to event driven with something like apprise POSTing a JSON string to the companion. |
Beta Was this translation helpful? Give feedback.
-
|
I've just started playing with Prometheus and Grafana and think this is a great idea to add to PaperlessNGX. Other items that would be nice to see gathered are task status - especially the failed tasks (similar to the new menu item by logs). I hope to take a look at the PR at some time and might work on a dashboard for it. |
Beta Was this translation helpful? Give feedback.
-
|
Would be great to be intigrated in the api. I created a node red flow for my ulanzi clock. :) |
Beta Was this translation helpful? Give feedback.
-
|
For others to come up here from a search: There is third party exporter that provides metrics for paperless-ngx: https://github.com/hansmi/prometheus-paperless-exporter |
Beta Was this translation helpful? Give feedback.
-
|
I was about to write a similar feature request. The third party exporter is cool, but it can't work to it's full potential without a dedicated metric endpoint. Monitoring your paperless-ngx stack is a good way to make sure you notice when things happen that shouldn't happen. Currently, the API supports to view some numbers but all of them are based on what a monitoring user can see. Want to get the total number of documents, users or tags? The monitoring user needs to get superuser permission. If you use a tool like the prometheus-paperless-exporter in order to provide the metrics for your monitoring system, that third party tool has to get superuser access. My idea is to have /api/metrics, which is bound to it's own permission and would mostly return the total numbers of all the other andpoints, without the need of having the superuser permission. Third party tools can then pull that endpoint and convert it to the metric format they need without superuser permissions. Bonus: |
Beta Was this translation helpful? Give feedback.
-
|
Hey Paperless-Team (@bauerj, @jonaswinkler, @shamoon, @stumpylog and @tribut),
This discussion has a bit of insight on why the native integration might be superior over the external REST-API one. Your voice would decide on me/us/the community spending time on this or not. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
|
This discussion has been automatically closed due to lack of community support. Please see our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
-
|
This discussion has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello maintainers!
Thanks for your awesome work and for taking over the project from the previous maintainer! 🚀
Recently, I thought how cool it would be if paperless would expose metrics for Prometheus. This would enable us to visualize statistics about our documents in beautiful dashboards (e.g. Grafana). A few ideas of possible metrics in my head are:
Prometheus provides an official client library for integrating it into python projects: https://github.com/prometheus/client_python.
There is even a Django compatible library which provides basic metrics from Django out of the box and integrates well.
What do you think? Would this be an interesting idea for the project?
If I find some free time, I can even try to build a first proof-of-concept in a PR...See draft PR here: #1544 🙂Beta Was this translation helpful? Give feedback.
All reactions