Notifications
Energy SOAR Base can send audit-driven notifications through four channels: webhook,
Mattermost, email, and file append. Notifications are configured in
/etc/energysoar/application.conf.d/webhook.conf.
The notification block holds one sub-block per channel:
notification {
webhook { ... }
mattermost { ... }
emailer { ... }
appendToFile { ... }
}
Restart Energy SOAR Base after changes:
systemctl restart energysoar
Webhook
Posts a JSON payload to one or more HTTP endpoints when an audit event occurs.
notification {
webhook {
endpoints: [
{
name: "my-siem"
url: "https://siem.example.com/api/events"
version: 0
auth: {}
wsConfig: {}
includedTheHiveOrganisations: []
excludedTheHiveOrganisations: []
}
]
}
}
Field |
Description |
|---|---|
|
Friendly label for the endpoint. |
|
Target URL. Must accept HTTP POST. |
|
Payload schema version. Use |
|
Optional authentication object (bearer token or basic auth). |
|
Optional HTTP client settings (TLS, proxy). |
|
If non-empty, send notifications only for events from these organisations. |
|
Organisations to exclude from notifications. |
Mattermost
Posts a formatted message to a Mattermost incoming webhook.
notification {
mattermost {
webhook: "http://mattermost.example.com/hooks/xxxyoursecretkeyxxx"
username: "energysoar"
ws: {}
template: """
{{audit.action}} {{audit.objectType}} {{audit.objectId}}
by {{audit._createdBy}}
Organisation: {{user.organisation}}"""
}
}
Email
Sends a plain-text email through an SMTP relay.
notification {
emailer {
subject: "Notification from Energy SOAR"
from: "notification@energysoar.local"
template: """
{{audit.action}} {{audit.objectType}} {{audit.objectId}}
by {{audit._createdBy}} at {{audit._createdAt}}
Organisation: {{user.organisation}}
User: {{user.login}}"""
}
}
Configure the SMTP relay under the play.mailer key in the same file:
play.mailer {
host: "smtp.example.com"
port: 587
ssl: false
tls: true
user: "alerts@example.com"
password: "***"
}
Notification template variables
All channel templates support the following Mustache variables:
Variable |
Value |
|---|---|
|
Unique ID of the audit request. |
|
Action performed (create, update, delete). |
|
Type of the affected object (case, alert, task, observable). |
|
ID of the affected object. |
|
Login of the user who performed the action. |
|
Timestamp of the action. |
|
Type of the context object (e.g. case). |
|
ID of the context object. |
|
Organisation of the acting user. |
|
Login of the acting user. |