Giter Site home page Giter Site logo

vwmetrics's Introduction

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.0

Usage: vwmetrics [OPTIONS] --database-url <DATABASE_URL>

Options:
  -d, --database-url <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 <PORT>
          the port to listen on

          [env: PORT=]
          [default: 3040]

  -b, --host <HOST>
          the host to bind to

          [env: HOST=]
          [default: 127.0.0.1]

  -u, --update-seconds <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

# /home/<user>/.config/systemd/user/vwmetrics.service
[Unit]
Description=vwmetrics 
After=network.target

[Service]
ExecStart=/home/<user>/vwmetrics/vwmetrics
Environment="UPDATE_SECS=7200"
Environment="DATABASE_UR=query string"
Type=simple
Restart=always
WorkingDirectory=/home/<user>/vwmetrics

[Install]
WantedBy=default.target
RequiredBy=network.target

Example output

vwmetrics's People

Contributors

blackdex avatar proudmuslim-dev avatar realorangeone avatar tricked-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vwmetrics's Issues

Wrong prometheus metric type

Prometheus cannot read the result of vwmetrics because there is an error in your script which is metric type. You used "TYPE guage" instead of "TYPE gauge".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.