Monitoring gitGost
Monitor your gitGost instance to ensure healthy operation and detect issues early.Health Check Endpoint
The/health endpoint provides service status and build information.
Check Service Health
Health Check Integration
Add to monitoring dashboard
Configure your monitoring tool (Prometheus, Datadog, etc.) to poll
/health every 30-60 seconds.Set up alerts
Alert when:
/healthreturns non-200 status- Response time exceeds 5 seconds
- Service becomes unreachable
Metrics Endpoint
The/metrics endpoint exposes runtime metrics for performance monitoring.
Fetch Metrics
Key Metrics
| Metric | Description | Normal Range |
|---|---|---|
memory.alloc | Current heap allocation (bytes) | < 100 MB |
memory.num_gc | Number of GC cycles | Increases over time |
goroutines | Active goroutines | < 100 (idle), < 500 (busy) |
uptime | Time since service started | N/A |
Service Status Endpoint
The/api/status endpoint shows if the panic button is active.
panic_mode: false→ Service accepting pushes normallypanic_mode: true→ Service suspended (panic button activated)
Logging System
GitGost uses privacy-focused logging that minimizes user data exposure.Log Format
Configure log format via theLOG_FORMAT environment variable:
Text Format Logs
JSON Format Logs
Log Privacy Features
Frominternal/utils/logging.go:
Privacy-First Logging Design
Privacy-First Logging Design
- No IP addresses logged in push operations
- No user metadata captured or stored
- Minimal context to prevent correlation attacks
- All logs tagged with
"privacy": "anonymized" - Logs focus on service health, not user activity
Alert Configuration
Recommended Alerts
Service Down
Trigger:
/health endpoint returns non-200 or times outAction: Immediate investigation requiredHigh Memory Usage
Trigger:
memory.alloc > 500 MB for 5+ minutesAction: Check for memory leaks, restart if necessaryPanic Mode Activated
Trigger:
/api/status returns panic_mode: trueAction: Administrator intervention required (abuse detected)ntfy Admin Notifications
GitGost sends real-time alerts via ntfy when configured. Configure ntfy alerts:- Rate limit exceeded: Single IP exceeds 5 PRs/hour
- Suspicious burst activity: 20+ pushes from 10+ IPs in 60 seconds
- Service control: Action buttons to activate/deactivate panic mode
Log Analysis Examples
Find Recent Errors
Count PR Creation Events
Monitor Fork Creation Rate
Deployment Verification
Verify deployments match the source code:Monitoring Best Practices
Production Monitoring Checklist
- ✅ Health checks running every 30-60 seconds
- ✅ Memory metrics tracked and alerted
- ✅ Panic mode status monitored
- ✅ ntfy admin notifications configured
- ✅ Log aggregation set up (if using JSON format)
- ✅ Uptime SLA tracking enabled
- ✅ Deployment verification automated
Next Steps
Moderation
Learn how to moderate abuse and use the panic button
Troubleshooting
Diagnose and fix common operational issues