Skip to content

DevOps Metrics Reporter is a Spring Boot-based system designed to collect, store, and visualize CI/CD build events in real-time. It integrates with GitHub webhooks to monitor repository activity, logs build metrics (like status, duration, and trigger source), and stores them in a PostgreSQL database.

Notifications You must be signed in to change notification settings

DivInstance/devops-metrics-reporter

Repository files navigation

DevOps Metrics Reporter 🚀

A full-stack Spring Boot + PostgreSQL + Docker + GitHub Webhook-based application to track CI/CD pipeline events. Integrates with Grafana for visualizing build metrics and Prometheus for alerting.


🌟 Features

  • GitHub Webhook listener (/webhook/github)
  • Tracks events: repo name, branch, trigger type, build status, duration, timestamp
  • RESTful API endpoints (in development)
  • PostgreSQL storage for persistence
  • Docker Compose-based local deployment
  • Gradle automation: clean build without tests
  • Tunnel-ready: expose localhost using Loophole or Cloudflare Tunnel
  • Future: Grafana dashboards, Prometheus alerts

🛠 Tech Stack

Layer Tool/Framework
Backend Spring Boot (Java 21)
Database PostgreSQL 15
Container Docker + Docker Compose
Monitoring Prometheus + Grafana
Deployment GitHub Actions

📦 Folder Structure

. ├── src │ └── main/java/com/divyaranjansahoo/metrics_reporter │ ├── controller │ ├── model │ └── repository ├── docker-compose.yml ├── Dockerfile ├── build.gradle.kts ├── settings.gradle.kts ├── loophole.exe ├── req.sh ├── help.md ├── dbconfig.sql ├── README.md └── .github/workflows/devopsflow.yml

⚙️ Local Development

Prerequisites

  • Docker + Docker Compose
  • Java 21
  • Gradle

🚀 Build and Run (Locally)

./gradlew clean build -x test
docker-compose up --build

🌐 Expose to Public

1. Loophole (with HTTPS)

npm install -g @loophole/cloud
loophole http 8080 --hostname div.loophole.site

2. Cloudflare Tunnel

cloudflared tunnel --url http://localhost:8080

🔁 GitHub Actions Automation

✅ On every push:

  • Clean & build Gradle project (skip tests)
  • Trigger Docker Compose locally (requires Docker CLI on runner)
  • (Optional) Auto-deploy webhook listener for testing

📂 See ./github/workflows/full-devops-flow.yml (WIP)


🧭 Roadmap

  • PostgreSQL + Spring Boot setup
  • Docker Compose integration
  • Webhook endpoint (/webhook/github)
  • Parse real GitHub payload
  • Create REST endpoints (GET builds, stats)
  • Grafana dashboards (event trends)
  • Prometheus alerting on anomalies
  • Optional: Kafka or Redis for async ingestion

👤 Author

Divyaranjan Sahoo
🌐 Portfolio 📫 LinkedIn
🐱 GitHub


📄 License

MIT License – Use freely, modify smartly, credit kindly.

About

DevOps Metrics Reporter is a Spring Boot-based system designed to collect, store, and visualize CI/CD build events in real-time. It integrates with GitHub webhooks to monitor repository activity, logs build metrics (like status, duration, and trigger source), and stores them in a PostgreSQL database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published