Enable BTEQ Script to Run as Alert Action Example | Teradata Viewpoint - 16.20 - 16.50 - Example: Enabling a BTEQ Script to Run as an Alert Action - Teradata Viewpoint - Teradata Workload Management

Teradata® Viewpoint User Guide

Product
Teradata Viewpoint
Teradata Workload Management
Release Number
16.20
16.50
Release Date
July 2021
Content Type
User Guide
Publication ID
B035-2206-071K
Language
English (United States)
In this example, run a BTEQ script as an alert action for Teradata system TEST1, weeknights only, and track alerts in the Alert Viewer portlet. The BTEQ script, cpuUsageReport.txt contains the following macro that returns a problem analysis of daily workloads: EXECUTE ResPmaTotal;.
  1. Copy the BTEQ script cpuUsageReport.txt to the Windows server at: InstallFolder\Teradata\Client\16.20\Teradata Notification Service\sql.
  2. Verify 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.
  3. In the Alert Setup portlet, configure delivery settings.
    1. From the Setup Options list, select Delivery Settings.
    2. From the Authentication list, select Teradata Login.
    3. Select "" next to Teradata Login.
    4. In the TDPID box, type the TDPID of the TEST1 system.
    5. Select the Enable login check box.
    6. Enter a login name and password.
    7. [Optional] From the Test Teradata Logon list, select BTEQ (Windows).
    8. [Optional] Click Test to verify that the login settings are correct.
    9. Click Apply.
  4. 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.
      Verify the Evening Hours displayed in the box correspond to the weeknight hours for this alert action.
    3. From the Preset Options list, select Action Sets.
    4. Select "" next to Action Sets.
    5. In Action Set Name, type cpuUsageReport.
    6. From the Times check boxes, select the Evening check box, and clear both Core and Weekend check boxes.
    7. 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.
    8. From the Actions list, select the BTEQ check box.
    9. From the Location list, select your Windows server.
    10. From the Script list, select cpuUsageReport.txt.
      If the script does not appear in the list, verify that the script cpuUsageReport.txt exists at: InstallFolder\Teradata\Client\16.20\Teradata Notification Service\sql.
    11. From the TDPID list, select TEST1.
    12. Click Apply.
  5. In the Monitored Systems portlet for Teradata Viewpoint monitoring, configure TEST1.
    1. Next to Systems, select "", then select Add Teradata System.
    2. In System Nickname, type TEST1.
    3. Select the Enable system check box to activate the TEST1 system for monitoring.
    4. In the TDPID box, type the TDPID of the TEST1 system.
    5. Enter a login name and password.
    6. Click Apply.
  6. In the Monitored Systems portlet, configure the data collectors.
    1. From the Systems list, click TEST1.
    2. From the Setup list, select Data Collectors.
    3. From the Data Collectors list, click Resource Usage, select the Enable Stats Manager Collector check box, and click Apply.
    4. From the Data Collectors list, click System Stats, click the Enable Stats Manager Collector check box, and click Apply.
  7. In the Monitored Systems portlet, define alert rules.
    1. From the Systems list, select TEST1.
    2. From the Setup list, select Alerts.
    3. From the Alert Types list, click System.
    4. Click "" next to Alerts.
    5. In Alert Name, type cpuUsageReportAlert.
    6. Select the Enabled alert check box.
    7. In the Severity list, select High.
    8. From the Alert Rules list, select Any.
    9. From the lists, select Node CPU Usage and is greater than.
    10. In the box to the right of the greater-than symbol (>), type 80.
    11. From the Alert Action list, select cpuUsageReport.
    12. Click Apply.
  8. In the Alert Viewer portlet, review triggered actions.
    1. Select High to filter the alerts in the portlet by high severity.
    2. In the SYSTEM NAME filter box, type TEST1 to view alerts for the TEST1 system.