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;.
- Copy the BTEQ script cpuUsageReport.txt to the Windows server at: InstallFolder\Teradata\Client\16.20\Teradata Notification Service\sql.
- Verify the Teradata Notification Service is running on the Windows server.
- At the Windows command prompt, type services.msc.
- Check that the status for the Teradata Notification Service is started in the list of services.
- If the service is stopped, right-click the service name and select Start.
- In the Alert Setup portlet, configure delivery settings.
- From the Setup Options list, select Delivery Settings.
- From the Authentication list, select Teradata Login.
- Select next to Teradata Login.
- In the TDPID box, type the TDPID of the TEST1 system.
- Select the Enable login check box.
- Enter a login name and password.
- [Optional] From the Test Teradata Logon list, select BTEQ (Windows).
- [Optional] Click Test to verify that the login settings are correct.
- Click Apply.
- In the Alert Setup portlet, create an action set.
- From the Setup Options list, select Alert Presets.
- 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.
- From the Preset Options list, select Action Sets.
- Select next to Action Sets.
- In Action Set Name, type cpuUsageReport.
- From the Times check boxes, select the Evening check box, and clear both Core and Weekend check boxes.
- 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.
- From the Actions list, select the BTEQ check box.
- From the Location list, select your Windows server.
- 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.
- From the TDPID list, select TEST1.
- Click Apply.
- In the Monitored Systems portlet for Teradata Viewpoint monitoring, configure TEST1.
- Next to Systems, select , then select Add Teradata System.
- In System Nickname, type TEST1.
- Select the Enable system check box to activate the TEST1 system for monitoring.
- In the TDPID box, type the TDPID of the TEST1 system.
- Enter a login name and password.
- Click Apply.
- In the Monitored Systems portlet, configure the data collectors.
- From the Systems list, click TEST1.
- From the Setup list, select Data Collectors.
- From the Data Collectors list, click Resource Usage, select the Enable Stats Manager Collector check box, and click Apply.
- From the Data Collectors list, click System Stats, click the Enable Stats Manager Collector check box, and click Apply.
- In the Monitored Systems portlet, define alert rules.
- From the Systems list, select TEST1.
- From the Setup list, select Alerts.
- From the Alert Types list, click System.
- Click next to Alerts.
- In Alert Name, type cpuUsageReportAlert.
- Select the Enabled alert check box.
- In the Severity list, select High.
- From the Alert Rules list, select Any.
- From the lists, select Node CPU Usage and is greater than.
- In the box to the right of the greater-than symbol (>), type 80.
- From the Alert Action list, select cpuUsageReport.
- Click Apply.
- In the Alert Viewer portlet, review triggered actions.
- Select High to filter the alerts in the portlet by high severity.
- In the SYSTEM NAME filter box, type TEST1 to view alerts for the TEST1 system.