Example: Adding Alert Properties as Arguments to Run a Program

Teradata® Viewpoint User Guide

brand
Analytical Ecosystem
prodname
Teradata Viewpoint
Teradata Workload Management
vrm_release
16.20
category
User Guide
featnum
B035-2206-107K
Suppose you want to use the script echoUsage.sh as a medium severity alert action for the Teradata Database system PROD1, weekends only, and track alerts in the Alert Viewer portlet. echoUsage.sh opens the program that monitors the performance of your system. The script reads in any arguments that appear on the command-line and runs the program using these arguments as run-time parameters. 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 Linux server:
    1. Use the following Linux command to validate that the service is running correctly: /etc/init.d/tdnotification status
    2. If the result is not "running," use: /etc/init.d/tdnotification start
  2. Copy the script echoUsage.sh to the Linux server at : /opt/teradata/client/cam/tdnotification/usrcmd/echoUsage.sh.
    1. Make sure the script echoUsage.sh is executable by the tdnotification service user account.
  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 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 echoUsageSpaceUsedPct.
    7. From the Times check boxes, select Weekend, 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 Linux server.
    11. From the Program list, select echoUsage.sh. If the script does not appear in the list, verify that it exists at /opt/teradata/client/cam/tdnotification/usrcmd/echoUsage.sh.
    12. In the Arguments box, type -db ${databaseName} -sp ${spaceUsedPct}.
    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. In Alert Name, type echoPermSpaceLow.
    6. Select the Enable alert check box.
    7. From the Severity list, select Medium.
    8. From the Alert Rules list, select Current Perm.
    9. In the box to the right of the greater-than symbol (>), type 80.
    10. Click and select the All databases except the selected databases below option and include all databases.
    11. From the Action list, select echoUsageSpaceUsedPct.
    12. Leave the value unchanged in the Do not run twice in minutes box.
    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.