Skip to content

A server used to connect OpenCanary notifications to Discord Webhooks

License

Notifications You must be signed in to change notification settings

masoncfrancis/opencanary-discord-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A server used to connect OpenCanary notifications to Discord Webhooks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages