Coder Social home page Coder Social logo

greymass / account-monitor Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 30.87 MB

A Cloudflare worker that periodically checks the balance and RAM available for a list of accounts.

License: Other

JavaScript 33.91% Makefile 13.69% TypeScript 52.40%

account-monitor's Introduction

Antelope Account Monitor Worker

This Cloudflare Worker is designed to monitor account balances and RAM usage for specified accounts on Antelope blockchain networks (such as EOS). When certain thresholds are met, the worker sends an alert to a specified Slack channel.

Features

  • Monitors multiple blockchain accounts across different Antelope chains.
  • Checks both liquid balance and RAM usage.
  • Sends alerts to a Slack channel when thresholds are crossed.

Setup

Prerequisites

  • Node.js and npm installed.
  • Cloudflare account with access to Workers.
  • Configured Slack Webhook URL.

Installation

  1. Clone the repository:

    git clone https://yourrepositoryurl.git
    cd your-repo-directory
    
  2. Install dependencies:

    npm install
    
  3. Configure your wrangler.toml file with your Cloudflare account details and settings. Ensure your Slack Webhook URL is set correctly in the [vars] section.

  4. Set up your config.json file according to your monitoring needs. Define the accounts, chains, and thresholds as required.

Deployment

  1. Log in to your Cloudflare account using Wrangler:

    wrangler login
    
  2. Publish the worker:

    wrangler publish
    

The worker is now deployed and will run according to the schedule defined in wrangler.toml.

Monitoring

The worker operates automatically according to the defined schedule. Alerts will be sent to the configured Slack channel whenever an account's balance or RAM usage crosses the set thresholds.

Configuration

Refer to the config.json file for configuring the accounts, chains, and threshold values. The structure is as follows:

{
  "accounts": [
    {
      "name": "teamgreymass",
      "chain": "EOS",
      "thresholdBalance": 10,
      "thresholdRAM": 500
    }
  ],
}

account-monitor's People

Contributors

dafuga avatar aaroncox avatar

Watchers

 avatar

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.