Giter VIP home page Giter VIP logo

masternode-health-server's Introduction

Tests codecov License: MIT

Masternode Health Server

This script is designed for collecting server & DeFiChain node information of your system and send them to the DeFiChain Masternode Health API.

For a closed look in it's functionality there's a detailled documentation.

Installation

  • Install pip3 (pip from python v3. Some operating systems just name it pip)
  • Run pip3 install masterhode-health

Upgrade to the current release

pip3 install --upgrade masternode-health

Create API key

This scripts needs a DeFiChain Masternode Health API key. Take a look at the documentation.

Usage

masternode-health --help
usage: masternode-health [-h] [--max-block-seconds MAX_BLOCK_SECONDS] [--rpcuser RPCUSER] [--rpcpassword RPCPASSWORD] [--rpchost RPCHOST] [--verbose] [--defi-path DEFI_PATH]
                         [--api-key API_KEY]

DefiChain Masternode Monitor

optional arguments:
  -h, --help            show this help message and exit
  --max-block-seconds MAX_BLOCK_SECONDS
                        Alert if node did not try to calculate hash within max-block-seconds (default: 30 seconds)
  --rpcuser RPCUSER     RPC username
  --rpcpassword RPCPASSWORD
                        RPC password
  --rpchost RPCHOST     RPC host (default: http://localhost:8554)
  --verbose             Prints stats to stdout
  --defi-path DEFI_PATH
                        Path to your .defi folder. Example: /home/defi/.defi
  --api-key API_KEY     API Key

You can manually run it with

masternode-health --rpcuser user --rpcpassword password --defi-path /home/user/.defi --verbose --api-key=xxx

############ mn server analysis ############
Load Average: 0.14
Memory Total: 126 GB
Memory Used: 3 GB
Disk Total: 933 GB
Disk Used: 53 GB
############ mn server analysis ############
############ mn node info ############
uptime: 2 days, 21:00:11
Local block height: 1131809
Local block hash: 4737d0f0633275a102142b37feb6ab6bf2ed3ab83ca58962a410ca70d6b089c7
Operator xxx: Online
Operator yyy: Online
############ mn node info ############

Add into crontab to check every 5 minutes

*/5 * * * * masternode-health --rpcuser user --rpcpassword password --defi-path /home/user/.defi --api-key=xxx

Bugs or suggestions?

Open issue or submit a pull request to https://github.com/defichain-api/masternode-health-server

License

MIT

masternode-health-server's People

Contributors

sandrich avatar

Watchers

James Cloos avatar  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.