https://github.com/nikodinovicf/api-monitoring
API Monitoring
https://github.com/nikodinovicf/api-monitoring
api docker grafana mailhog monitoring prometheus python
Last synced: 4 months ago
JSON representation
API Monitoring
- Host: GitHub
- URL: https://github.com/nikodinovicf/api-monitoring
- Owner: nikodinovicf
- Created: 2025-05-29T19:18:32.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-05-31T04:17:50.000Z (4 months ago)
- Last Synced: 2025-06-15T05:04:42.819Z (4 months ago)
- Topics: api, docker, grafana, mailhog, monitoring, prometheus, python
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API_Prometheus 🚀
A Flask-based API with Prometheus monitoring, Alertmanager, and Grafana integration.## Features 🔥
- **Flask REST API** with SQLAlchemy
- **Prometheus Metrics** for monitoring requests
- **Health Check Endpoint** (`/api/healthz`) to verify database status
- **Dockerized Setup** with `docker-compose`
- **Grafana Dashboard** for API performance visualization---
✅ **Ensure `config.py` is inside `app/`, NOT `app/app/`.**
✅ **Confirm `database.db` is inside `database/`.**---
## 🚀 Getting Started
### 1️⃣ **Clone the Repository**
```sh
git clone https://github.com/your-repo/API_Prometheus.git
cd API_Prometheus
```
### 2️⃣ **Build & Start Containers**
```sh
docker-compose up --build
```
### 3️⃣ **Check Active Routes**
```sh
docker exec -it api_prometheus-flask_app-1 bash
python -m flask routes
```
### 4️⃣ **Health Check API**
```sh
curl -X GET http://localhost:5050/api/healthz
```### 📊 **Monitoring with Grafana**
Access Grafana at http://localhost:3000
Log in (admin/admin)
Import Prometheus Data Source
Visualize API Performance 📈### **Prometheus**
Access Prometheus at http://localhost:9090
### **MailHog**
Access MailHog at http://localhost:8025