thinkst / opencanary

Modular and decentralised honeypot
http://opencanary.org
BSD 3-Clause "New" or "Revised" License
2.28k stars 357 forks source link

Webhook <class 'ValueError'> #197

Closed kris-chambers closed 2 years ago

kris-chambers commented 2 years ago

I'm trying to add a discord webhook for notifications. I used the format from the website and only changed the webhook url to the url of my discord webhook. It looks like:

}, "Webhook": { "class": "opencanary.logger.WebhookHandler", "url": "https://discordapp.com/api/webhooks.xxxxx", "method": "POST", "data": {"message": "%(message)s"}, "status_code": 200

When I run opencanaryd --start, I get the following error:

Invalid logging config <class 'ValueError'> Unable to configure handler 'Webhook'

jayjb commented 2 years ago

Hi @tr4j4n,

Did you pull opencanary from pypi (ie using pip install opencanary) or did you clone the repository and run pip install .? The reason I ask is that the repo is a few features ahead of the pypi version; the new version including webhooks is due to come out, likely, tomorrow.

kris-chambers commented 2 years ago

@jayjb

I did pip install opencanary. Do you think that's what the issue is? I would much rather have discord notifications than email. Do you think I should try the repository clone route instead? I appreciate your help!

jayjb commented 2 years ago

@tr4j4n, yip.. the Pypi version is slightly behind so it doesnt support the Webhooks just yet.. If you happy to wait, I should have it live by tomorrow 😁

jayjb commented 2 years ago

Hi @tr4j4n,

Just wanted to let you know that the pypi version is now up to date.