https://github.com/tricked-dev/vwmetrics
Turn your Vaultwarden database into Prometheus metrics
https://github.com/tricked-dev/vwmetrics
prometheus vaultwarden vaultwarden-exporter
Last synced: 6 months ago
JSON representation
Turn your Vaultwarden database into Prometheus metrics
- Host: GitHub
- URL: https://github.com/tricked-dev/vwmetrics
- Owner: Tricked-dev
- License: apache-2.0
- Created: 2022-12-03T22:03:56.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-26T19:27:10.000Z (7 months ago)
- Last Synced: 2025-03-27T15:05:27.805Z (6 months ago)
- Topics: prometheus, vaultwarden, vaultwarden-exporter
- Language: Rust
- Homepage:
- Size: 274 KB
- Stars: 13
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VWMetrics
Turn your Vaultwarden database into Prometheus metrics.
## Usage
Build the binary from source or download the arm build from the releases page.
```
Turn your vaultwarden database into a api endpoint
github: https://github.com/Tricked-dev/vwmetrics
license: Apache-2.0Usage: vwmetrics [OPTIONS] --database-url
Options:
-d, --database-url
the database url to connect to `sqlite://db.sqlite3?mode=ro` for sqlite, `postgres://user:pass@localhost/db` for postgres or `mysql://user:pass@localhost/db` for mysql/mariadb[env: DATABASE_URL=]
-p, --port
the port to listen on[env: PORT=]
[default: 3040]-b, --host
the host to bind to[env: HOST=]
[default: 127.0.0.1]-u, --update-seconds
Time between connecting and updating the metrics[env: UPDATE_SECONDS=]
[default: 60]-h, --help
Print help information (use `-h` for a summary)-V, --version
Print version information
```The metrics endpoint gets started on `127.0.0.1:3040/metrics` by default.
### systemd
```init
# /home//.config/systemd/user/vwmetrics.service
[Unit]
Description=vwmetrics
After=network.target[Service]
ExecStart=/home//vwmetrics/vwmetrics
Environment="UPDATE_SECS=7200"
Environment="DATABASE_URL=query string"
Type=simple
Restart=always
WorkingDirectory=/home//vwmetrics[Install]
WantedBy=default.target
RequiredBy=network.target
```## Example output

[](./.github/dash.json)