Monitoring
Deployxa provides comprehensive monitoring for your applications, including real-time metrics, logs, health checks, alerts, and auto-scaling.
Overview
Monitoring features include:
- Metrics: CPU, RAM, bandwidth, requests
- Logs: Build, runtime, error logs
- Health Checks: Automatic health monitoring
- Alerts: Configurable notifications
- Auto-Scaling: Automatic resource scaling
- Analytics: Performance insights
Metrics
CPU Metrics
Metrics tracked:
- CPU usage percentage
- CPU cores allocated
- CPU throttling
- CPU load average
View CPU metrics:
- Go to Project → Analytics
- Select "CPU" tab
- View real-time data
- Check historical trends
Alert thresholds:
- Warning: 70% CPU usage
- Critical: 90% CPU usage
RAM Metrics
Metrics tracked:
- RAM usage (MB)
- RAM allocated (MB)
- Memory pressure
- Swap usage
View RAM metrics:
- Go to Project → Analytics
- Select "Memory" tab
- View real-time data
- Check historical trends
Alert thresholds:
- Warning: 70% RAM usage
- Critical: 90% RAM usage
Bandwidth Metrics
Metrics tracked:
- Incoming bandwidth
- Outgoing bandwidth
- Total bandwidth
- Bandwidth rate
View bandwidth metrics:
- Go to Project → Analytics
- Select "Bandwidth" tab
- View real-time data
- Check historical trends
Alert thresholds:
- Warning: 80% of plan limit
- Critical: 95% of plan limit
Request Metrics
Metrics tracked:
- Total requests
- Requests per second
- Requests by status code
- Requests by endpoint
- Request duration
View request metrics:
- Go to Project → Analytics
- Select "Requests" tab
- View real-time data
- Check historical trends
Key metrics:
- 2xx: Successful requests
- 3xx: Redirects
- 4xx: Client errors
- 5xx: Server errors
Response Time Metrics
Metrics tracked:
- Average response time
- P50 (median) latency
- P95 latency
- P99 latency
- Slowest endpoints
View response time metrics:
- Go to Project → Analytics
- Select "Performance" tab
- View real-time data
- Check historical trends
Alert thresholds:
- Warning: P95 > 1000ms
- Critical: P95 > 3000ms
Logs
Build Logs
Build logs show the deployment process:
Includes:
- Git clone process
- Dependency installation
- Build commands
- Container creation
- Deployment process
View build logs:
- Go to Project → Deployments
- Click on a deployment
- Click "Build Logs"
- View log output
Log levels:
- INFO: General information
- WARN: Warnings
- ERROR: Errors
- DEBUG: Debug information
Runtime Logs
Runtime logs show application output:
Includes:
- Application output
- Request logs
- Error messages
- Performance metrics
- Custom logs
View runtime logs:
- Go to Project → Logs
- Select "Runtime" tab
- View real-time logs
- Filter by level
Log streaming:
- Real-time streaming
- Pause/resume
- Search and filter
- Download logs
Error Logs
Error logs show application errors:
Includes:
- Application errors
- Stack traces
- Error frequency
- Error patterns
- Error trends
View error logs:
- Go to Project → Logs
- Select "Errors" tab
- View error list
- Analyze error patterns
Error tracking:
- Error frequency
- Error trends
- Error grouping
- Error resolution
Log Management
Search logs:
# Search for specific text
error
timeout
database
# Search by level
level:error
level:warn
# Search by time range
time:1h
time:24h
time:7d
Filter logs:
- By log level
- By time range
- By source
- By keyword
Download logs:
- Go to Project → Logs
- Click "Download"
- Select format (txt, json)
- Select time range
- Click "Download"
Log retention:
- Free: 7 days
- Pro: 30 days
- Enterprise: 90 days
Health Checks
Automatic Health Checks
Deployxa automatically monitors your application:
Check frequency:
- Every 30 seconds
- Continuous monitoring
- Instant detection
Check method:
- HTTP GET request
- Timeout: 10 seconds
- Expected: 2xx status code
Health endpoints:
- Default:
/ - Custom: Configure in settings
Health Check Configuration
Custom health endpoint:
- Go to Project → Settings → Health
- Enter health endpoint (e.g.,
/health) - Set timeout (default: 10s)
- Set expected status (default: 200)
- Click "Save"
Example health endpoint:
// Express.js
app.get('/health', (req, res) => {
res.status(200).json({
status: 'healthy',
timestamp: new Date().toISOString()
});
});
# Flask
@app.route('/health')
def health():
return jsonify({
'status': 'healthy',
'timestamp': datetime.now().isoformat()
}), 200
// Laravel
Route::get('/health', function () {
return response()->json([
'status' => 'healthy',
'timestamp' => now()->toISOString()
]);
});
Health Check Status
Healthy:
- Application is running
- Health check passing
- All systems operational
Unhealthy:
- Application not responding
- Health check failing
- Issues detected
Degraded:
- Application partially working
- Some checks failing
- Performance issues
Health Check Actions
Automatic actions:
- Restart container on failure
- Send alert notifications
- Log health check failures
- Update status dashboard
Manual actions:
- View health history
- Check health logs
- Restart application
- Contact support
Alerts
Alert Types
Metric Alerts:
- CPU usage
- RAM usage
- Bandwidth usage
- Error rate
- Response time
Health Alerts:
- Application down
- Health check failed
- Container crashed
- Deployment failed
Billing Alerts:
- Usage threshold
- Budget exceeded
- Payment failed
- Invoice due
Creating Alerts
- Go to Project → Settings → Alerts
- Click "Create Alert"
- Select alert type
- Configure threshold
- Choose notification method
- Click "Save"
Example alert:
{
"type": "cpu_usage",
"threshold": 90,
"duration": "5m",
"notification": {
"email": "admin@example.com",
"slack": "#alerts"
}
}
Notification Methods
Email:
- Instant notifications
- Detailed information
- Action links
Slack:
- Real-time notifications
- Channel integration
- Rich formatting
Webhook:
- Custom integrations
- JSON payload
- Retry logic
SMS:
- Critical alerts only
- Short messages
- Enterprise only
Alert Configuration
Thresholds:
- Warning threshold
- Critical threshold
- Duration (time above threshold)
- Cooldown period
Notification settings:
- Notification channels
- Notification frequency
- Escalation rules
- Quiet hours
Alert History
View alert history:
- Go to Project → Alerts
- Click "History"
- View all alerts
- Filter by type
- Export data
Alert information:
- Alert type
- Trigger time
- Resolution time
- Duration
- Notification sent
Auto-Scaling
Horizontal Scaling
Automatically add/remove containers:
Scaling triggers:
- CPU usage
- RAM usage
- Request count
- Custom metrics
Scaling limits:
- Minimum containers
- Maximum containers
- Scale-up threshold
- Scale-down threshold
Configuration:
- Go to Project → Settings → Scaling
- Enable auto-scaling
- Set minimum containers
- Set maximum containers
- Configure triggers
- Click "Save"
Example configuration:
{
"enabled": true,
"minContainers": 2,
"maxContainers": 10,
"triggers": [
{
"metric": "cpu_usage",
"threshold": 70,
"action": "scale_up"
},
{
"metric": "cpu_usage",
"threshold": 30,
"action": "scale_down"
}
]
}
Vertical Scaling
Automatically adjust resources:
Scaling triggers:
- CPU usage
- RAM usage
- Performance metrics
Resource limits:
- Minimum CPU/RAM
- Maximum CPU/RAM
- Increment size
- Cooldown period
Configuration:
- Go to Project → Settings → Resources
- Enable auto-scaling
- Set resource limits
- Configure triggers
- Click "Save"
Scale-to-Zero
Automatically scale to zero when idle:
Benefits:
- Cost savings
- Resource efficiency
- Automatic wake-up
Configuration:
- Go to Project → Settings → Scaling
- Enable scale-to-zero
- Set idle timeout (default: 15 minutes)
- Configure wake-up triggers
- Click "Save"
Wake-up triggers:
- HTTP request
- Scheduled task
- Manual trigger
Scaling Metrics
View scaling metrics:
- Go to Project → Analytics
- Select "Scaling" tab
- View container count
- Check scaling events
- Analyze trends
Scaling events:
- Scale-up events
- Scale-down events
- Trigger reasons
- Duration
Analytics
Dashboard Analytics
Overview metrics:
- Total requests
- Average response time
- Error rate
- Bandwidth usage
- Active users
View dashboard:
- Go to Project → Analytics
- View overview dashboard
- Check key metrics
- Analyze trends
Request Analytics
Request breakdown:
- By endpoint
- By method (GET, POST, etc.)
- By status code
- By time period
View request analytics:
- Go to Project → Analytics
- Select "Requests" tab
- View breakdown
- Filter by criteria
Performance Analytics
Performance metrics:
- Response times
- Latency percentiles
- Slowest endpoints
- Performance trends
View performance analytics:
- Go to Project → Analytics
- Select "Performance" tab
- View metrics
- Identify bottlenecks
Error Analytics
Error breakdown:
- By error type
- By endpoint
- By time period
- Error trends
View error analytics:
- Go to Project → Analytics
- Select "Errors" tab
- View breakdown
- Analyze patterns
Exporting Analytics
Export analytics data:
- Go to Project → Analytics
- Click "Export"
- Select format (CSV, JSON, PDF)
- Select time range
- Click "Export"
Performance Optimization
Identify Bottlenecks
Check metrics:
- CPU usage
- RAM usage
- Response times
- Error rates
Analyze logs:
- Error logs
- Performance logs
- Slow queries
Use analytics:
- Request analytics
- Performance analytics
- Error analytics
Optimize Application
Code optimization:
- Optimize algorithms
- Reduce complexity
- Use caching
- Minimize I/O
Database optimization:
- Add indexes
- Optimize queries
- Use connection pooling
- Cache results
Asset optimization:
- Minify assets
- Compress images
- Use CDN
- Enable caching
Optimize Resources
Right-size containers:
- Monitor usage
- Adjust resources
- Use auto-scaling
- Avoid over-provisioning
Enable caching:
- Application cache
- Database cache
- CDN cache
- Browser cache
Use compression:
- Gzip compression
- Brotli compression
- Image compression
- Asset minification
Troubleshooting
High CPU Usage
Problem: CPU usage consistently high
Solution:
- Check analytics for bottlenecks
- Review application code
- Optimize algorithms
- Enable caching
- Scale up resources
- Consider auto-scaling
High RAM Usage
Problem: RAM usage consistently high
Solution:
- Check for memory leaks
- Review application code
- Optimize data structures
- Enable garbage collection
- Scale up resources
- Consider auto-scaling
Slow Response Times
Problem: Response times are slow
Solution:
- Check performance analytics
- Identify slow endpoints
- Optimize database queries
- Enable caching
- Use CDN
- Optimize application code
Health Check Failing
Problem: Health checks are failing
Solution:
- Check health endpoint
- Verify endpoint is accessible
- Check application logs
- Verify timeout settings
- Test endpoint manually
- Contact support if issue persists
Alerts Not Working
Problem: Alerts not sending notifications
Solution:
- Check alert configuration
- Verify notification channels
- Test notification settings
- Check alert history
- Verify threshold settings
- Contact support if issue persists
Best Practices
Monitoring Setup
✅ Set up health checks ✅ Configure alerts ✅ Monitor key metrics ✅ Review logs regularly ✅ Use analytics
Alert Configuration
✅ Set appropriate thresholds ✅ Use multiple notification channels ✅ Avoid alert fatigue ✅ Test alerts regularly ✅ Document alert procedures
Performance Optimization
✅ Monitor performance regularly ✅ Identify bottlenecks ✅ Optimize code and queries ✅ Use caching ✅ Enable compression
Scaling Strategy
✅ Use auto-scaling ✅ Set appropriate limits ✅ Monitor scaling events ✅ Test scaling behavior ✅ Plan for traffic spikes
Related Topics
Resources
Need Help? Contact support@deployxa.com or join our community Discord.