paulpas/agent-skill-router/observability

Claude Code and agent skill by paulpas/agent-skill-router

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Implements Linux system observability with metrics, logs, and performance

Install

npx vskill@latest install paulpas/agent-skill-router/observability

SKILL.md

The same SKILL.md was published earlier as paulpas/agent-skill-router/observability.

Linux System Observability

Infrastructure engineer implementing comprehensive Linux system observability with metrics collection, log aggregation, performance profiling, and capacity planning for proactive infrastructure management across cloud and on-prem environments.

TL;DR Checklist

  • [ ] Deploy metrics collection for CPU, memory, disk I/O, and network throughput
  • [ ] Configure log collection from systemd journal and application logs
  • [ ] Set up performance profiling with perf and eBPF for latency investigation
  • [ ] Define alerting thresholds for resource utilization and error rates
  • [ ] Implement capacity planning with trend analysis and growth projections
  • [ ] Validate observability stack with synthetic load and failure injection tests
  • [ ] Document baseline metrics and alerting configuration for each workload type
  • [ ] Test alerting delivery and runbook execution for each alert type

When to Use

Use this skill when:

  • Setting up monitoring from scratch — You're deploying a new system and need to establish observability baselines
  • Investigating performance issues — A system is experiencing latency, throughput, or reliability problems and needs profiling
  • Capacity planning — You need to project resource needs based on historical growth trends
  • Setting up alerting — You need threshold-based alerts for proactive incident detection
  • Post-incident review — You need to analyze what happened during an incident using collected metrics and logs
  • Cloud vs on-prem observability differences — You need to adapt observability strategy for different deployment environments

When NOT to Use

Avoid this skill for:

  • Application-level monitoring — Use application-specific APM tools (OpenTelemetry, Datadog APM) for application metrics
  • Network packet analysis — Use tcpdump or Wireshark for packet-level investigation
  • Security forensics — Use linux-security skill for forensic investigation of security incidents
  • Real-time debugging — Use perf record and eBPF for low-level kernel debugging, not production monitoring

Use resource-management when investigating specific resource contention issues (CPU throttling, memory pressure). Use networking when network performance is the suspected bottleneck.


Core Workflow

1. Deploy Metrics Collection

Set up system metrics collection for CPU, memory, disk, and network.

bash
# Install node_exporter (Prometheus metrics)
sudo useradd --no-create-home --shell /bin/false node_exporter
wget https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-amd64.tar.gz
tar xzf node_exporter-*.tar.gz
sudo cp node_exporter-*/node_exporter /usr/local/bin/
rm -rf node_exporter-*
# Create systemd service
cat > /etc/systemd/system/node_exporter.service << 'NODE'
[Unit]
Description=Node Exporter
After=network.target
[Service]
Type=simple
User=node_exporter
Group=node_exporter
ExecStart=/usr/local/bin/node_exporter \
--collector.textfile.directory=/var/lib/node_exporter/textfile_collector \
--web.listen-address=:9100
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
NODE
sudo systemctl daemon-reload
sudo systemctl enable --now node_exporter
# Verify metrics endpoint
curl -s http://localhost:9100/metrics | head -20
# Collect additional system metrics
# CPU stats
cat /proc/stat | head -5
cat /proc/cpuinfo | grep "model name" | head -1
# Memory stats
free -h
cat /proc/meminfo | head -10
# Disk I/O
cat /proc/diskstats
iostat -x 1 5
# Network stats
ss -s
cat /proc/net/netstat | head -5

Checkpoint: node_exporter is running and exposing metrics on port 9100. All system metrics are collectable.

2. Configure Log Collection

Set up centralized log collection from systemd journal and application logs.

bash
# Configure systemd journal forwarding
cat > /etc/systemd/journald.conf << 'JOURNAL'
[Journal]
Storage=persistent
SystemMaxUse=500M
SystemMaxFileSize=50M
MaxRetentionSec=30day
ForwardToSyslog=yes
Compress=yes
JournalFileFlushInterval=30s
JOURNAL
sudo systemctl restart systemd-journald
# Configure rsyslog for log forwarding (centralized logging)
sudo apt install -y rsyslog # or dnf install rsyslog
cat > /etc/rsyslog.d/50-forward.conf << 'RSYSLOG'
# Forward all logs to centralized log server
*.* @@log-server.example.com:514
# Forward critical logs with higher priority
mail.* /var/log/mail.log
auth,authpriv.* /var/log/auth.log
kern.* /var/log/kern.log
# Rate limit to prevent log floods
$SystemLogRateLimitInterval 5
$SystemLogRateLimitBurst 1000
RSYSLOG
sudo systemctl restart rsyslog
# Configure logrotate for application logs
cat > /etc/logrotate.d/myapp << 'LOGROTATE'
/var/log/myapp/*.log {
daily
missingok
rotate 30
compress
delaycompress
notifempty
create 0640 myapp myapp
sharedscripts
postrotate
systemctl reload myapp > /dev/null 2>&1 || true
endscript
}
LOGROTATE

Checkpoint: Journal storage is persistent and sized appropriately. Logs are forwarded to central server. Log rotation prevents disk exhaustion.

3. Set Up Performance Profiling

Configure performance profiling with perf and eBPF for latency investigation.

bash
# Install perf and BPF tools
sudo apt install -y linux-tools-generic linux-tools-$(uname -r) bpfcc-tools # Debian/Ubuntu
sudo dnf install -y kernel-tools bpf-tools # RHEL/CentOS
# Check eBPF availability
sudo bpftrace -l | head -10 # List available eBPF probes
# Trace system calls for a specific process
sudo perf record -g -p $(pgrep myapp) -F 99 -a -- sleep 30
sudo perf report --stdio
# Profile specific syscalls
sudo bpftrace -e '
tracepoint:syscalls:sys_enter_openat {
printf("%s %s\n", comm, str(args->filename));
}
'
# Measure disk I/O latency
sudo bpftrace -e '
tracepoint:block:block_rq_issue {
@start[args->dev] = nsecs;
}
tracepoint:block:block_rq_complete {
@latency[args->dev] = hist(nsecs - @start[args->dev]);
delete(@start[args->dev]);
}
'
# Profile kernel functions
sudo perf record -g -e cpu-clock task-clock page-faults context-switches \
-p $(pgrep myapp) -- sleep 60
sudo perf report --stdio
# Trace network latency with bcc
sudo trace-cmd record -e tcp:tcp_sendmsg -e tcp:tcp_rcv_space_adjust \
-p $(pgrep myapp) -- sleep 30
sudo trace-cmd report

Checkpoint: Performance profiling tools are installed and functional. Baseline profiles are captured for comparison.

4. Define Alerting Thresholds

Set up threshold-based alerts for resource utilization and error rates.

Bash — Generate Prometheus alerting rules by workload type

bash
#!/bin/bash
# Generate Prometheus alerting rules for a workload type
# Usage: ./generate-alerts.sh <workload-type> [output-dir]
# Workload types: database, web-server, batch-job, monitoring
set -euo pipefail
WORKLOAD="${1:-database}"
OUTPUT_DIR="${2:-/etc/prometheus/rules}"
mkdir -p "$OUTPUT_DIR"
# Define alert thresholds per workload type
case "$WORKLOAD" in
database)
CPU_WARN=70; CPU_CRIT=90
MEM_WARN=75; MEM_CRIT=90
DISK_WARN=75; DISK_CRIT=85
NET_ERR_RATE=0.01
;;
web-server)
CPU_WARN=60; CPU_CRIT=80
MEM_WARN=70; MEM_CRIT=85
DISK_WARN=80; DISK_CRIT=90
NET_ERR_RATE=0.05
;;
batch-job)
CPU_WARN=80; CPU_CRIT=95
MEM_WARN=80; MEM_CRIT=95
DISK_WARN=85; DISK_CRIT=95
NET_ERR_RATE=0.10
;;
monitoring)
CPU_WARN=50; CPU_CRIT=70
MEM_WARN=60; MEM_CRIT=80
DISK_WARN=70; DISK_CRIT=80
NET_ERR_RATE=0.01
;;
*)
echo "Unknown workload: $WORKLOAD"
echo "Available: database, web-server, batch-job, monitoring"
exit 1
;;
esac
OUTPUT_FILE="${OUTPUT_DIR}/${WORKLOAD}-alerts.yml"
cat > "$OUTPUT_FILE" << EOF
groups:
- name: ${WORKLOAD}-alerts
rules:
- alert: HighCPUUsage
expr: 100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > ${CPU_CRIT}
for: 5m
labels:
severity: critical
workload: ${WORKLOAD}
annotations:
summary: "CPU usage above ${CPU_CRIT}% on \${labels.instance}"
description: "CPU has been above ${CPU_CRIT}% for more than 5 minutes."
- alert: HighCPUUsageWarning
expr: 100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > ${CPU_WARN}
for: 10m
labels:
severity: warning
workload: ${WORKLOAD}
annotations:
summary: "CPU usage above ${CPU_WARN}% on \${labels.instance}"
- alert: HighMemoryUsage
expr: (1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100 > ${MEM_CRIT}
for: 5m
labels:
severity: critical
workload: ${WORKLOAD}
annotations:
summary: "Memory usage above ${MEM_CRIT}% on \${labels.instance}"
- alert: HighMemoryUsageWarning
expr: (1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100 > ${MEM_WARN}
for: 10m
labels:
severity: warning
workload: ${WORKLOAD}
annotations:
summary: "Memory usage above ${MEM_WARN}% on \${labels.instance}"
- alert: DiskSpaceCritical
expr: (1 - (node_filesystem_avail_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"})) * 100 > ${DISK_CRIT}
for: 5m
labels:
severity: critical
workload: ${WORKLOAD}
annotations:
summary: "Disk usage above ${DISK_CRIT}% on \${labels.instance}"
- alert: DiskSpaceWarning
expr: (1 - (node_filesystem_avail_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"})) * 100 > ${DISK_WARN}
for: 10m
labels:
severity: warning
workload: ${WORKLOAD}
annotations:
summary: "Disk usage above ${DISK_WARN}% on \${labels.instance}"
- alert: HighNetworkErrorRate
expr: rate(node_network_receive_errs_total[5m]) / rate(node_network_receive_bytes_total[5m]) > ${NET_ERR_RATE}
for: 5m
labels:
severity: critical
workload: ${WORKLOAD}
annotations:
summary: "Network error rate above $(echo "$NET_ERR_RATE * 100" | bc)%% on \${labels.instance}"
EOF
echo "Generated Prometheus alerting rules: ${OUTPUT_FILE}"
echo "Thresholds: CPU ${CPU_WARN}/${CPU_CRIT}%, Memory ${MEM_WARN}/${MEM_CRIT}%, Disk ${DISK_WARN}/${DISK_CRIT}%"

Checkpoint: Alert thresholds are defined for each workload type. Rules are deployed to the monitoring stack and tested with synthetic load.

5. Implement Capacity Planning

Set up capacity planning with trend analysis and growth projections.

bash
# Collect historical metrics for capacity analysis
# Create metrics collection script
cat > /usr/local/bin/capacity-collect << 'CAPACITY'
#!/bin/bash
TIMESTAMP=$(date +%s)
HOSTNAME=$(hostname)
OUTPUT="/var/lib/capacity-history/metrics-$(hostname).csv"
mkdir -p /var/lib/capacity-history
# CPU usage (percentage)
CPU_IDLE=$(top -bn1 | grep "Cpu(s)" | awk '{print $8}' | cut -d. -f1)
CPU_USAGE=$((100 - CPU_IDLE))
# Memory usage (percentage)
MEM_TOTAL=$(grep MemTotal /proc/meminfo | awk '{print $2}')
MEM_AVAIL=$(grep MemAvailable /proc/meminfo | awk '{print $2}')
MEM_USAGE=$(echo "scale=1; (1 - $MEM_AVAIL / $MEM_TOTAL) * 100" | bc)
# Disk usage (percentage)
DISK_USAGE=$(df / --output=pcent | tail -1 | tr -d ' %')
# Load average (1min, 5min, 15min)
LOADAVG=$(cat /proc/loadavg | awk '{print $1, $2, $3}')
# Network throughput (bytes received/sent in last interval)
NET_RX=$(cat /proc/net/dev | grep -E "eth[0-9]|ens[0-9]|enp[0-9]" | tail -1 | awk '{print $2}')
NET_TX=$(cat /proc/net/dev | grep -E "eth[0-9]|ens[0-9]|enp[0-9]" | tail -1 | awk '{print $10}')

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/paulpas/agent-skill-router/observability/badge)](https://verified-skill.com/skills/paulpas/agent-skill-router/observability)

Something wrong with this skill or its page? Tell us.