monero-balance/README.md
Kumi 87705d5f51
feat: Implement Monero wallet Prometheus exporter
Introduced a Prometheus exporter for Monero wallets, capable of reporting wallet balance metrics. The implementation includes:

- A Python script `balance.py` for fetching and exposing the wallet balance both as a Prometheus metric and a JSON endpoint.
- Dependencies required for running the exporter specified in `requirements.txt`.
- A basic `.gitignore` to prevent committing unnecessary files.
- A `README.md` file detailing usage and setup instructions.

This exporter simplifies monitoring Monero wallet balances by integrating with Prometheus, providing users with real-time insights into their wallet's status. It automates the process of starting a `monero-wallet-rpc` process if needed, making it more convenient for users to set up in various environments. By running this in a Prometheus monitored environment, users can track wallet balances over time, set up alerts, and integrate with Grafana for visualization purposes.

This feature enhances the operability and observability of Monero wallets within a Prometheus ecosystem, catering to the needs of Monero wallet owners who require continuous monitoring and reporting of their crypto assets.
2024-05-25 22:21:05 +02:00

973 B

Monero Balance Exporter

This is a simple Prometheus exporter for Monero wallets. It uses the monero-wallet-rpc to get the balance of a wallet and exports it as a Prometheus metric.

Usage

MONERO_WALLET_PATH=/path/to/your/wallet MONERO_WALLET_PASSWORD="YourWalletPassword!" python balance.py

This will start the exporter on port 5000. You can change the port by setting the PORT environment variable.

The script handles starting a monero-wallet-rpc process and connecting to it, so ensure that the MONERO_RPC_PORT is set if the default of 18083 is already in use, or set MONERO_SKIP_RPC to any value to skip starting the monero-wallet-rpc process and connect to an existing one.

Metrics

The exporter only exposes one metric:

  • monero_wallet_balance - The balance of the wallet in XMR.

The metrics are exposed on the /metrics endpoint.

JSON

The exporter also exposes the balance as a JSON object on the /balance endpoint.