1---2name: server-management3description: "Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands."4version: 1.0.05author:6 name: "sickn33 / Antigravity Community"7 github: sickn338tags: [server, management, reliability]9category: reliability10platforms: [macos, linux, windows]11license: MIT12metadata:13 hermes:14 source: https://skillmd.com/skills/nous-hermeshub/server-management15 upstream: "antigravity-awesome-skills"16 risk: "safe"17 date_added: "2026-02-27"18 original_author: "Antigravity Community"19---2021# Server Management2223> Server management principles for production operations.24> **Learn to THINK, not memorize commands.**2526---2728## 1. Process Management Principles2930### Tool Selection3132| Scenario | Tool |33|----------|------|34| **Node.js app** | PM2 (clustering, reload) |35| **Any app** | systemd (Linux native) |36| **Containers** | Docker/Podman |37| **Orchestration** | Kubernetes, Docker Swarm |3839### Process Management Goals4041| Goal | What It Means |42|------|---------------|43| **Restart on crash** | Auto-recovery |44| **Zero-downtime reload** | No service interruption |45| **Clustering** | Use all CPU cores |46| **Persistence** | Survive server reboot |4748---4950## 2. Monitoring Principles5152### What to Monitor5354| Category | Key Metrics |55|----------|-------------|56| **Availability** | Uptime, health checks |57| **Performance** | Response time, throughput |58| **Errors** | Error rate, types |59| **Resources** | CPU, memory, disk |6061### Alert Severity Strategy6263| Level | Response |64|-------|----------|65| **Critical** | Immediate action |66| **Warning** | Investigate soon |67| **Info** | Review daily |6869### Monitoring Tool Selection7071| Need | Options |72|------|---------|73| Simple/Free | PM2 metrics, htop |74| Full observability | Grafana, Datadog |75| Error tracking | Sentry |76| Uptime | UptimeRobot, Pingdom |7778---7980## 3. Log Management Principles8182### Log Strategy8384| Log Type | Purpose |85|----------|---------|86| **Application logs** | Debug, audit |87| **Access logs** | Traffic analysis |88| **Error logs** | Issue detection |8990### Log Principles91921. **Rotate logs** to prevent disk fill932. **Structured logging** (JSON) for parsing943. **Appropriate levels** (error/warn/info/debug)954. **No sensitive data** in logs9697---9899## 4. Scaling Decisions100101### When to Scale102103| Symptom | Solution |104|---------|----------|105| High CPU | Add instances (horizontal) |106| High memory | Increase RAM or fix leak |107| Slow response | Profile first, then scale |108| Traffic spikes | Auto-scaling |109110### Scaling Strategy111112| Type | When to Use |113|------|-------------|114| **Vertical** | Quick fix, single instance |115| **Horizontal** | Sustainable, distributed |116| **Auto** | Variable traffic |117118---119120## 5. Health Check Principles121122### What Constitutes Healthy123124| Check | Meaning |125|-------|---------|126| **HTTP 200** | Service responding |127| **Database connected** | Data accessible |128| **Dependencies OK** | External services reachable |129| **Resources OK** | CPU/memory not exhausted |130131### Health Check Implementation132133- Simple: Just return 200134- Deep: Check all dependencies135- Choose based on load balancer needs136137---138139## 6. Security Principles140141| Area | Principle |142|------|-----------|143| **Access** | SSH keys only, no passwords |144| **Firewall** | Only needed ports open |145| **Updates** | Regular security patches |146| **Secrets** | Environment vars, not files |147| **Audit** | Log access and changes |148149---150151## 7. Troubleshooting Priority152153When something's wrong:1541551. **Check if running** (process status)1562. **Check logs** (error messages)1573. **Check resources** (disk, memory, CPU)1584. **Check network** (ports, DNS)1595. **Check dependencies** (database, APIs)160161---162163## 8. Anti-Patterns164165| ❌ Don't | ✅ Do |166|----------|-------|167| Run as root | Use non-root user |168| Ignore logs | Set up log rotation |169| Skip monitoring | Monitor from day one |170| Manual restarts | Auto-restart config |171| No backups | Regular backup schedule |172173---174175> **Remember:** A well-managed server is boring. That's the goal.176177## When to Use178This skill is applicable to execute the workflow or actions described in the overview.179180## Limitations181- Use this skill only when the task clearly matches the scope described above.182- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.183- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.