GithubHelp home page GithubHelp logo

haxzie-xx / ethos-rig-watchdog Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 16 KB

Python script to report rig condition through pushover

License: GNU General Public License v3.0

Python 100.00%
python ethos ethosdistro watchdog

ethos-rig-watchdog's Introduction

EthOS Monitor and Ailment Reporter

Python script to watch for changes in ethOS rig condition and send pushover notification if an error occurs.

Clone the repository to your local machine or server

$ git clone https://github.com/haxzie/ethos-monitor-rig-watcher.git

Make sure you have python3 installed then from the project folder install the requirements

$ pip install -r requirements.txt

Update the data/settings.json with your ethOS dashboard URL and Pushover credentials. You signup for Pushover for a free 7 days trail.

data/settings.json

{
    "ETHOS_DASH_URL" : "http://YOUR_ETHOS_PANEL.ethosdistro.com/",
    "ETHOS_AILMENT_URL" : "http://YOUR_ETHOS_PANEL.ethosdistro.com/?ailments=mining",
    "WAIT_INTERVAL" : 60,
    "PUSHOVER_DATA" : {
        "PUSHOVER_TOKEN" : "PUSHOVER_TOKEN",
        "PUSHOVER_USER_KEY" : "PUSHOVER_USER_KEY",
        "PUSHOVER_API_URL" : "https://api.pushover.net/1/messages.json"
    }
}

update the data/no_error_conditions.txt with each no error condition which are not considered as ailment in line by line without spaces.

data/no_error_conditions.txt

mining
just_booted
high_load

Run the script

$ python ethos.py

To run the script in background on servers, use the screen command. install screen.

$ sudo apt-get update
$ sudo apt-get install screen

Enable a terminal through screen and run the command.

$ screen
// Press enter if screen shows a message
$ python ethos.py

press ctrl+A then press D to detach the screened terminal and run it in the background.

ethos-rig-watchdog's People

Contributors

haxzie avatar

Watchers

 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.