Monitoring

Monitor your application's health, performance, and resource usage in real-time. Get visibility into CPU, memory, network traffic, and response times to proactively detect and resolve issues.


Real-Time Metrics

Temps provides real-time metrics for every deployed container, giving you instant visibility into your application's performance.

Available Metrics:

  • CPU Usage - Percentage of CPU resources used
  • Memory Usage - RAM consumption in MB and percentage
  • Network Traffic - Inbound and outbound data transfer
  • Container Status - Running state and health

Metrics update in real-time via Server-Sent Events (SSE), so you always see current performance data.

Where to View:

  1. Navigate to your project in the dashboard
  2. Select an environment (production, staging, etc.)
  3. Open the Metrics tab for any container
  4. View real-time charts and current values

Accessing Metrics

Via Dashboard

  1. Go to Projects → Select your project
  2. Choose an Environment (production, staging, preview)
  3. Click on a Container to view its details
  4. Open the Metrics tab to see real-time performance data

The metrics dashboard shows:

  • Live CPU graph - CPU usage over time
  • Memory graph - RAM consumption trends
  • Network activity - Data transfer rates
  • Current values - Real-time snapshots

Via API

Access metrics programmatically using the API:

# Get real-time metrics stream
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://your-temps-instance.com/api/projects/{project_id}/environments/{environment_id}/containers/{container_id}/metrics/stream"

The metrics stream uses Server-Sent Events (SSE) and provides JSON updates in real-time:

{
  "cpu_percent": 45.2,
  "memory_bytes": 536870912,
  "memory_percent": 62.5,
  "network_rx_bytes": 1048576,
  "network_tx_bytes": 524288,
  "container_name": "my-app-production"
}

Understanding Metrics

  • Name
    CPU Usage
    Description

    What it shows: Percentage of CPU resources your container is using When to worry: - Consistently above 80% may indicate performance issues

    • Spikes above 90% during traffic surges are normal - Sustained 100% usage suggests you need more CPU resources Action: If CPU is consistently high, consider: - Increasing CPU allocation in project settings - Optimizing application code - Adding horizontal scaling
  • Name
    Memory Usage
    Description

    What it shows: RAM consumption in bytes and percentage of allocated memory When to worry: - Approaching 90% of allocated memory - Memory usage continuously growing (potential memory leak) - Container restarts due to OOM (Out of Memory) errors Action: If memory is high: - Increase memory allocation - Investigate memory leaks in your code - Review application dependencies

  • Name
    Network Traffic
    Description

    What it shows: Data transfer rates (inbound and outbound) What to monitor: - Unusual spikes in traffic - Asymmetric patterns (high outbound, low inbound) - Network saturation Action: High network usage is usually normal for web applications, but monitor for: - DDoS attacks (sudden massive spikes) - Data exfiltration (unusual outbound patterns)


Health Checks

Configure health checks to automatically monitor your application's availability:

Setting Up Health Checks

Health checks are configured in your project's deployment settings:

  1. Go to Project SettingsDeployment
  2. Configure Health Check settings:
    • Path: Endpoint to check (e.g., /health or /api/health)
    • Interval: How often to check (default: 30 seconds)
    • Timeout: Maximum wait time (default: 5 seconds)
    • Retries: Number of failed attempts before marking unhealthy

Health Check Endpoint

Your application should expose a health check endpoint that returns quickly:

// Express.js example
app.get("/health", (req, res) => {
  res.status(200).json({ status: "ok", timestamp: Date.now() });
});
# Flask example
@app.route('/health')
def health():
    return {'status': 'ok', 'timestamp': time.time()}, 200

Monitoring Best Practices

  • Name
    Set Resource Limits
    Description

    Configure appropriate CPU and memory limits based on your application's needs. Monitor actual usage and adjust as needed. How to set: 1. Project Settings → Deployment → Resources 2. Set CPU (millicores) and Memory (MB) 3. Monitor for a few days 4. Adjust based on actual usage patterns

  • Name
    Monitor Trends
    Description

    Don't just look at current values—watch for trends: - Gradual memory increases (memory leaks) - CPU spikes during specific times (traffic patterns) - Network anomalies (security issues)

  • Name
    Set Up Alerts
    Description

    Configure alerts for critical thresholds: - CPU > 90% for 5 minutes - Memory

    85% of allocation - Container restarts - Health check failures Alerts can notify you via email, webhooks, or integrations.

  • Name
    Compare Environments
    Description

    Compare metrics across environments to identify issues: - Production vs staging performance - Preview environment resource usage - Before/after deployment comparisons


Troubleshooting

  • Name
    High CPU Usage
    Description

    Symptoms: CPU consistently above 80-90% Possible causes: - Inefficient code or algorithms - Too many concurrent requests - Insufficient CPU allocation Solutions: 1. Increase CPU allocation in project settings 2. Optimize application code 3. Add caching to reduce computation 4. Scale horizontally (multiple containers)

  • Name
    High Memory Usage
    Description

    Symptoms: Memory approaching allocation limit, container restarts Possible causes: - Memory leaks in application code - Insufficient memory allocation - Large data structures in memory Solutions: 1. Increase memory allocation 2. Profile application for memory leaks 3. Implement pagination for large datasets 4. Use streaming for large file operations

  • Name
    Container Restarts
    Description

    Symptoms: Frequent container restarts visible in metrics Possible causes: - Out of memory (OOM) errors - Application crashes - Health check failures Solutions: 1. Check container logs for error messages 2. Review memory usage before restarts 3. Verify health check endpoint is working 4. Check application error logs

  • Name
    Metrics Not Updating
    Description

    Symptoms: Metrics showing stale data or connection errors Possible causes: - Container not running - Network connectivity issues - Metrics service unavailable Solutions: 1. Verify container is running 2. Check deployment status 3. Refresh the metrics view 4. Contact support if issue persists


Next Steps

Was this page helpful?