Example: Running a Program as an Alert Action - Teradata Viewpoint

Teradata Viewpoint User Guide

Product
Teradata Viewpoint
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
hkd1478709580913.ditamap
dita:ditavalPath
2206_User_vp_1610.ditaval.ditaval
dita:id
B035-2206
lifecycle
previous
Product Category
Analytical Ecosystem
Suppose that you want to use the batch file echoUsage.bat as an alert action for the Teradata Database 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 that the Teradata Notification Service is running on the Windows server.
    1. At the Windows command prompt, type services.msc.
    2. Check that 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.10\Teradata Notification Service\usrcmd.
  3. In the Alert Setup portlet, create an action set.
    1. From the Setup Options list, click Alert Presets.
    2. From the Preset Options list, click Core Hours.
    3. Verify that 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, click Action Sets.
    5. Click 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, ensure 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 that it exists at InstallFolder\Teradata\Client\16.10\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. Click next to Systems and 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, click PROD1.
    2. From the Setup list, click Data Collectors.
    3. From the Data Collectors list, click 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, click PROD1.
    2. From the Setup list, click Alerts.
    3. From the Alert Types list, click Database Space.
    4. Click 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] Click 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 that the Alert Viewer portlet displays does not include the output of the program or batch file.