SChernykh / p2pool

Decentralized pool for Monero mining
GNU General Public License v3.0
1.03k stars 124 forks source link

Add webhook for specific events #197

Closed Titaniumtown closed 1 year ago

Titaniumtown commented 1 year ago

It would be cool if a feature to push to webhooks when shares or blocks are discovered, this would be cool to monitor a p2pool node's status on another platform such as discord

SChernykh commented 1 year ago

You don't need p2pool support to implement it. Parse the p2pool.log file with a script in your favorite scripting language and do whatever you want when you see "SHARE FOUND" or "BLOCK FOUND" message. I want to stick to https://en.wikipedia.org/wiki/Unix_philosophy with P2Pool.

SChernykh commented 1 year ago

There's also --data-api path/to/folder command line parameter that enables saving some p2pool status into json files in specified folder.

jameswillhoite commented 1 year ago

This is something I've worked on, I've got it working for Linux Computers, but haven't had a chance to test and modify for windows computers. You can take a look at https://github.com/jameswillhoite/p2pool.git on branch "share_found". I have hooks which you can run on share found, and on block found. I want to eventually get it merged into p2pool master, but just don't have the time to modify for windows computers right now.