Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvisacker/grafana-pool-monitor
https://github.com/dvisacker/grafana-pool-monitor
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/dvisacker/grafana-pool-monitor
- Owner: Dvisacker
- Created: 2024-12-29T07:33:52.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2024-12-29T10:19:52.000Z (about 1 month ago)
- Last Synced: 2024-12-29T11:22:14.830Z (about 1 month ago)
- Language: TypeScript
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pool Monitor
A service that monitors Uniswap/Curve pool reserves and displays historical data in Grafana dashboards.
Useful for monitoring pool health and depegs.
## Prerequisites
- Node.js (v16 or higher)
- TimescaleDB
- Grafana
- Ethereum RPC endpoint
- Docker## Setup
1. Install dependencies:
```bash
npm install
```2. Set up environment variables:
```bash
cp .env.example .env
# Edit .env with your configuration
```3. Set up TimescaleDB:
```bash
# Create the database
createdb pool_monitor# Enable TimescaleDB extension (in psql)
psql -d pool_monitor -c "CREATE EXTENSION IF NOT EXISTS timescaledb;"
```4. Run migrations:
```bash
npm run migrate
```5. Start the service:
```bash
npm run start
```## Architecture
- Viem (with wagmi typings) for blockchain interactions
- TimescaleDB for time-series data storage
- Grafana for visualization## Configuration
Configure the following environment variables:
- `RPC_URL`: Ethereum RPC endpoint
- `POOL_ADDRESS`: Address of the pool to monitor
- `DB_CONNECTION`: TimescaleDB connection string
- `POLLING_INTERVAL`: How often to fetch pool data (in milliseconds)