prometheus-fastapi-instrumentator
prometheus-fastapi-instrumentator copied to clipboard
Grafana dashboard template for displaying the default metrics
Hello,
most people use Prometheus together with Grafana. It would be great if there was a dashboard template hosted at https://grafana.com/grafana/dashboards which shows at least the default metrics from the library (custom ones could be added individually as desired). These dashboards can easily be imported into a running Grafana instance, hence saving users the hassle to create a dashboard on their own.
Cheers
Yeah I think something like this would be helpful for starting off. Similar to https://github.com/rycus86/prometheus_flask_exporter
But it's almost impossible in my opinion to find a dashboard that suits everyone. Do you only have a single application you are monitoring? Or dozens of services running in a Kubernetes cluster? A lot of variables here that require (vastly) different dashboards or at least changes to the used labels etc. I'll see when I get around to create / upload a show case, thanks for raising the idea
@trallnag I'm still working on it, but this may be useful just as an example https://github.com/Kludex/fastapi-prometheus-grafana
Hey @Kludex ! Just wanted to know if you had found any good resources that one could use to get easy dashboards for a fastapi app, this would be so cool ! Thanks !
@sorasful Have you been successful in finding a solution. The repo from @Kludex is very useful for the configured dashboard for the variables that are exposed via the /metrics
endpoint. However I am stuck with how to define the proper data source in Grafana (the Promotheus data source refers to the server, not the output of this plugin. I wonder if the path is to implement a custom Grafana data source via plugin to fetch and parse the relevant data, but I think there should be another way, so I'd like to ask first here.
@unidesigner Not really, I need to get more resources on how PromQL works and stuff. If I manage to get something nice for these dashboard I think I'll make a PR so this can goes into an "example" section for example.
Hi, any update about this?
@susowiki it's not on my todo list. In my personal projects and at work I have not been using this package in a long time due to working with other programming languages. So when it comes to prometheus-fastapi-instrumentator I really only find the motivation every few months to streamline and merge open PRs, fix small bugs, update dependencies, etc.