diagrid notification route create
Create a notification route
Description
Create a notification route.
A route selects alerts by their type and their labels, and delivers every match to the destinations it names. A route naming no type matches every type; a route with no filter matches every alert of the project.
No alert type is selectable yet: the set of types follows from which components emit alerts, which is not settled, so leave --type unset.
Filters are written as key<op>value, where <op> is one of: = the label equals the value != the label differs from the value =~ the label matches the value as a regular expression !~ the label does not match the value as a regular expression
diagrid notification route create <name> [flags]
Examples
# Deliver every alert to the ops webhook
diagrid notification route create all-alerts --destination ops-webhook
# Deliver only failed order workflows
diagrid notification route create order-failures \
--filter project=orders --filter workflow=~order-.* \
--destination ops-webhook --destination oncall-webhook
Options
-p, --project string Name of existing project
--type string Alert type this route matches; omit to match every type
--filter stringArray Label matcher as key<op>value; repeat to AND several matchers
--destination stringArray Name of a notification destination; repeat for several
-h, --help help for create
Options inherited from parent commands
--api-key string Diagrid Cloud API key
SEE ALSO
- diagrid notification route - Manage notification routes