GithubHelp home page GithubHelp logo

fastapi-prometheus-grafana's Introduction

FastAPI + Prometheus + Grafana ๐ŸŽ‰

This is a minimal setup that you can build to monitor your FastAPI microservice.

Installation

There are only two prerequisites:

Having both, you'll need to clone the repository:

git clone https://github.com/Kludex/fastapi-prometheus-grafana

Usage

You'll need to run the docker containers:

docker-compose up

Now you have access to those three containers and their respective ports:

On the FastAPI, you can access /metrics endpoint to see the data Prometheus is scraping from it.

How it looks like

References

fastapi-prometheus-grafana's People

Contributors

ggouzi avatar kludex avatar nicpym-bbd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fastapi-prometheus-grafana's Issues

Grafana 8.5.3 does not know dashboard

On my Ubuntu 20.04 running Docker 20.10.12 after docker-compose up --build I can see all 3 services up and running,
but Grafana does not show any fastAPI Dashboard.
Service app runs on 238.11 and shows HTTP 200 GET /metrics
Service prometheus seems to be ok as well,
only grafana does not come up with any dashboard.
I tried to change the target volume for
./datasource.yml:/etc/grafana/provisioning/datasource.yml to
/etc/grafana/provisioning/datasources/datasource.yml
but without luck. How does fastapi-dashboard.json get mounted into grafana?
Can anybody please give me a hint what's missing?

Errors per seconds graph

I have looked into the way in which the ErrorsPerSecond graph's PromQL qeury is constructed. I believe that instead of using the http_request_duration_seconds_count metric it should be using the http_requests_total metric instead.

Rework project

PRs are welcome to make this pretty, and/or more usable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.