Skip to content

Slack Notifier#

The Slack notifier sends messages to Slack channels and other communication platforms implementing the Slack Webhook API like Mattermost. Follow this tutorial by Slack on how to setup incoming webhook.

Configuration#

event:
  notifiers:
    slack:
      # enable Slack notifications
      enable: true
      channels:
        # Slack access details
        - webhook:
            file: /run/secrets/slack_webhook_with_secret
          # event filter
          events:
            - ARP_NEIGHBOR_UNKNOWN
            - IPV6_NEIGHBOR_UNKNOWN

See also: schema description

Template#

The message will be formated using the slack.json.j2 template file:

{
  "text": "[IXpect] {{name}} triggered in {{batch_count}} batches",
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "[IXpect] {{name}} triggered in {{batch_count}} batches"
      }
    },
    {% for batch in batches %}
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "- *Frequency*: {{batch.size}}  *Time:* {{batch.timestamp}} *ID:* {{batch.id}} *Data:* {{batch.data}}"
      }
    }{% if not loop.last %},{% endif %}
    {% endfor %}
  ]
}