Server Management
Server management principles for production operations.
Learn to THINK, not memorize commands.
1. Process Management Principles
Tool Selection
| Scenario |
Tool |
| Node.js app |
PM2 (clustering, reload) |
| Any app |
systemd (Linux native) |
| Containers |
Docker/Podman |
| Orchestration |
Kubernetes, Docker Swarm |
Process Management Goals
| Goal |
What It Means |
| Restart on crash |
Auto-recovery |
| Zero-downtime reload |
No service interruption |
| Clustering |
Use all CPU cores |
| Persistence |
Survive server reboot |
2. Monitoring Principles
What to Monitor
| Category |
Key Metrics |
| Availability |
Uptime, health checks |
| Performance |
Response time, throughput |
| Errors |
Error rate, types |
| Resources |
CPU, memory, disk |
Alert Severity Strategy
| Level |
Response |
| Critical |
Immediate action |
| Warning |
Investigate soon |
| Info |
Review daily |
Monitoring Tool Selection
| Need |
Options |
| Simple/Free |
PM2 metrics, htop |
| Full observability |
Grafana, Datadog |
| Error tracking |
Sentry |
| Uptime |
UptimeRobot, Pingdom |
3. Log Management Principles
Log Strategy
| Log Type |
Purpose |
| Application logs |
Debug, audit |
| Access logs |
Traffic analysis |
| Error logs |
Issue detection |
Log Principles
- Rotate logs to prevent disk fill
- Structured logging (JSON) for parsing
- Appropriate levels (error/warn/info/debug)
- No sensitive data in logs
4. Scaling Decisions
When to Scale
| Symptom |
Solution |
| High CPU |
Add instances (horizontal) |
| High memory |
Increase RAM or fix leak |
| Slow response |
Profile first, then scale |
| Traffic spikes |
Auto-scaling |
Scaling Strategy
| Type |
When to Use |
| Vertical |
Quick fix, single instance |
| Horizontal |
Sustainable, distributed |
| Auto |
Variable traffic |
5. Health Check Principles
What Constitutes Healthy
| Check |
Meaning |
| HTTP 200 |
Service responding |
| Database connected |
Data accessible |
| Dependencies OK |
External services reachable |
| Resources OK |
CPU/memory not exhausted |
Health Check Implementation
- Simple: Just return 200
- Deep: Check all dependencies
- Choose based on load balancer needs
6. Security Principles
| Area |
Principle |
| Access |
SSH keys only, no passwords |
| Firewall |
Only needed ports open |
| Updates |
Regular security patches |
| Secrets |
Environment vars, not files |
| Audit |
Log access and changes |
7. Troubleshooting Priority
When something's wrong:
- Check if running (process status)
- Check logs (error messages)
- Check resources (disk, memory, CPU)
- Check network (ports, DNS)
- Check dependencies (database, APIs)
8. Anti-Patterns
| ❌ Don't |
✅ Do |
| Run as root |
Use non-root user |
| Ignore logs |
Set up log rotation |
| Skip monitoring |
Monitor from day one |
| Manual restarts |
Auto-restart config |
| No backups |
Regular backup schedule |
Remember: A well-managed server is boring. That's the goal.
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Source: sickn33/agentic-awesome-skills → skills/server-management/SKILL.md
Also appears in: sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/server-management/SKILL.md, sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/server-management/SKILL.md
1---2name: server-management3description: Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands.4---5
6
7# Server Management
8
9> Server management principles for production operations.
10> **Learn to THINK, not memorize commands.**
11
12---
13
14## 1. Process Management Principles
15
16### Tool Selection
17
18| Scenario | Tool |
19|----------|------|
20| **Node.js app** | PM2 (clustering, reload) |
21| **Any app** | systemd (Linux native) |
22| **Containers** | Docker/Podman |
23| **Orchestration** | Kubernetes, Docker Swarm |
24
25### Process Management Goals
26
27| Goal | What It Means |
28|------|---------------|
29| **Restart on crash** | Auto-recovery |
30| **Zero-downtime reload** | No service interruption |
31| **Clustering** | Use all CPU cores |
32| **Persistence** | Survive server reboot |
33
34---
35
36## 2. Monitoring Principles
37
38### What to Monitor
39
40| Category | Key Metrics |
41|----------|-------------|
42| **Availability** | Uptime, health checks |
43| **Performance** | Response time, throughput |
44| **Errors** | Error rate, types |
45| **Resources** | CPU, memory, disk |
46
47### Alert Severity Strategy
48
49| Level | Response |
50|-------|----------|
51| **Critical** | Immediate action |
52| **Warning** | Investigate soon |
53| **Info** | Review daily |
54
55### Monitoring Tool Selection
56
57| Need | Options |
58|------|---------|
59| Simple/Free | PM2 metrics, htop |
60| Full observability | Grafana, Datadog |
61| Error tracking | Sentry |
62| Uptime | UptimeRobot, Pingdom |
63
64---
65
66## 3. Log Management Principles
67
68### Log Strategy
69
70| Log Type | Purpose |
71|----------|---------|
72| **Application logs** | Debug, audit |
73| **Access logs** | Traffic analysis |
74| **Error logs** | Issue detection |
75
76### Log Principles
77
781. **Rotate logs** to prevent disk fill
792. **Structured logging** (JSON) for parsing
803. **Appropriate levels** (error/warn/info/debug)
814. **No sensitive data** in logs
82
83---
84
85## 4. Scaling Decisions
86
87### When to Scale
88
89| Symptom | Solution |
90|---------|----------|
91| High CPU | Add instances (horizontal) |
92| High memory | Increase RAM or fix leak |
93| Slow response | Profile first, then scale |
94| Traffic spikes | Auto-scaling |
95
96### Scaling Strategy
97
98| Type | When to Use |
99|------|-------------|
100| **Vertical** | Quick fix, single instance |
101| **Horizontal** | Sustainable, distributed |
102| **Auto** | Variable traffic |
103
104---
105
106## 5. Health Check Principles
107
108### What Constitutes Healthy
109
110| Check | Meaning |
111|-------|---------|
112| **HTTP 200** | Service responding |
113| **Database connected** | Data accessible |
114| **Dependencies OK** | External services reachable |
115| **Resources OK** | CPU/memory not exhausted |
116
117### Health Check Implementation
118
119- Simple: Just return 200
120- Deep: Check all dependencies
121- Choose based on load balancer needs
122
123---
124
125## 6. Security Principles
126
127| Area | Principle |
128|------|-----------|
129| **Access** | SSH keys only, no passwords |
130| **Firewall** | Only needed ports open |
131| **Updates** | Regular security patches |
132| **Secrets** | Environment vars, not files |
133| **Audit** | Log access and changes |
134
135---
136
137## 7. Troubleshooting Priority
138
139When something's wrong:
140
1411. **Check if running** (process status)
1422. **Check logs** (error messages)
1433. **Check resources** (disk, memory, CPU)
1444. **Check network** (ports, DNS)
1455. **Check dependencies** (database, APIs)
146
147---
148
149## 8. Anti-Patterns
150
151| ❌ Don't | ✅ Do |
152|----------|-------|
153| Run as root | Use non-root user |
154| Ignore logs | Set up log rotation |
155| Skip monitoring | Monitor from day one |
156| Manual restarts | Auto-restart config |
157| No backups | Regular backup schedule |
158
159---
160
161> **Remember:** A well-managed server is boring. That's the goal.
162
163## When to Use
164This skill is applicable to execute the workflow or actions described in the overview.
165
166## Limitations
167- Use this skill only when the task clearly matches the scope described above.
168- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
169- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
170
171---
172
173**Source:** [`sickn33/agentic-awesome-skills`](https://github.com/sickn33/agentic-awesome-skills) → `skills/server-management/SKILL.md`
174
175**Also appears in:** `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/server-management/SKILL.md`, `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/server-management/SKILL.md`