π Live Demo: https://anldrms.github.io/observability-demo/
A production-ready observability stack with Prometheus, Grafana, and Graylog.
The frontend is now available as a static site on GitHub Pages! No backend required to try the UI.
- Visit the live site: https://anldrms.github.io/observability-demo/
- Deploy your backend to any cloud platform (see below)
- Configure by entering your backend URL
- Start monitoring!
- Static HTML/CSS/JavaScript
- No server required
- Hosted on GitHub Pages
- Live at: https://anldrms.github.io/observability-demo/
- Node.js Express API
- Prometheus metrics
- Graylog logging
- Deploy to: Fly.io, Railway, Render, etc.
Just visit: https://anldrms.github.io/observability-demo/
The UI works standalone and can be configured to connect to any backend.
# Clone the repo
git clone git@github.com:anldrms/observability-demo.git
cd observability-demo
# Deploy to Fly.io (easiest)
./deploy-cloud.sh flyio
# Or Railway
./deploy-cloud.sh railway
# Or run locally
./deploy-cloud.sh local- Go to https://anldrms.github.io/observability-demo/
- Enter your backend URL (e.g.,
https://your-app.fly.dev) - Click "Save Configuration"
- Start generating traffic!
git clone git@github.com:anldrms/observability-demo.git
cd observability-demo
docker compose up -d --buildAccess at:
- Frontend: http://localhost:3000
- Grafana: http://localhost:3001
- Prometheus: http://localhost:9090
- Graylog: http://localhost:9000
β Frontend (GitHub Pages)
- Beautiful, responsive UI
- Traffic simulation controls
- Real-time status monitoring
- Dynamic configuration
- LocalStorage for settings
β Backend (Cloud/Local)
- Express.js API server
- Prometheus metrics endpoint
- GELF logging to Graylog
- Health checks
- CORS enabled for GitHub Pages
β Monitoring Stack
- Prometheus (metrics collection)
- Grafana (dashboards)
- Graylog (log aggregation)
- OpenSearch (log storage)
- MongoDB (Graylog metadata)
- GITHUB_PAGES.md - GitHub Pages deployment guide
- QUICKSTART.md - Get started in 1 command
- DEPLOYMENT.md - Detailed cloud deployment guides
- API Documentation - Below
ββββββββββββββββββββββββ
β GitHub Pages β β Free static hosting
β (Frontend UI) β https://anldrms.github.io/...
ββββββββββββ¬ββββββββββββ
β CORS-enabled API calls
βΌ
ββββββββββββββββββββββββ
β Cloud Platform β β Deploy to Fly.io, Railway, etc.
β (Express API) β
ββββββββββββ¬ββββββββββββ
β
ββββββββ΄βββββββ¬βββββββββββ
βΌ βΌ βΌ
βββββββββββ βββββββββββ βββββββββββ
βPrometheuβ β Grafana β β Graylog β
βββββββββββ βββββββββββ βββββββββββ
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Web UI (served from backend) |
/config |
GET | Get monitoring URLs configuration |
/health |
GET | Health check with uptime |
/metrics |
GET | Prometheus metrics |
/work |
GET | Single simulated work operation |
/simulate |
GET | Generate N operations (?count=100) |
# Application
NODE_ENV=production
PORT=3000
# Logging
GELF_HOST=graylog
GELF_PORT=12201
# Public URLs (for frontend)
PUBLIC_GRAFANA_URL=https://grafana.yourapp.com
PUBLIC_PROMETHEUS_URL=https://prometheus.yourapp.com
PUBLIC_GRAYLOG_URL=https://graylog.yourapp.comSee .env.example for complete list.
By default, CORS is enabled for all origins to work with GitHub Pages. For production:
// Restrict to your domain only
res.header('Access-Control-Allow-Origin', 'https://anldrms.github.io');Add API key authentication for production:
# Set environment variable
API_KEY=your-secret-key
# In frontend, add header
fetch(url, {
headers: { 'X-API-Key': 'your-secret-key' }
});The demo app exposes these Prometheus metrics:
demo_http_requests_total- HTTP request counter (by route, method, status)demo_work_duration_seconds- Work duration histogramdemo_errors_total- Error counter (by type)process_*- Standard Node.js process metricsnodejs_*- Node.js runtime metrics
Logs are sent via GELF UDP to Graylog:
- Application startup/shutdown
- Request logs with duration
- Error logs with details
- Simulated work operations
cd docs
python3 -m http.server 8000
# Open http://localhost:8000cd app
npm install
npm start
# API at http://localhost:3000docker compose up -d
# All services available- Check CORS is enabled on backend
- Verify backend URL is correct
- Ensure backend is running:
curl https://your-backend/health - Check browser console for errors
- Check Settings β Pages is enabled
- Verify source is set to
mainbranch,/docsfolder - Check Actions tab for build status
- Clear browser cache
See DEPLOYMENT.md for platform-specific troubleshooting.
MIT
Pull requests welcome! Please:
- Follow existing code style
- Test your changes locally
- Update documentation
- Live Demo: https://anldrms.github.io/observability-demo/
- GitHub: https://github.com/anldrms/observability-demo
- Issues: https://github.com/anldrms/observability-demo/issues
If you find this useful, please star the repo!
Built with β€οΈ using Node.js, Express, Prometheus, Grafana, and Graylog