{"id":13678220,"url":"https://github.com/FernandoBLima/python-prometheus-grafana","last_synced_at":"2025-04-29T12:34:23.743Z","repository":{"id":64635789,"uuid":"382714238","full_name":"FernandoBLima/python-prometheus-grafana","owner":"FernandoBLima","description":"Project contains a Python service example with Prometheus and Grafana.","archived":false,"fork":false,"pushed_at":"2023-01-11T21:55:26.000Z","size":5,"stargazers_count":6,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T17:30:54.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FernandoBLima.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-03T21:44:27.000Z","updated_at":"2024-02-07T20:30:21.000Z","dependencies_parsed_at":"2023-02-09T07:17:33.905Z","dependency_job_id":null,"html_url":"https://github.com/FernandoBLima/python-prometheus-grafana","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoBLima%2Fpython-prometheus-grafana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoBLima%2Fpython-prometheus-grafana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoBLima%2Fpython-prometheus-grafana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoBLima%2Fpython-prometheus-grafana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FernandoBLima","download_url":"https://codeload.github.com/FernandoBLima/python-prometheus-grafana/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224173688,"owners_count":17268155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T13:00:51.237Z","updated_at":"2024-11-11T20:31:15.366Z","avatar_url":"https://github.com/FernandoBLima.png","language":"Python","readme":"# Python-Prometheus-Grafana\n\nThe 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.\n\n### Mains Tools\n- Docker\n- Prometheus\n- Grafana\n\n### Technical Overview\n\nYou will need Docker installed to follow the next steps and build an run the image locally you just need to use the following command:\n\n```bash\ndocker-compose up --build\n```\n\n### How it Works\n\nAt 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`.\n\nAfter 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:\n\n- Enable datasource:\nPOST http://localhost:3000/api/dashboards/db\nBody\n```\n{\n    \"name\": \"prometheus\",\n    \"type\": \"prometheus\",\n    \"url\": \"http://localhost:9090\",\n    \"access\": \"browser\",\n    \"isDefault\": true\n}\n```\n\n- Create Dashboard:\nPOST http://localhost:3000/api/datasources\n\nFor more informations you can access the [Grafana Dashboard API](https://grafana.com/docs/grafana/latest/http_api/dashboard/)\n\nAfter 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.\n\n### Help and Resources\n\nYou can read more on:\n\n- [Docker Documentation](https://docs.docker.com/get-started/overview/)\n- [Flask](https://flask.palletsprojects.com/en/2.0.x/)\n- [Grafana Dashboard API](https://grafana.com/docs/grafana/latest/http_api/dashboard/)\n- [Grafana Documentation](https://grafana.com)\n- [Prometheus Documentation](http://prometheus.io)\n- [Prometheus Python Client](https://github.com/prometheus/client_python)","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFernandoBLima%2Fpython-prometheus-grafana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFernandoBLima%2Fpython-prometheus-grafana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFernandoBLima%2Fpython-prometheus-grafana/lists"}