|
| 1 | +# Weather Data Collector - Dashboard Integration |
| 2 | + |
| 3 | +## ✅ Integration Complete |
| 4 | + |
| 5 | +The weather-data-collector-spain project is now fully integrated with the mosquito-alert-model-monitor dashboard. |
| 6 | + |
| 7 | +## 🎯 What's Monitored |
| 8 | + |
| 9 | +The dashboard now tracks these weather collection jobs: |
| 10 | + |
| 11 | +| Job Name | Purpose | Frequency | Priority | |
| 12 | +|----------|---------|-----------|----------| |
| 13 | +| `weather-forecast` | Municipal forecasts (8,129 municipalities) | Every 6 hours | CRITICAL | |
| 14 | +| `weather-hourly` | Station observations (all AEMET stations) | Every 2 hours | MEDIUM | |
| 15 | +| `weather-historical` | Historical data backfill | Daily | LOW | |
| 16 | +| `municipal-forecast-priority` | Immediate municipal data | Every 6 hours | CRITICAL | |
| 17 | + |
| 18 | +## 🔧 Key Changes Made |
| 19 | + |
| 20 | +### 1. Enhanced Status Reporting |
| 21 | +- **Updated**: `scripts/update_weather_status.sh` now includes git push functionality |
| 22 | +- **Result**: Job status changes automatically trigger dashboard rebuilds |
| 23 | + |
| 24 | +### 2. Job Script Integration |
| 25 | +- **Modified**: `update_weather.sh` with proper status reporting |
| 26 | +- **Modified**: `priority_municipal_data.sh` with status integration |
| 27 | +- **Result**: All weather jobs report progress, duration, and completion status |
| 28 | + |
| 29 | +### 3. Initial Status Files |
| 30 | +- **Created**: Status files for all 4 weather jobs in the dashboard |
| 31 | +- **Result**: Dashboard shows weather jobs even when not actively running |
| 32 | + |
| 33 | +## 🚀 Testing on Cluster |
| 34 | + |
| 35 | +When you're ready to test on the HPC cluster: |
| 36 | + |
| 37 | +### 1. Quick Integration Test |
| 38 | +```bash |
| 39 | +cd ~/research/weather-data-collector-spain |
| 40 | +./scripts/test_dashboard_integration.sh |
| 41 | +``` |
| 42 | + |
| 43 | +### 2. Run a Real Weather Job |
| 44 | +```bash |
| 45 | +# Test the priority municipal forecast (short runtime) |
| 46 | +sbatch priority_municipal_data.sh |
| 47 | + |
| 48 | +# Monitor dashboard for live updates |
| 49 | +``` |
| 50 | + |
| 51 | +### 3. Check Dashboard |
| 52 | +- **Local**: `~/research/mosquito-alert-model-monitor/docs/index.html` |
| 53 | +- **GitHub Pages**: Will auto-update within 2-3 minutes of job status changes |
| 54 | + |
| 55 | +## 📊 Dashboard Features for Weather Jobs |
| 56 | + |
| 57 | +- **Real-time Status**: Running, completed, failed, waiting |
| 58 | +- **Progress Tracking**: 0-100% completion |
| 59 | +- **Duration Monitoring**: Job execution time |
| 60 | +- **Resource Usage**: CPU and memory utilization |
| 61 | +- **Next Run Schedule**: Automatic calculation based on job type |
| 62 | +- **Error Alerts**: Failed jobs highlighted in dashboard |
| 63 | + |
| 64 | +## 🔄 How It Works |
| 65 | + |
| 66 | +1. **Job starts** → Updates status to "running" |
| 67 | +2. **Job progresses** → Periodic status updates with progress % |
| 68 | +3. **Job completes/fails** → Final status update |
| 69 | +4. **Status script** → Automatically commits and pushes to git |
| 70 | +5. **GitHub Actions** → Rebuilds and deploys dashboard |
| 71 | +6. **Dashboard** → Shows updated status within 2-3 minutes |
| 72 | + |
| 73 | +## ⚠️ Requirements on Cluster |
| 74 | + |
| 75 | +- SSH keys configured for git push |
| 76 | +- `mosquito-alert-monitor` conda environment activated |
| 77 | +- Access to `~/research/mosquito-alert-model-monitor` directory |
| 78 | + |
| 79 | +## 🎉 Benefits |
| 80 | + |
| 81 | +- **Real-time Monitoring**: See job status without logging into cluster |
| 82 | +- **Historical Tracking**: Dashboard maintains job history |
| 83 | +- **Automated Alerts**: Failed jobs are highlighted |
| 84 | +- **Resource Monitoring**: Track cluster resource usage |
| 85 | +- **Schedule Awareness**: See when jobs are expected to run next |
| 86 | + |
| 87 | +Your weather data collection pipeline is now fully visible and monitored through the dashboard! |
0 commit comments