Autonomous Self-Healing Infrastructure Orchestrator
Built with Rust, Tokio, and Clean Architecture.
Aegis-RS is a lightweight, high-performance monitoring and self-healing agent for your servers. It continuously tracks CPU, RAM, and Disk usage alongside your Docker service health, and sends rich status reports with graphs to your team — all with zero external dependencies.
- Multi-Metric Monitoring — Tracks CPU usage, RAM (used/total), Disk usage, and Docker service health every 10 seconds.
- Self-Healing — Automatically restarts crashed or unhealthy Docker services and cleans logs on disk pressure.
- Rich Status Reports — Sends periodic reports with a PNG chart showing historical trends of all metrics.
- Multi-Platform Notifications — Supports Discord (live dashboard with editing), Slack, and Microsoft Teams.
- Live Web Dashboard — Auto-refreshing SVG graph available at
http://localhost:3001/graph. - CLI Webhook Management — Add or list webhooks directly from the command line.
- Prometheus Endpoint — Exposes
/metricsfor integration with Grafana or other tools. - Clean Architecture — Hexagonal design for maximum maintainability and testability.
- Go to the Releases page.
- Download the latest
aegis-rsbinary for Linux. - Make it executable and run it:
chmod +x aegis-rs
./aegis-rs# Prerequisites: Rust toolchain + libfontconfig
sudo apt-get install libfontconfig1-dev
git clone https://github.com/celestingm/Aegis-RS.git
cd Aegis-RS
cargo build --release
./target/release/aegis-rsCopy the example config file and edit it:
cp config.example.toml config.toml# config.toml
api_port = 3001
secret_token = "change-me-to-a-secure-token"
disk_threshold = 90
docker_services = ["grafana", "prometheus", "backend", "frontend"]
# Discord Webhook (Live Dashboard - updates the same message)
[[webhooks]]
url = "https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN"
provider = "discord"
# Microsoft Teams (Hourly report)
# [[webhooks]]
# url = "https://your-teams-workflow-url"
# provider = "teams"
# Slack (Hourly report)
# [[webhooks]]
# url = "https://hooks.slack.com/services/YOUR/SLACK/HOOK"
# provider = "slack"Run with a custom config path:
./aegis-rs --config /etc/aegis/config.toml# Add a webhook
./aegis-rs webhook add --url "https://discord.com/api/webhooks/..." --provider discord
# List configured webhooks
./aegis-rs webhook list| Endpoint | Method | Description | Auth |
|---|---|---|---|
/metrics |
GET |
Prometheus-compatible metrics output. | No |
/graph |
GET |
Live auto-refreshing SVG graph. | No |
/webhook |
POST |
Trigger manual remediation actions. | Yes |
The /webhook endpoint requires a Bearer token matching secret_token in your config.
Aegis-RS follows Clean Architecture (Hexagonal) principles.
graph TD
User((User / Browser)) --> Presentation
subgraph "Aegis-RS Core"
Presentation["Presentation\n(Axum HTTP API)"] --> Application
Application["Application\n(Orchestrator)"] --> Domain
Infrastructure["Infrastructure\n(Docker, Sysinfo, Notifiers)"] -.->|Implements Ports| Domain
Application -->|Uses| Infrastructure
end
Domain["Domain\n(Entities & Ports)"]
- Domain — Pure Rust structs (
SystemMetrics,Alert,HealthStatus) and port trait definitions. Zero external dependencies. - Application — The
Orchestratorevent loop driving health checks, remediation, graph generation, and notification dispatch. - Infrastructure — Concrete adapters:
SystemMonitor(sysinfo),DockerMonitor,WebhookNotifier(reqwest),FileConfigLoader. - Presentation — Axum-based HTTP server exposing metrics, graph, and webhook endpoints.