export empty jsons too

This commit is contained in:
2026-08-13 18:00:55 +02:00
parent 05b2ad9f8d
commit 1e866c86d9
3 changed files with 64 additions and 20 deletions
+7 -3
View File
@@ -15,8 +15,11 @@ a shared `/metrics` endpoint (no Docker, plain systemd deployment).
scrape-interval timing in the background
- **No persistent state by default**: no ZIPs, no JSON, no values are
written to disk - everything lives in process memory and is empty again
after a restart. Optionally, raw JSON datasets can be persisted to disk via
`config.persist_raw_json` (see [Configuration](#configuration-configpy))
after a restart. Optionally, the JSON extracted from every downloaded
dataset - including "_no_content_found.zip" placeholders, if they carry a
JSON payload - can be persisted to disk via `config.persist_raw_json`
(see [Configuration](#configuration-configpy)). ZIP files themselves are
never written to disk
- Fields are only updated when they are present in the current dataset - if
a field is missing, the last known value is kept
- The `health` metric cleanly distinguishes between "portal ok, but no new
@@ -52,6 +55,7 @@ All metrics carry the `vin` label; all names carry the configurable prefix
| `uptime_seconds` | Gauge | Uptime of the exporter process |
| `last_successful_scrape_timestamp_seconds` | Gauge | Last scrape with **new** data |
| `health` | Gauge (bool) | `0` initially and after a failure, `1` once new data has been received at least once |
| `http_requests_total` | Counter | Total number of HTTP requests made to the portal (login + API calls) |
**Note on enum metrics:** The state space (e.g. possible values of
`drivingMode` or `chargingStatus.currentChargeState`) is compiled
@@ -98,7 +102,7 @@ sudo systemctl status vw-eu-data-act-exporter
| `vw_account` | E-mail + password of the VW account under which **all** configured VINs are registered |
| `vins` | List of vehicle VINs to scrape |
| `scrape_interval_minutes` | Poll interval per vehicle. The portal only delivers new datasets for "continuous" data requests roughly every ~15 min anyway - a shorter interval will not yield fresher data, but will increase the login frequency against the account |
| `persist_raw_json` | `False` by default. When set to `True`, the raw JSON of every downloaded dataset is written to disk (one file per VIN per scrape) - useful while tuning the field mapping in `vw-eu-data-act-exporter.py`. Not needed for normal operation |
| `persist_raw_json` | `False` by default. When set to `True`, the JSON extracted from every downloaded dataset is written to disk (one file per VIN per scrape), including the JSON extracted from `_no_content_found.zip` placeholders when they carry one. ZIP files are never written to disk, only the extracted JSON - useful while tuning the field mapping in `vw-eu-data-act-exporter.py`. Not needed for normal operation |
| `persist_raw_json_dir` | Directory the raw JSON files are written to when `persist_raw_json` is enabled (default: `./raw_json`, relative to the working directory) |
Prerequisite in the portal (one-time, in a browser): connect vehicle ->