Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 889 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 889 Bytes

OpenCanary Discord Connector

A simple Flask server that accepts a message from OpenCanary, formats the data into a table, and sends it to a Discord webhook.

The requirements.txt file is set up for it to be run via gunicorn, but you can use whatever server you want.

Configuration

OpenCanary Config

Your OpenCanary config file must contain this JSON key-value pair under the "handlers" key:

"Webhook": {
    "class": "opencanary.logger.WebhookHandler",
    "url": "url-to-this-connector"
    "method": "POST",
    "headers": {
                    "Content-Type": "application/json"
               }
    "data": {
                "content": "%(message)s"
            },
    "status_code": 200
}

Environment Variables

You must set an environment variable DISCORD_WEBHOOK_URL as your Discord webhook url.