Notification#
Discord → NNotifications
Documentation coming soon!
Custom Resource Definition#
To browse the Custom Resource Definition go to crd.eda.dev.
Notification
SPEC
NotificationSpec defines the desired state of Notification.
-
Bot to deliver the notification through. The bot determines the target Discord server.
-
Buttons attached to every message produced by this Notification. Up to 25 (5 action rows of 5). Buttons let users acknowledge alarms, drill into details via EQL/HTTP, or trigger workflows directly from the Discord message.
-
NotificationButton is a Discord message component (button) attached to every message produced by this Notification. Buttons cannot exceed Discord limits: 5 action rows of 5 buttons each.
-
Action executed when a user clicks the button. Required for any non-link style; ignored for style=link.
-
Suppress the alarm or query row that triggered the message.
-
Optional comment to attach to the suppression. Go template, evaluated against the click context (user, message).
-
Disable the button after a successful suppress.
default: true -
How long to suppress the alarm for, e.g. "30m", "4h", "24h". If empty, the alarm is suppressed indefinitely (until manually un-suppressed).
-
-
Render the button as disabled.
-
Optional emoji shown next to the label. Either a unicode emoji (e.g. "✅") or a Discord custom emoji in the form 'name:id'.
-
Display label shown on the button. Discord limits this to 80 characters.
-
Visual style of the button. 'link' opens .url in the browser and produces no interaction; the other styles call back into the bot with the configured action.
enum: "primary", "secondary", "success", +2 more -
Target URL for style=link. Mutually exclusive with .action.
-
-
-
Channel IDs to deliver the notification to. The server is implied by .spec.botRef (one bot is bound to one server). Each channel ID must be in the bot's .spec.allowedChannels. If empty, the bot uses its first allowed channel.
-
A user provided description of this Notification.
-
Enable or disable this Notification.
default: true -
Trigger source: alarms and/or query.
-
Listen to EDA alarms.
-
A list of alarm types to exclude. If a source matches both include and exclude, it will be excluded. For example: 'InterfaceMemberDown'.
-
A list of alarm types to listen to, matching the 'type' field within alarms. Use the '*' wildcard to include all alarms. For example: 'InterfaceDown'.
-
A list of namespaces to listen to. If empty, the notification will listen to all namespaces.
-
-
Run a query and notify on each row of its results.
-
Color of notifications generated from this query. Web color names such as 'red', 'green', 'blue', 'yellow', 'purple', 'gray' are accepted; rendered as the embed accent in Discord.
-
Fields to include in the query results, available to the template, e.g. '.node.name' or '.node.srl.interface.name'.
-
The table to use for the query, e.g. '.namespace.node.srl.interface'.
-
Go template applied to each result row when sending notifications, e.g. 'Interface {{ index . "interface.name" }} is down on node {{ index . "node.name" }}'.
-
Title used when presenting results for this query, e.g. 'InterfaceDown'.
-
A where clause for the query, e.g. 'oper-state = down'. Enclosing parentheses may be omitted.
-
-
STATUS
NotificationStatus defines the observed state of Notification.