service-monitor
Skill1 starsChanged 10 months agoMITView on GitHub
Use when the user wants to check if services are running, verify endpoints are responding, or set up health checks for applications and infrastructure components.
In this repository9 other files it gives its agents.
- container-opsSkill
- disk-cleanupSkill
- incident-triageSkill
- log-analyzerSkill
- network-troubleshooterSkill
- performance-optimizerSkill
- security-auditorSkill
- ssl-checkerSkill
- system-diagnosticsSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Check the health of services, APIs, and infrastructure components.
- Distinctive: line 16
Ask the user OR auto-detect:
- Distinctive: line 74
Run multiple checks to assess consistency:
- Distinctive: line 156
NEVER send credentials in health check commands
- Distinctive: line 157
NEVER modify service configuration
- Distinctive: line 158
Use timeouts on ALL network checks (max 10s)
- Distinctive: line 159
If a service requires auth to check, ask user for method
- Distinctive: line 160
Don't flood services with requests (max 5 checks per endpoint)
- Distinctive: line 162
Check from the host's perspective, not externally
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Service Monitor
Overview
Check the health of services, APIs, and infrastructure components. Verify uptime, response times, and correct behavior of endpoints. Produce a service health dashboard.
Process
Step 1: Identify Services to Monitor
Ask the user OR auto-detect:
Auto-detect running services:
| Platform | Command |
| Windows | Get-Service | Where-Object {$_.Status -eq 'Running'} | Select Name, DisplayName |
| Linux | systemctl list-units --type=service --state=running --no-pager |
| macOS | launchctl list | grep -v "^-|com.apple" |
Auto-detect listening ports:
| Platform | Command |
| Windows | Get-NetTCPConnection -State Listen | Select LocalPort, @{N='Process';E={(Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue).Name}} | Sort LocalPort -Unique |
| Linux | ss -tlnp | tail -n +2 |
| macOS | lsof -iTCP -sTCP:LISTEN -n -P | awk '{print $1, $9}' |
Step 2: Health Checks
HTTP/HTTPS endpoints:
# Basic availability + response time
curl -s -o /dev/null -w "HTTP %{http_code} | Time: %{time_total}s | Size: %{size_download}B" [url]
# With timeout
curl -s --max-time 10 -o /dev/null -w "%{http_code}" [url]
# Follow redirects
curl -sL -o /dev/null -w "%{http_code} %{url_effective}" [url]
# Check specific header
curl -sI [url] | grep -i [header]TCP port checks:
| Platform | Command |
| Windows | Test-NetConnection -ComputerName [host] -Port [port] -InformationLevel Quiet |
| Linux | timeout 5 bash -c "echo > /dev/tcp/[host]/[port]" 2>/dev/null && echo "OPEN" || echo "CLOSED" |
| macOS | nc -z -w5 [host] [port] 2>&1 |
Database connectivity:
| Database | Check Command |
| PostgreSQL | pg_isready -h [host] -p [port] |
| MySQL | mysqladmin ping -h [host] -P [port] 2>&1 |
| Redis | redis-cli -h [host] -p [port] ping |
| MongoDB | mongosh --host [host] --port [port] --eval "db.runCommand({ping:1})" --quiet |
Service-specific checks:
| Service | Check |
| DNS | dig @[server] [domain] +short +time=5 |
| SMTP | nc -z -w5 [host] 25 || nc -z -w5 [host] 587 |
| NTP | ntpdate -q [server] 2>&1 || timedatectl show-timesync |
| LDAP | ldapsearch -x -H ldap://[host] -b "" -s base 2>&1 | head -5 |
Step 3: Response Time Analysis
Run multiple checks to assess consistency:
# 5 requests to measure consistency
for i in 1 2 3 4 5; do
curl -s -o /dev/null -w "%{time_total}\n" [url]
sleep 1
doneResponse time thresholds:
| Response Time | Rating | Action |
| < 200ms | Excellent | No action |
| 200-500ms | Good | Monitor |
| 500ms-1s | Slow | Investigate |
| 1s-5s | Poor | Needs optimization |
| > 5s | Critical | Immediate attention |
| Timeout | Down | Alert/escalate |
Step 4: Process Health
Check if process is running:
| Platform | Command |
| Windows | Get-Process -Name [name] -ErrorAction SilentlyContinue | Select Name, Id, CPU, @{N='Mem(MB)';E={[math]::Round($_.WorkingSet64/1MB)}} |
| Linux | pgrep -a [name] |
| macOS | pgrep -l [name] |
Process resource consumption:
| Platform | Command |
| Windows | Get-Process -Name [name] | Select Id, CPU, WorkingSet64, HandleCount, StartTime |
| Linux | ps -p $(pgrep [name]) -o pid,pcpu,pmem,vsz,rss,etime |
Check for zombie/defunct processes:
| Platform | Command |
| Linux | ps aux | grep -w Z | grep -v grep |
Step 5: Dependency Chain Check
Map and verify service dependencies:
Service A → depends on → Service B → depends on → Database
✓ ✓ ?For each dependency:
- Is it running?
- Is it responding?
- Is the response correct (not just 200 OK)?
Step 6: Present Health Dashboard
## Service Health Dashboard
**Checked:** [timestamp] | **Host:** [hostname]
### Service Status
| Service | Port | Status | Response | Latency |
|---------|------|--------|----------|---------|
| [name] | [port] | [UP/DOWN] | [code] | [ms] |
| [name] | [port] | [UP/DOWN] | [code] | [ms] |
### Summary
- Total services: [N]
- Healthy: [N] ✓
- Degraded: [N] ⚠
- Down: [N] ✗
### Issues Detected
1. [Service X] - [issue description]
2. [Service Y] - [issue description]
### Recommendations
- [Action items for degraded/down services]Rules
- NEVER send credentials in health check commands
- NEVER modify service configuration
- Use timeouts on ALL network checks (max 10s)
- If a service requires auth to check, ask user for method
- Don't flood services with requests (max 5 checks per endpoint)
- Report response codes accurately (don't assume 200 = healthy)
- Check from the host's perspective, not externally
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

