p2pool icon indicating copy to clipboard operation
p2pool copied to clipboard

Add webhook for specific events

Open Titaniumtown opened this issue 2 years ago • 3 comments

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

Titaniumtown avatar Aug 08 '22 03:08 Titaniumtown

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 avatar Aug 08 '22 08:08 SChernykh

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

SChernykh avatar Aug 08 '22 08:08 SChernykh

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.

jameswillhoite avatar Aug 08 '22 12:08 jameswillhoite