Operations and Maintenance¶
This document describes operational procedures, monitoring, logging, health checks, backup strategies, and troubleshooting guidance for running Trustpoint in production.
Monitoring¶
Prometheus Metrics¶
Metrics endpoint: /metrics
Key metrics categories:
Category |
Key Metrics |
Description |
|---|---|---|
HTTP |
|
Request count, latency quantiles, response status codes |
Database |
|
Query performance, connection pool usage |
Workflows |
|
Job queue depth, execution status, worker health |
Certificates |
|
Certificate lifecycle metrics, device inventory |
Integration: Use Prometheus to scrape /metrics, visualize with Grafana dashboards.
Logging¶
Log Locations¶
Log Type |
Location |
Rotation |
Retention |
|---|---|---|---|
Application |
|
Daily or 100MB |
30 days |
NGINX Access |
|
Daily |
Configurable |
NGINX Error |
|
Daily |
Configurable |
PostgreSQL |
|
Daily |
Configurable |
Worker |
Same as application |
Daily or 100MB |
30 days |
Capacity Planning¶
Resource Requirements¶
Deployment Size |
CPU |
RAM |
Disk |
Notes |
|---|---|---|---|---|
Small (<1,000 devices) |
2 cores |
4 GB |
20 GB |
Single instance |
Medium (1,000-10,000 devices) |
4 cores |
8 GB |
100 GB |
Single instance |
Large (>10,000 devices) |
8+ cores |
16+ GB |
500+ GB |
Multi-instance, DB replication |
Scaling Guidelines¶
Horizontal scaling:
Add web instances behind load balancer for increased request capacity
Add worker instances for parallel job processing
Use PostgreSQL read replicas for reporting queries
Vertical scaling:
Increase database CPU/memory for query performance
Increase Gunicorn worker count per instance
Expand disk for certificate and log storage
Storage planning:
100-500 bytes per certificate record
10-50 KB per device (with history)
1-10 GB/month for logs (varies by activity)
Performance Targets¶
Metric |
Target |
Notes |
|---|---|---|
Web UI response time |
<500ms p95 |
Page load time |
API response time |
<200ms p95 |
REST API endpoints |
Certificate issuance |
<5 seconds |
End-to-end enrollment |
API throughput |
100-1,000 req/s |
Depends on instance count |
Uptime (standard) |
99.9% |
8.7 hours downtime/year |
Best Practices¶
Monitor proactively - Set up alerts for key metrics (queue depth, error rate, expiring certificates)
Automate backups - Daily encrypted backups to offsite storage, test recovery quarterly
Use hardware HSM - Protect CA keys in production environments
Enable audit logging - Forward to SIEM for security monitoring and compliance
Plan capacity - Monitor growth trends, scale before hitting limits
Test disaster recovery - Practice recovery procedures annually
Keep software updated - Apply security patches within 30 days
Document procedures - Maintain runbooks for common operations
Use configuration management - Version control all configuration files
Implement monitoring redundancy - Don’t rely solely on Trustpoint’s own monitoring