SvcWatch is a professional, full-stack Nginx log monitoring and analytics dashboard. It "tails" Nginx access logs in real-time, parses them into structured metrics, provides an authorized REST API, and visualizes data on a modern, responsive web dashboard.
The project is organized as a monorepo for clean separation of concerns:
/backend: High-performance Go service using Gin and Redis./frontend: Modern analytics dashboard built with Vue 3, Vite, and TypeScript./.github: Multi-server parallel deployment workflows with GitHub Actions.
- 📡 Real-time Analytics: Intelligent agent that tails logs, handles log rotation automatically, and parses entries on-the-fly using robust regex.
- 📊 Modern Dashboard: Visualize QPS, status code distributions, and traffic spikes with interactive charts and real-time updates.
- 🔐 Secure API: Integrated with external Auth services for per-request permission validation for all monitoring endpoints.
- 💾 Redis Persistence: Efficient data storage for long-term metric aggregation and persistence across service restarts.
- ⚙️ Matrix Deployment: Automatic, parallel deployment to multiple production servers via GitHub Actions Matrix strategy.
- 🛡️ Nginx Reverse Proxy: Secure HTTPS/SSL mapping via Nginx (port 8080) with automated configuration and Certbot integration.
- Navigate to the
backend/directory. - Install dependencies:
go mod tidy. - Configure your environment in
config/config.yaml. - Run natively:
go run cmd/server/main.go.
- Navigate to the
frontend/directory. - Install dependencies:
npm install. - Start the development server:
npm run dev.
The project includes pre-configured CI/CD pipelines for automated, targeted deployments.
- Backend Deployment: deploy-backend.yml triggers only on
backend/**changes. - Frontend Deployment: deploy-frontend.yml triggers only on
frontend/**changes.
To use the CI/CD pipeline, configure the following in GitHub:
Repository Variables (Settings → Secrets and variables → Actions → Variables):
DEPLOY_TARGETS: JSON array of server metadata (IP, domain, log paths).
Repository Secrets (Settings → Secrets and variables → Actions → Secrets):
SERVER_SSH_KEY: Private RSA/ED25519 key for SSH access.AUTH_PASSPORT_URL,AUTH_PERMISSION_URL,AUTH_SYS_CODE: Authentication service integration.REDIS_ADDR,REDIS_PASSWORD: Redis connection credentials.
- Languages: Go, TypeScript
- Backend Framework: Gin Gonic
- Frontend Framework: Vue 3 + Vite
- Storage: Redis, In-Memory
- Automation: GitHub Actions, Nginx, Certbot