Unify import script

This commit is contained in:
Jordan Wages 2025-07-17 23:40:59 -05:00
commit 075717041c
4 changed files with 36 additions and 24 deletions

View file

@ -23,3 +23,13 @@ python scripts/generate_reports.py monthly
```
Reports are written under the `output/` directory. Each command updates the corresponding `<interval>.json` file and produces an HTML dashboard using Chart.js.
## Importing Logs
Use the `run-import.sh` script to set up the Python environment if needed and import the latest Nginx log entries into `database/ngxstat.db`.
```bash
./run-import.sh
```
This script is suitable for cron jobs as it creates the virtual environment on first run, installs dependencies and reuses the environment on subsequent runs.