# aws-redis-monitor

Adopt this skill: https://proskills.md/skills/other/clawnoc-clawnoc-skills-skills-aws-redis-monitor

Page: https://proskills.md/skills/other/clawnoc-clawnoc-skills-skills-aws-redis-monitor
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skills/aws-redis-monitor/SKILL.md
size: 2575
upstream: https://github.com/clawnoc/clawnoc-skills/blob/main/skills/aws-redis-monitor/SKILL.md

````text
---
name: aws-redis-monitor
description: Monitor AWS ElastiCache Redis clusters with anomaly detection
metadata: {"openclaw": {"always": false, "emoji": "*"}}
---

# AWS Redis Monitor

Monitor ElastiCache Redis clusters in AWS, detect anomalies by comparing current metrics against historical baselines.

## Prerequisites

- AWS CLI configured with valid credentials
- jq installed
- python3 installed

## Commands

### Global Overview (Daily Patrol)

```bash
~/.openclaw/workspace/skills/aws-redis-monitor/lib/redis-overview.sh [profile] [region] [hours]
```

Shows all clusters summary, highlights anomalies only. Default: last 24 hours.

### Single Cluster Detail

```bash
~/.openclaw/workspace/skills/aws-redis-monitor/lib/redis-detail.sh <cluster-name> [profile] [region] [hours]
```

Full metrics and hourly trend for a specific cluster.

### Pre/Post Deploy Compare

```bash
~/.openclaw/workspace/skills/aws-redis-monitor/lib/redis-compare.sh <cluster-name> <minutes> [profile] [region]
```

Compare metrics before and after a deployment. Default: 30 minutes window.

## Configuration

Edit `config.json` to define cluster groups and thresholds:

```json
{
  "groups": {
    "core": ["my-main-redis", "my-cache-redis"],
    "api": ["my-api-redis-01", "my-api-redis-02"]
  },
  "thresholds": {
    "cpu_warn": 70,
    "memory_warn": 80,
    "spike_ratio": 1.5,
    "drop_ratio": 0.5
  }
}
```

## Usage Patterns

When user asks:
- "Redis 巡检" / "Redis 状态" / "Redis overview" -> Run redis-overview.sh
- "xxx Redis 详情" / "xxx Redis detail" -> Run redis-detail.sh <cluster>
- "上线后 Redis 变化" / "Redis 对比" -> Run redis-compare.sh <cluster>
- "Redis CPU" / "Redis 内存" / "Redis 连接数" -> Run redis-overview.sh, highlight relevant metric

## Monitored Metrics

P0 (Critical):
- EngineCPUUtilization - CPU usage
- DatabaseMemoryUsagePercentage - Memory usage
- CurrConnections - Connection count
- CacheHitRate - Cache hit rate
- StringBasedCmdsLatency - Command latency

P1 (Important):
- GetTypeCmds, SetTypeCmds - Operations per second
- NetworkBytesIn, NetworkBytesOut - Network traffic
- Evictions - Key evictions
- ReplicationLag - Replication delay

## Output

- Only shows anomalous clusters in overview mode
- Anomaly detection: current vs 7-day same-period average
- Markers: [!] warning (>1.5x or <0.5x), [!!] critical (>2x or <0.3x)
- **IMPORTANT: The script output is pre-formatted plain text. Do NOT reformat, convert to markdown tables, or modify the output in any way. Display the raw output exactly as returned by the script.**
````

## File: README.md
upstream: https://github.com/clawnoc/clawnoc-skills/blob/main/README.md

````text
# 🦞 ClawNOC Skills

[![Skills](https://img.shields.io/badge/skills-6-ff6b35)](https://github.com/clawnoc/clawnoc-skills)
[![Scripts](https://img.shields.io/badge/scripts-14-00d68f)](https://github.com/clawnoc/clawnoc-skills)
[![Lambdas](https://img.shields.io/badge/lambdas-5-9b59b6)](https://github.com/clawnoc/clawnoc-skills/tree/main/lambdas)
[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
[![Platform](https://img.shields.io/badge/platform-OpenClaw-4a9eff)](https://github.com/openclaw)

AI Ops Agent skill pack for [OpenClaw](https://github.com/openclaw/openclaw). Automate CDN management, security scanning, monitoring, deployment verification, and documentation generation.

## Skills

| Skill | Scripts | Description |
|-------|---------|-------------|
| 🎯 clawnoc-noc | `noc-patrol.sh` | Full NOC pack — one-click patrol combining all skills |
| 🌐 clawnoc-cdn | `check-cache.sh` `invalidate-cloudfront.sh` | CDN cache management & diagnostics |
| 🔒 clawnoc-security | `check-ssl.sh` `check-ports.sh` `check-ssh-audit.sh` | Security scanning & audit |
| 📊 clawnoc-monitor | `check-system.sh` `check-disk-alert.sh` `check-health.sh` `alert-webhook.sh` | Monitoring & alerting |
| 🚀 clawnoc-deploy | `pre-deploy-check.sh` `post-deploy-verify.sh` | Deployment verification & rollback |
| 📋 clawnoc-doc | `gen-change-doc.sh` `gen-system-info.sh` | Auto documentation generation |

## Quick Start

```bash
# Install all skills
claw skill install clawnoc/clawnoc-noc

# Or install individually
claw skill install clawnoc/clawnoc-cdn
claw skill install clawnoc/clawnoc-security
```

## Usage

Talk to your agent in natural language:

```
"Help me clear CDN cache for www.example.com"
"Scan all SSL certificates expiry dates"
"Check disk and memory usage across all servers"
"Run a full NOC patrol"
"Generate a change document for today's operations"
```

Or run scripts directly:

```bash
# Full patrol
./skills/clawnoc-noc/noc-patrol.sh https://example.com

# Check system resources
./skills/clawnoc-monitor/check-system.sh

# SSL certificate check
./skills/clawnoc-security/check-ssl.sh example.com api.example.com

# Post-deploy verification (60s observation)
./skills/clawnoc-deploy/post-deploy-verify.sh https://example.com/health 60
```

## Supported Platforms

- Linux (CentOS / Ubuntu / Amazon Linux)
- macOS
- Cloud: AWS, GCP, Alibaba Cloud, Tencent Cloud, Volcengine

## Lambda Projects

Production-ready AWS Lambda functions for automated ops tasks. Each includes SAM template, README (EN/中文), and pluggable notifications (DingTalk/Feishu/Slack).

| Project | Description |
|---------|-------------|
| 🔒 [cert-expiry-check](lambdas/cert-expiry-check/) | SSL certificate expiry monitoring |
| 💰 [idle-resource-scan](lambdas/idle-resource-scan/) | Detect idle EC2, RDS, EBS, EIP, NAT Gateway |
| 🔴 [redis-bigkey-scan](lambdas/redis-bigkey-scan/) | ElastiCache Redis big key detection |
| 💸 [cost-anomaly-alert](lambdas/cost-anomaly-alert/) | Cost monitoring with daily/weekly reports |
| 🛡️ [security-group-audit](lambdas/security-group-audit/) | Security group risk scanning with fix commands |

## License

MIT
````
