Metadata-Version: 2.4
Name: elasticache-monitor
Version: 1.0.2
Summary: Debug hot shard issues in AWS ElastiCache (Redis/Valkey) clusters with a beautiful web UI
Project-URL: Homepage, https://github.com/k4kratik/elasticache-monitor
Project-URL: Documentation, https://github.com/k4kratik/elasticache-monitor#readme
Project-URL: Repository, https://github.com/k4kratik/elasticache-monitor
Project-URL: Issues, https://github.com/k4kratik/elasticache-monitor/issues
Project-URL: Changelog, https://github.com/k4kratik/elasticache-monitor/blob/main/CHANGELOG.md
Author: Kratik Jain
License: MIT
License-File: LICENSE
Keywords: aws,cluster,debugging,elasticache,hot-shard,monitoring,redis,valkey,web-ui
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Requires-Dist: boto3>=1.28.0
Requires-Dist: click>=8.1.0
Requires-Dist: colorama>=0.4.6
Requires-Dist: fastapi>=0.109.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: pyyaml>=6.0
Requires-Dist: redis>=5.0.0
Requires-Dist: sqlalchemy>=2.0.0
Requires-Dist: tabulate>=0.9.0
Requires-Dist: uvicorn>=0.27.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# ElastiCache Hot Shard Debugger

Debug hot shard issues in AWS ElastiCache (Redis/Valkey) clusters with a beautiful web interface.

## Quick Start

```bash
# Install
pip install elasticache-monitor

# Run
elasticache-monitor
```

Open **http://localhost:8099** and start monitoring!

---

## Features

- 🌐 **Web Interface** — Modern UI with real-time updates
- ⏱️ **Live Monitoring** — Countdown timer, per-shard status
- 📊 **Interactive Charts** — Click to filter, right-click to hide
- 🔍 **Analysis** — Sortable tables for keys, patterns, shards, commands
- 🔄 **Compare Jobs** — Side-by-side comparison of 2-4 sessions
- 💾 **SQL Queries** — Built-in editor with quick query templates

---

## Usage

### 1. Start the Server

```bash
elasticache-monitor              # Default port 8099
elasticache-monitor --port 3000  # Custom port
```

### 2. Create a Monitoring Job

1. Enter your **Replication Group ID**
2. Enter your **Redis password**
3. Set **duration** (30-300 seconds)
4. Click **Start Monitoring**

### 3. View Results

- **Dashboard** — Real-time command counts, shard status
- **Charts** — Command distribution, key patterns
- **Analysis** — Deep dive into keys and patterns
- **Compare** — Compare multiple monitoring sessions

---

## Requirements

- Python 3.12+
- AWS credentials (for endpoint auto-discovery)
- Network access to ElastiCache cluster

### Install

```bash
# Using uv (recommended)
uv pip install -e .

# Or pip
pip install -e .
```

---

## Production Safety

⚠️ **Always use replica endpoints** for monitoring in production. The `MONITOR` command can impact performance on primary nodes.

The web UI defaults to replica endpoints.

---

## AWS Permissions

```json
{
  "Effect": "Allow",
  "Action": [
    "elasticache:DescribeReplicationGroups",
    "elasticache:DescribeCacheClusters"
  ],
  "Resource": "*"
}
```

---

## Documentation

| Document | Description |
|----------|-------------|
| [CLI Reference](docs/CLI.md) | Command-line tools (for scripting) |
| [Database Schema](docs/DATABASE.md) | SQLite schema & example queries |
| [Changelog](CHANGELOG.md) | Version history |

---

## CLI (Legacy)

For scripting and automation, CLI tools are still available:

```bash
elasticache-monitor-cli -c my-cluster -p PASSWORD -d 60
```

See [docs/CLI.md](docs/CLI.md) for full reference.

---

**Version**: 2.0.0 · **Python**: 3.12+ · **License**: MIT
