Update run-reports to generate per-domain reports
This commit is contained in:
parent
2ec9aac290
commit
27a73ec4e8
3 changed files with 101 additions and 14 deletions
14
README.md
14
README.md
|
@ -22,6 +22,18 @@ python scripts/generate_reports.py weekly
|
|||
python scripts/generate_reports.py monthly
|
||||
```
|
||||
|
||||
Each command accepts optional flags to generate per-domain reports. Use
|
||||
`--domain <name>` to limit output to a specific domain or `--all-domains`
|
||||
to generate a subdirectory for every domain found in the database:
|
||||
|
||||
```bash
|
||||
# Hourly reports for example.com only
|
||||
python scripts/generate_reports.py hourly --domain example.com
|
||||
|
||||
# Weekly reports for all domains individually
|
||||
python scripts/generate_reports.py weekly --all-domains
|
||||
```
|
||||
|
||||
Reports are written under the `output/` directory. Each command updates the corresponding `<interval>.json` file and produces an HTML dashboard using Chart.js.
|
||||
|
||||
### Configuring Reports
|
||||
|
@ -73,7 +85,7 @@ Use the `run-reports.sh` script to run all report intervals in one step. The scr
|
|||
./run-reports.sh
|
||||
```
|
||||
|
||||
Running this script will create or update the hourly, daily, weekly and monthly reports under `output/`.
|
||||
Running this script will create or update the hourly, daily, weekly and monthly reports under `output/`. It also detects all unique domains found in the database and writes per-domain reports to `output/<domain>/<interval>` alongside the aggregate data.
|
||||
|
||||
## Serving Reports with Nginx
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue