Skip to content

About

Pretty lightweight uptime monitoring tool that counts endpoint visits, integrated with prometheus, grafana. alertmanager on Kubernetes for cloud solution.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

🍽️ Restaurant Simulation API – Monitoring with Prometheus & Grafana

A containerized Python API simulating restaurant operations, fully monitored with Prometheus, Alertmanager, and Grafana, running on Minikube.


📑 Table of Contents


📝 Overview

This project simulates a restaurant service API with real-time monitoring.
The full stack is orchestrated on Kubernetes using Minikube for local testing and learning.

Features:

  • Python Flask app simulating restaurant orders
  • Prometheus + Alertmanager for metrics & alerts
  • Grafana dashboards
  • Ready-to-run on Minikube
  • Optional Docker run for API-only testing

🏗️ Architecture

[ Flask App ] --> [ Kubernetes Service ]
        | Metrics exposed on /metrics
        v
[ Prometheus ] <-> [ Alertmanager ]
        |
        v
[ Grafana Dashboards ]

📂 Project Structure

restaurant-simulation-API/
├── app/
│   ├── restaurante_app.py        
│   └──  requirements.txt                              
├── prometheus/
│   ├── prometheus-config.yaml
│   ├── prometheus-rules.yaml
│   ├── prometheus-deployment.yaml
│   └── prometheus-service.yaml
├── grafana/
│   ├── grafana-datasource.yaml
│   ├── grafana-deployment.yaml
│   └── grafana-service.yaml
├── alertmanager/
│   ├── alertmanager-config.yaml
│   ├── alertmanager-deployment.yaml
│   └── alertmanager-service.yaml
├── k8s/
│   ├── deployment.yaml           
│   └── service.yaml              
├── Dockerfile                     
├── README.md
└── CONTRIBUTING.md

🛠️ Prerequisites


🚀 Step-by-Step Deployment (Minikube)

  1. Start Minikube

    minikube start
  2. Deploy the Flask App

    kubectl apply -f k8s/deployment.yaml
    kubectl apply -f k8s/service.yaml
  3. Deploy Prometheus

    kubectl apply -f prometheus/
  4. Deploy Alertmanager

    kubectl apply -f alertmanager/
  5. Deploy Grafana

    kubectl apply -f grafana/
  6. Verify Deployments

    kubectl get pods
    kubectl get svc

🌐 Access the Services

Enable Minikube tunnel or port-forwarding:

minikube service list

Typical ports:

  • Flask App: NodePort from k8s/service.yaml
  • Prometheus UI: NodePort from prometheus-service.yaml
  • Alertmanager: NodePort from alertmanager-service.yaml
  • Grafana: NodePort from grafana-service.yaml

Example:

minikube service grafana-service

🐳 Optional: Run API Locally with Docker

docker build -t restaurant-api .
docker run -p 8000:8000 restaurant-api

🤝 Contributing

See CONTRIBUTING.md for guidelines.


📄 License

This project is licensed under the MIT License.

About

Pretty lightweight uptime monitoring tool that counts endpoint visits, integrated with prometheus, grafana. alertmanager on Kubernetes for cloud solution.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages