Subscribe to notifications¶
Receive notifications via different channels when subscribing to a topic.
To add a subscriber, follow these steps:
- Go to the
/adminpage. - Click on Subscribers.
- Click on ADD SUBSCRIBER.
- Select the USER.
- Choose your preferred notification channel from the following options:
- THEHIVE
- SLACK
- CITADEL
Make sure to configure the necessary settings for each channel in your .env file.
The weekly report and breaking news have dedicated layouts for each channel: colored attachments in Slack, formatted HTML in Citadel, and a clean HTML version for emails. Summaries regenerated manually from the interface never send notifications.
Configure your Email notifications¶
To configure Email, you need the following variables, in the .env file:
# DJANGO EMAIL Configuration
SMTP_SERVER=
EMAIL_PORT=25
EMAIL_USE_TLS=False
EMAIL_USE_SSL=False
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
EMAIL_FROM=
Follow these steps to get the required information:
- Choose your email provider (example: Gmail, Outlook...)
- Go to the email provider’s settings and generate the SMTP configuration:
- For Gmail, detailed instructions can be found in Google's SMTP documentation.
- For Outlook, you can refer to the Outlook SMTP documentation for more information.
- Follow the instructions to retrieve the SMTP server, email port, and other necessary credentials.
- Save these values in your
.envfile. SMTP_SERVEREMAIL_PORTEMAIL_USE_TLSEMAIL_USE_SSLEMAIL_HOST_USEREMAIL_HOST_PASSWORDEMAIL_FROM
Now, you can restart your instance and the parameters will be taken into account:
docker compose down
docker compose up
Configure your TheHive notifications¶
To configure TheHive, you need the following variables, in the .env file:
# THE HIVE Setup
THE_HIVE_URL=
THE_HIVE_VERIFY_SSL=False
THE_HIVE_KEY=
# Ensure the custom field referenced here is CREATED IN THEHIVE. Otherwise, Alert exports to TheHive will be impacted
THE_HIVE_CUSTOM_FIELD=watcher-id
THE_HIVE_EMAIL_SENDER=watcher@watcher.com
Follow these steps to get the required information:
- Go to your TheHive instance’s API section (typically located at
/account/api). -
Copy the API Key from this page and save it as
THE_HIVE_KEYin your.envfile. -
Also, you need to set the URL of your TheHive instance as
THE_HIVE_URLin your.envfile. -
For proper integration, Watcher uses a custom field in TheHive for its ticketing system. By default, this field is named watcher-id and should be set as
THE_HIVE_CUSTOM_FIELDin your .env file.Note: Ensure the custom field referenced here is CREATED IN THEHIVE. Otherwise, Alert exports to TheHive will be impacted¶
You can modify the name of this custom field in your .env file to match your specific TheHive instance setup.
- The second custom field is used to track the email sender and is defined as
THE_HIVE_EMAIL_SENDER. By default, this is set to watcher@watcher.com. You can update this value in your .env file as needed.
Now, you can restart your instance and the parameters will be taken into account:
docker compose down
docker compose up
Configure your Slack notifications¶
To configure Slack, you need the following variables, in the .env file:
# SLACK Setup
SLACK_API_TOKEN=
SLACK_CHANNEL=
Follow these steps to get the required information:
- Go to the Slack API page.
- Click on Create New App.
- Choose From scratch.
- Once your app is created, go to OAuth & Permissions.
- Under OAuth Scopes, ensure you add the required permission:
chat:write(This allows your app to send messages to channels).- On OAuth Tokens, click on Install App to install the app to your workspace.
- After installation, you will be provided with an OAuth Access Token. Copy this token and save it as
SLACK_API_TOKENin your.envfile. - Lastly, create the channel in Slack if you haven’t already and save its name as
SLACK_CHANNELin the.envfile.
Now, you can restart your instance and the parameters will be taken into account:
docker compose down
docker compose up
Configure your Citadel notifications¶
To configure Citadel, you need the following variables, in the .env file:
# CITADEL Setup
CITADEL_API_TOKEN=
CITADEL_ROOM_ID=
CITADEL_URL=
Follow these steps to get the required information:
- If you don't have an account, go to this link to create one: Citadel Team Documentation.
- Create a New Room.
- Retrieve the
CITADEL_ROOM_IDfrom the room's settings. Copy the room's link, then extract the ID after/#/room/and add it to your .env file. - Next, visit this link: Citadel Team Website to request your
CITADEL_API_TOKEN. This token will allow you to send automatic notifications. - For the
CITADEL_URLvariable, if you're using a public instance, the URL should be: https://join.citadel.team/. Otherwise, enter your customized instance URL.
Now, you can restart your instance and the parameters will be taken into account:
docker compose down
docker compose up