https://github.com/haxzie-xx/ethos-rig-watchdog
Python script to report rig condition through pushover
https://github.com/haxzie-xx/ethos-rig-watchdog
ethos ethosdistro python watchdog
Last synced: 2 months ago
JSON representation
Python script to report rig condition through pushover
- Host: GitHub
- URL: https://github.com/haxzie-xx/ethos-rig-watchdog
- Owner: haxzie-xx
- License: gpl-3.0
- Created: 2018-03-30T06:50:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-30T07:00:55.000Z (about 7 years ago)
- Last Synced: 2025-02-12T19:44:50.370Z (4 months ago)
- Topics: ethos, ethosdistro, python, watchdog
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://pushover.net) 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.