Run a Program as an Alert Action Example | Teradata Viewpoint - Example: Running a Program as an Alert Action - Teradata Viewpoint - Teradata Workload Management

Teradata® Viewpoint User Guide

Product
Teradata Viewpoint
Teradata Workload Management
Release Number
17.10
Published
February 2022
Language
English (United States)
Last Update
2022-06-28
dita:mapPath
lks1628075605455.ditamap
dita:ditavalPath
tky1501004671670.ditaval
dita:id
B035-2206
lifecycle
previous
Product Category
Analytical Ecosystem
Suppose you want to use the batch file echoUsage.bat as an alert action for the Teradata system PROD1, weekends only, and track alerts in the Alert Viewer portlet. The batch file echoUsage.bat opens the program that monitors the performance of your system. The program output includes information about the space usage on PROD1 if the current perm space that is used in any database on the PROD1 system exceeds 80%.
  1. Verify the Teradata Notification Service is running on the Windows server.
    1. At the Windows command prompt, type services.msc.
    2. Make sure the status for the Teradata Notification Service is started in the list of services.
    3. If the service is stopped, right-click the service name and select Start.
  2. Copy the batch file echoUsage.bat to the Windows server at InstallFolder\Teradata\Client\16.20\Teradata Notification Service\usrcmd.
  3. In the Alert Setup portlet, create an action set.
    1. From the Setup Options list, select Alert Presets.
    2. From the Preset Options list, select Core Hours.
    3. Verify the Weekend Hours displayed in the box correspond to the weekend hours that you want for this alert action.
    4. From the Preset Options list, select Action Sets.
    5. Select "" next to Action Sets.
    6. In Action Set Name, type echoUsageReport.
    7. From the Times check boxes, select the Weekend check box, and clear the Core and Evening check boxes.
    8. Under Actions, make sure the Include in Alert Viewer check box is selected.
      This option is selected by default so you can view alerts for this action set in the Alert Viewer portlet.
    9. From the Actions list, select Run a program.
    10. From the Location list, select your Windows server.
    11. From the Program list, select echoUsage.bat.
      If the program or script does not appear in the list, verify it exists at InstallFolder\Teradata\Client\16.20\Teradata Notification Service\usrcmd\echoUsage.bat.
    12. Leave the Arguments box blank.
    13. Click Apply.
  4. In the Monitored Systems portlet for Teradata Viewpoint monitoring, configure PROD1.
    1. Next to Systems, select "", then select Add Teradata System.
    2. In System Nickname, type Prod1.
    3. Select the Enable system check box to activate the PROD1 system for monitoring.
    4. In the TDPID box, type the TDPID of the PROD1 system.
    5. Enter a login name and password.
    6. Click Apply.
  5. In the Monitored Systems portlet, configure the data collectors.
    1. From the Systems list, select PROD1.
    2. From the Setup list, select Data Collectors.
    3. From the Data Collectors list, select Database Space.
    4. Select the Enable Database Space Collector check box and keep the default settings.
    5. Click Apply.
  6. In the Monitored Systems portlet, define alert rules.
    1. From the Systems list, select PROD1.
    2. From the Setup list, select Alerts.
    3. From the Alert Types list, select Database Space.
    4. Select "" next to ALERTS.
    5. Enter the Alert Name echoUsageReportAlert.
    6. Select the Enable alert check box.
    7. In the Severity list, select Medium.
    8. From the Threshold list, select Current Perm.
    9. In the box to the right of the greater-than symbol (>), type 80.
    10. In the Action list, select echoUsageReport.
    11. Leave the value unchanged in the Do not run twice in ... minutes box.
    12. [Optional] Enter a Message.
    13. Click Apply.
  7. In the Alert Viewer portlet, review triggered actions.
    1. [Optional] Select Medium to filter the alerts in the portlet by normal severity.
    2. [Optional] In the SYSTEM NAME filter box, type PROD1 to view alerts for the PROD1 system.
    The alert or alert detail information the Alert Viewer portlet displays does not include the output of the program or batch file.