check retention

This commit is contained in:
2026-03-10 14:30:10 +00:00
parent 7f0447f82c
commit 3ffaf0cc4d
6 changed files with 65 additions and 3 deletions

View File

@@ -42,6 +42,21 @@ docker run -p 8080:8080 -v $(pwd)/data:/app/data myapp:test
Add services from the dashboard (e.g. `https://example.com`, `google.com:443` for TCP) and view reports.
### Check Retention
To limit database growth, the app prunes old checks every 15 minutes:
| Env var | Default | Description |
|---------|---------|-------------|
| `CHECK_RETENTION_COUNT` | 5000 | Keep last N checks per service |
| `CHECK_RETENTION_DAYS` | 0 (disabled) | Also delete checks older than N days |
Example: keep 2000 checks per service and drop anything older than 30 days:
```bash
docker run -e CHECK_RETENTION_COUNT=2000 -e CHECK_RETENTION_DAYS=30 ...
```
## Jenkins Pipeline
The pipeline: