mcpField
S
server-management

server-management

github.com/vudovnCloud & DevOps8.2k189 installsUpdated 9w ago
Repository

About server-management

A guide to server management principles for production operators, covering process management, monitoring, logs, scaling, health checks, and security. It offers tool-selection and troubleshooting guidance, with operational practices chosen according to the situation.

Key features

  1. 01Process management tool selection
  2. 02Monitoring metrics and alert severity
  3. 03Log rotation and structured records
  4. 04Scaling strategies and health checks
  5. 05Access, network, and secrets security

Use cases

  1. 01Plan crash recovery and restart behavior for an application
  2. 02Select server monitoring metrics and alert levels
  3. 03Troubleshoot service failures and resource bottlenecks
  4. 04Review access and update practices for production servers

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/vudovn/ag-kit --skill server-management

After installing, type/server-managementin Claude Code to confirm it loaded.

Details

From the project README

Server Management

Server management principles for production operations. Learn to THINK, not memorize commands.


1. Process Management Principles

Tool Selection
ScenarioTool
Node.js appPM2 (clustering, reload)
Any appsystemd (Linux native)
ContainersDocker/Podman
OrchestrationKubernetes, Docker Swarm
Process Management Goals
GoalWhat It Means
Restart on crashAuto-recovery
Zero-downtime reloadNo service interruption
ClusteringUse all CPU cores
PersistenceSurvive server reboot

2. Monitoring Principles

What to Monitor
CategoryKey Metrics
AvailabilityUptime, health checks
PerformanceResponse time, throughput
ErrorsError rate, types
ResourcesCPU, memory, disk
Alert Severity Strategy
LevelResponse
CriticalImmediate action
WarningInvestigate soon
InfoReview daily
Monitoring Tool Selection
NeedOptions
Simple/FreePM2 metrics, htop
Full observabilityGrafana, Datadog
Error trackingSentry
UptimeUptimeRobot, Pingdom

3. Log Management Principles

Log Strategy
Log TypePurpose
Application logsDebug, audit
Access logsTraffic analysis
Error logsIssue detection
Log Principles
  1. Rotate logs to prevent disk fill
  2. Structured logging (JSON) for parsing
  3. Appropriate levels (error/warn/info/debug)
  4. No sensitive data in logs

4. Scaling Decisions

When to Scale
SymptomSolution
High CPUAdd instances (horizontal)
High memoryIncrease RAM or fix leak
Slow responseProfile first, then scale
Traffic spikesAuto-scaling
Scaling Strategy
TypeWhen to Use
VerticalQuick fix, single instance
HorizontalSustainable, distributed
AutoVariable traffic

5. Health Check Principles

What Constitutes Healthy
CheckMeaning
HTTP 200Service responding
Database connectedData accessible
Dependencies OKExternal services reachable
Resources OKCPU/memory not exhausted
Health Check Implementation
  • Simple: Just return 200
  • Deep: Check all dependencies
  • Choose based on load balancer needs

6. Security Principles

AreaPrinciple
AccessSSH keys only, no passwords
FirewallOnly needed ports open
UpdatesRegular security patches
SecretsEnvironment vars, not files
AuditLog access and changes

7. Troubleshooting Priority

When something's wrong:

  1. Check if running (process status)
  2. Check logs (error messages)
  3. Check resources (disk, memory, CPU)
  4. Check network (ports, DNS)
  5. Check dependencies (database, APIs)

8. Anti-Patterns

❌ Don't✅ Do
Run as rootUse non-root user
Ignore logsSet up log rotation
Skip monitoringMonitor from day one
Manual restartsAuto-restart config
No backupsRegular backup schedule

Remember: A well-managed server is boring. That's the goal.

Comments

Markdown supported