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%.
- Verify the Teradata Notification Service is running on the Windows server.
- At the Windows command prompt, type services.msc.
- Make sure 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.
- Copy the batch file echoUsage.bat to the Windows server at InstallFolder\Teradata\Client\16.20\Teradata Notification Service\usrcmd.
- 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 Weekend Hours displayed in the box correspond to the weekend hours that you want for this alert action.
- From the Preset Options list, select Action Sets.
- Select next to Action Sets.
- In Action Set Name, type echoUsageReport.
- From the Times check boxes, select the Weekend check box, and clear the Core and Evening 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 Run a program.
- From the Location list, select your Windows server.
- 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.
- Leave the Arguments box blank.
- Click Apply.
- In the Monitored Systems portlet for Teradata Viewpoint monitoring, configure PROD1.
- Next to Systems, select , then select Add Teradata System.
- In System Nickname, type Prod1.
- Select the Enable system check box to activate the PROD1 system for monitoring.
- In the TDPID box, type the TDPID of the PROD1 system.
- Enter a login name and password.
- Click Apply.
- In the Monitored Systems portlet, configure the data collectors.
- From the Systems list, select PROD1.
- From the Setup list, select Data Collectors.
- From the Data Collectors list, select Database Space.
- Select the Enable Database Space Collector check box and keep the default settings.
- Click Apply.
- In the Monitored Systems portlet, define alert rules.
- From the Systems list, select PROD1.
- From the Setup list, select Alerts.
- From the Alert Types list, select Database Space.
- Select next to ALERTS.
- Enter the Alert Name echoUsageReportAlert.
- Select the Enable alert check box.
- In the Severity list, select Medium.
- From the Threshold list, select Current Perm.
- In the box to the right of the greater-than symbol (>), type 80.
- In the Action list, select echoUsageReport.
- Leave the value unchanged in the Do not run twice in ... minutes box.
- [Optional] Enter a Message.
- Click Apply.
- In the Alert Viewer portlet, review triggered actions.
- [Optional] Select Medium to filter the alerts in the portlet by normal severity.
- [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.