Skip to content

engFelipeMonteiro/python-prometheus-grafana

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Prometheus-Grafana

The main objective of this project is to create a simple Python service example that contains Prometheus which is a standalone open source project that monitors and alerts systems and Grafana.

Mains Tools

  • Docker
  • Prometheus
  • Grafana

Technical Overview

You will need Docker installed to follow the next steps and build an run the image locally you just need to use the following command:

docker-compose up --build

How it Works

At first, make some reqeust several times using the following link http://localhost:5000, then you be able to see changes in the metrics http://localhost:5000/metrics.

After that, you can navigate to grafana's Dashboard via the link http//localhost:3000 and upload the datasource and dashboard configuration using the JSO files. Or you can use Grafana's Dashboard API to create a new dashboard and datasource using the following requests:

{
    "name": "prometheus",
    "type": "prometheus",
    "url": "http://localhost:9090",
    "access": "browser",
    "isDefault": true
}

For more informations you can access the Grafana Dashboard API

After all these actions, you should be able to access the Grafana Dashboard that display some graphs and metrics related to the Flask Web Application that was created.

Help and Resources

You can read more on:

About

Project contains a Python service example with Prometheus and Grafana.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 77.4%
  • Dockerfile 12.4%
  • Shell 10.2%