Skip to content
Back to skills

Predictive Health

ASecurity

Use for health trend, anomaly, disk forecast

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 4, 2026
ai-agentspythonbash

Works with

  • cli

Security analysis

A100/100

Scanned October 4, 2026

npx -y skills add openamer/openamer --skill predictive-health --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Predictive Health?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Predictive Health
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/openamer-predictive-health/badge)](https://www.skillsdirectory.com/skills/openamer-predictive-health)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: predictive-health
description: "Use for health trend, anomaly, disk forecast"
---

# Predictive Health Monitor

ML-basierte System-Health-Überwachung mit Trend-Analyse, Anomalie-Detektion, Disk-Volllauf-Prognose und Daemon-Modus.

## Script

`scripts/predictive-health.py` — keine externen Dependencies (nur Python-Standardbibliothek).

## CLI-Modi

| Argument | Beschreibung |
|----------|-------------|
| `--collect` | Sammelt Systemmetriken (RAM, Disk, CPU, Cron-Exit-Codes) und hängt an history.csv an |
| `--predict` | Führt Trend-Analyse + Anomalie-Detektion + Disk-Prognose aus (menschenlesbar) |
| `--report` | JSON-Report auf stdout (maschinenlesbar) |
| `--watch [min]` | Daemon-Modus, alle N Minuten sammeln + analysieren (Default: 5) |
| `--daemon` | Alias für --watch |

## Exit-Codes

| Code | Bedeutung |
|------|-----------|
| 0 | Alles gut |
| 1 | Trend steigend |
| 2 | Anomalie erkannt (>2σ) |
| 3 | Disk-Volllauf < 30 Tage |

## Daten

- Historie: `~/.openamer/.predictive-health/history.csv` (max 10.000 Zeilen)
- Report: `~/.openamer/.predictive-health/latest_report.json`
- PID: `~/.openamer/.predictive-health/predictive-health.pid`

## Cron-Jobs

| Job | Rhythmus | Beschreibung |
|-----|----------|-------------|
| `predictive-health-collect` | alle 30min | Metriken sammeln (--no-agent) |
| `predictive-health-predict` | alle 6h | Trend-Analyse + Report (--no-agent) |

## Verwendung

```bash
# Einmalig sammeln
python scripts/predictive-health.py --collect

# Trend-Report anzeigen
python scripts/predictive-health.py --predict

# JSON-Report
python scripts/predictive-health.py --report

# Als Daemon (alle 5 Minuten)
python scripts/predictive-health.py --watch
```

## Architektur

- `collect_metrics()`: RAM, Disk, CPU via WMIC (Win), /proc/stat (Linux), psutil (Fallback)
- `linear_regression()`: y = slope*x + intercept mit R²
- `detect_anomalies()`: Gleitender Mittelwert (Fenster=20) + Z-Score > 2σ
- `predict_disk_full()`: Multi-Fenster-Analyse (24h/3d/7d), wählt bestes R²
- `daemon_loop()`: Loop mit Signal-Handling und PID-Datei

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…