Persist per-host scan results and expose hosts endpoint.
Store checked hosts for each scan and add API to fetch host-level up/down probe results. Made-with: Cursor
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
- `POST /api/scans` - создание задания скана.
|
||||
- `GET /api/scans` - список сканов.
|
||||
- `GET /api/scans/{id}` - просмотр созданного задания.
|
||||
- `GET /api/scans/{id}/hosts` - результаты проверки хостов по скану.
|
||||
- Валидация CIDR и exclude IP.
|
||||
- Два backend-хранилища: in-memory и PostgreSQL.
|
||||
- После создания scan запускается фоновый discovery с обновлением статуса и прогресса.
|
||||
@@ -130,6 +131,12 @@ curl -s http://localhost:8080/api/scans?limit=20
|
||||
- `progress`: 0..100
|
||||
- `stats.hosts_total`, `stats.hosts_up`
|
||||
|
||||
Получить результаты по хостам:
|
||||
|
||||
```bash
|
||||
curl -s http://localhost:8080/api/scans/<scan_id>/hosts?limit=200
|
||||
```
|
||||
|
||||
## Запуск как сервис на Linux (systemd)
|
||||
|
||||
1. Собрать бинарник:
|
||||
|
||||
Reference in New Issue
Block a user