notify: Send notification to Notification Group


noc notify [--debug] [--dry-run]
    [--template=<template name>] [--var=*key*=<value>]


notify renders body and subject and sends to given notification groups

Arguments: * –debug - Print debugging message * –dry-run - Do not really send message * –notification-group=*group_name* - Send message to Notification Group.

Multiple Notification Groups may be set
  • –template=*template_name* - Render subject and body from Template. Template variables may be set via additional –var parameters
  • –var=*key*=*value* - Set template’s context variable key to value value. Used with –template parameter
  • –subject=*subject* - Set subject directly. Overrides –template option
  • –body=*body* - Set message body directly. Overrides –template option
  • –body-file=*file_name* - Read body from file file_name. Overrides –body and –template options


Send message from template t1. Set host variable to myhost and reason variable to testing

/opt/noc$ ./noc notify --notification-group=mygroup\
    --template=t1 --var=host=myhost --var=reason=testing

Send message to notification groups mygroup1 and mygroup2

/opt/noc$ ./noc notify \
    --notification-group=mygroup1 \
    --notification-group=mygroup2 \
    --subject=Test \

Send message from file

/opt/noc$ ./noc notify \
    --notification-group=mygroup \
    --subject=Test\ from\ file \

Read body from stdin

/opt/noc$ ./noc notify \
    --notification-group=mygroup \
    --subject=Test\ from\ file \