Set Up Alert Conditions for Scripts in a Package

Set Up Alert Conditions for Scripts in a Package

You can set an alert condition, called a notification, to any script result in a package, which can then be used to generate an alert when the automation package is used in a scheduled task. Notifications are useful when you want to set up individual alerts for scripts in a package, as opposed to an alert for the package as a whole.

To set up alert notifications on a script in a package, you specify the script result that triggers an alert, and you can provide the message that appears in the body of any alert emails generated, for example, "Succeeded". An alert email from a scheduled task can include many of these messages in a single email, and you can set up multiple alert conditions for each script.

You should know the return code, standard output, or standard error on which you want to alert before setting up the notification in Service Center.

  1. In Service Center, clickย Automationย >ย Library.

  2. To access the script package you want to modify, do one of the following:

    • In theย Nameย column, begin typing the name of the script package.

    • Click the triangle beside theย Categoryย in which the script package resides.
      Script packages are indicated with a package iconย .

  3. Click the name of the script package.

  4. In theย Packageย Contentย area, click the name of the script for which you want to set a notification condition.

  5. In theย Notificationsย area, clickย Add.

  6. From theย Conditionย list, select the type of condition.

  7. In theย Valueย box, type the text of the return code, standard error, or standard output that you selected in the previous step.

  8. In theย Scriptย Notificationย Messageย area, type the message that will appear in the body of any alert emails.

  9. Click Save.

When scheduling the package as a task, this alert notification appears as "Package Notification Flag Set" when setting up an alert rule. See To add an alert if the script fails to be executed or returns output that is not considered a successful execution in Creating Automation Policies.

ย 


We value your feedback.
If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
For general product inquiries or technical support, please contact the global Barracuda Support team.