Predictive Infrastructure Intelligence Platform
PreScale uses machine learning to forecast infrastructure demand, detect anomalies, and provide proactive scaling recommendations. It supports multi-cloud metrics collection, real-time dashboards, and extensible agent architecture.
docker run -d -p 8080:8080 ghcr.io/pyjeebz/prescale/inference:latest
# Open http://localhost:8080Prerequisites: Python 3.10+, Node.js 18+
# Clone and setup
git clone https://github.com/pyjeebz/prescale.git
cd prescale
# Python environment
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS/Linux
pip install -r ml/inference/requirements.txt
# Start backend (Terminal 1)
python -m uvicorn ml.inference.app:app --host 0.0.0.0 --port 8080
# Start frontend (Terminal 2)
cd ml/inference/web
npm install
npm run dev
# Open http://localhost:3000helm repo add prescale https://pyjeebz.github.io/prescale
helm install prescale prescale/prescale- Deployments โ Create a deployment (e.g.,
my-app-prod) - Install Agent โ Copy commands, run on your server
- Dashboard โ View predictions, anomalies, recommendations
| Feature | Description |
|---|---|
| Traffic Forecasting | Predict CPU, memory, and request rates |
| Anomaly Detection | Real-time detection using ML/statistics |
| Scaling Recommendations | Proactive advice for resource scaling |
| Multi-Cloud Support | GCP, AWS, Azure, Prometheus, custom sources |
| Web Dashboard | Real-time charts, agent map, predictions, anomalies |
| CLI Tools | prescale CLI for predictions, anomaly detection, recommendations |
| Pluggable Storage | In-memory (dev), PostgreSQL, TimescaleDB, InfluxDB (planned) |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Prescale Agent โโโบ ML Pipeline โโโบ Inference Service (API) โ
โ โ โ โ โ
โ โผ โผ โผ โ
โ Metrics Training Predictions/Anomalies โ
โ โ โ โ โ
โ โโโโโโโโโโโโโโโบ Storage Backend (pluggable) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
prescale/
โโโ agent/ # Metrics collection agent (pluggable sources)
โโโ cli/ # CLI tools for predictions/anomalies/recommendations
โโโ ml/ # ML models, training, inference service (FastAPI)
โ โโโ inference/web/ # Vue.js web dashboard
โโโ infra/ # Kubernetes, Terraform, Docker, Helm
โโโ charts/prescale/ # Helm chart
โโโ docs/ # Documentation
Collects metrics from:
- System (CPU, memory, disk, network)
- Prometheus
- GCP Cloud Monitoring
- AWS CloudWatch (planned)
- Azure Monitor (planned)
- Datadog (planned)
pip install prescale-agent
pip install prescale-agent[gcp] # GCP
pip install prescale-agent[aws] # AWS
pip install prescale-agent[azure] # Azure
pip install prescale-agent[all] # All backendsagent:
collection_interval: 60
log_level: INFO
sources:
- type: system
enabled: true
config:
collect_cpu: true
collect_memory: true
- type: prometheus
enabled: true
config:
url: http://prometheus:9090
queries:
- name: cpu_usage
query: rate(container_cpu_usage_seconds_total[5m])
prescale:
endpoint: http://prescale-inference:8080The Vue.js dashboard provides AI-powered insights for your infrastructure:
| Feature | Description |
|---|---|
| Multi-Deployment Management | Create and switch between deployments (prod, staging, dev) |
| Agent Installation | Copy-paste commands with live connection status |
| AI Predictions | Forecast CPU, memory, and resource usage |
| Anomaly Detection | Real-time detection of unusual patterns |
| Recommendations | Proactive scaling advice with confidence scores |
cd ml/inference/web
npm install
npm run dev # Development: http://localhost:3000
npm run build # Production build to ../static- Create a deployment (
/deployments) - e.g.,ecommerce-prod - Install the agent (
/install) - copy commands, run on your server - View AI insights - predictions, anomalies, and recommendations appear automatically
- Baseline (moving average/trend)
- Prophet (seasonality)
- XGBoost (anomaly detection)
- Models train on collected metrics (manual/auto)
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Service health check |
/api/v1/ingest |
POST | Ingest metrics from agent |
/api/v1/predict |
POST | Forecast future metrics |
/api/v1/detect |
POST | Anomaly detection |
/api/v1/recommend |
POST | Scaling recommendations |
/api/metrics |
GET | List available metric names |
/api/metrics/{name} |
GET | Get time-series data |
- Helm chart for easy install
- K8s manifests for inference service, monitoring, autoscaling
- Agent with pluggable backends (GCP, Prometheus, System)
- ML pipeline (Baseline, Prophet, XGBoost)
- Inference service (FastAPI)
- CLI tools (predict, detect, recommend)
- Kubernetes/Helm deployment
- Web dashboard (Vue.js) with multi-deployment support
- Agent installation flow
- AI-focused insights (predictions, anomalies, recommendations)
- Automated model retraining (GCP/AWS integration)
- Agent management controls (pause/resume, collection interval)
- Pluggable storage backend (SQLite supported, others planned)
- Multi-cluster support
- Deep learning models (LSTM, Transformer)
- Alerting integrations (Slack, PagerDuty)
- User authentication/RBAC
- Landing page
cd ml && pytest tests/
cd agent && pytest
cd cli && pytestApache 2.0 - See LICENSE
See CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open a Pull Request