Git Product home page Git Product logo

0g-monitor's Introduction

0G Monitoring Service

This is to monitor all 0G services, including blockchain fullnodes, storage nodes and some other infrastructures.

  • Blockchain
    • Fullnode RPC availability via eth_blockNumber.
    • Whether block height fall behind, e.g. 30 blocks behind the highest block height.
    • Whether blockchain height stops growing.

Configuration

There are two files to configure monitoring parameters:

  • config.yaml: change any default configurations and uncomment out.
  • .env: recommended, overwrite configurations via environment variables prefixed with ZG_MONITOR, for example:
# Log Configurations
export ZG_MONITOR_LOG_ALERTHOOK_CHANNELS="dingtalk,telegram"


# Alert Configurations
export ZG_MONITOR_ALERT_CUSTOMTAGS="testnet"
export ZG_MONITOR_ALERT_CHANNELS_DINGTALK_PLATFORM="dingtalk"
export ZG_MONITOR_ALERT_CHANNELS_DINGTALK_WEBHOOK="${dingtalk_webhook_url}"
export ZG_MONITOR_ALERT_CHANNELS_DINGTALK_SECRET="${dingtalk_secret}"
export ZG_MONITOR_ALERT_CHANNELS_TELEGRAM_PLATFORM="telegram"
export ZG_MONITOR_ALERT_CHANNELS_TELEGRAM_APITOKEN="${telegram_api_token}"
export ZG_MONITOR_ALERT_CHANNELS_TELEGRAM_CHATID="${telegram_chat_id}"

# Blockchain Monitoring Configurations
export ZG_MONITOR_BLOCKCHAIN_NODES_NODE0="http://ip0:8545"
export ZG_MONITOR_BLOCKCHAIN_NODES_NODE1="http://ip1:8545"
export ZG_MONITOR_BLOCKCHAIN_NODES_NODE2="http://ip2:8545"

export ZG_MONITOR_BLOCKCHAIN_VALIDATORS_VAL0="kavavalcons17metfygkc7aezdrx6aucnpsh7ggh4lrhrawj66"
export ZG_MONITOR_BLOCKCHAIN_VALIDATORS_VAL1="kavavalcons17metfygkc7aezdrx6aucnpsh7ggh4lrhrawj67"
export ZG_MONITOR_BLOCKCHAIN_VALIDATORS_VAL2="kavavalcons17metfygkc7aezdrx6aucnpsh7ggh4lrhrawj68"

Run

Before monitoring service launched, do not forget to load the .env file if any.

# Load configurations on prod machine.
source .env

# Start monitoring service.
./0g-monitor

Utilities

There are some helpful scripts as following:

0g-monitor's People

Contributors

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