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
1
Add to monitoring dashboard
Configure your monitoring tool (Prometheus, Datadog, etc.) to poll
/health every 30-60 seconds.2
Set up alerts
Alert when:
/healthreturns non-200 status- Response time exceeds 5 seconds
- Service becomes unreachable
3
Verify deployments
After deploying, check the
deployedCommit matches your expected commit hash.Metrics Endpoint
The/metrics endpoint exposes runtime metrics for performance monitoring.
Fetch Metrics
Key Metrics
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
1
Service Down
Trigger:
/health endpoint returns non-200 or times outAction: Immediate investigation required2
High Memory Usage
Trigger:
memory.alloc > 500 MB for 5+ minutesAction: Check for memory leaks, restart if necessary3
Panic Mode Activated
Trigger:
/api/status returns panic_mode: trueAction: Administrator intervention required (abuse detected)4
Rate Limit Exceeded
Trigger: Multiple rate limit alerts from ntfy admin notificationsAction: Review IP patterns, consider temporary panic mode
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:1
Fetch deployed commit
2
Compare with GitHub
3
Verify source transparency
Visit the GitHub verification URL:
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