teradata alert

70
Teradata Alerts User Guide Release 14.01 B035-2210-102K October 2012

Upload: ecampus123

Post on 21-Jul-2016

44 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Teradata Alert

Teradata AlertsUser Guide

Release 14.01B035-2210-102K

October 2012

Page 2: Teradata Alert

The product or products described in this book are licensed products of Teradata Corporation or its affiliates.

Teradata, Active Enterprise Intelligence, Applications-Within, Aprimo, Aprimo Marketing Studio, Aster, BYNET, Claraview, DecisionCast,Gridscale, MyCommerce, Raising Intelligence, Smarter. Faster. Wins., SQL-MapReduce, Teradata Decision Experts, "Teradata Labs" logo,"Teradata Raising Intelligence" logo, Teradata ServiceConnect, Teradata Source Experts, "Teradata The Best Decision Possible" logo, TheBest Decision Possible, WebAnalyst, and Xkoto are trademarks or registered trademarks of Teradata Corporation or its affiliates in theUnited States and other countries.Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc.AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc.Apache, Apache Hadoop, Hadoop, and the yellow elephant logo are either registered trademarks or trademarks of the Apache SoftwareFoundation in the United States and/or other countries.Axeda is a registered trademark of Axeda Corporation. Axeda Agents, Axeda Applications, Axeda Policy Manager, Axeda Enterprise, AxedaAccess, Axeda Software Management, Axeda Service, Axeda ServiceLink, and Firewall-Friendly are trademarks and Maximum Results andMaximum Support are servicemarks of Axeda Corporation.Data Domain, EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation.GoldenGate is a trademark of Oracle.Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company.Hortonworks, the Hortonworks logo and other Hortonworks trademarks are trademarks of Hortonworks Inc. in the United States and othercountries.Intel, Pentium, and XEON are registered trademarks of Intel Corporation.IBM, CICS, RACF, Tivoli, and z/OS are registered trademarks of International Business Machines Corporation.Linux is a registered trademark of Linus Torvalds.LSI is a registered trademark of LSI Corporation.Microsoft, Active Directory, Windows, Windows NT, and Windows Server are registered trademarks of Microsoft Corporation in theUnited States and other countries.NetVault is a trademark or registered trademark of Quest Software, Inc. in the United States and/or other countries.Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries.Oracle, Java, and Solaris are registered trademarks of Oracle and/or its affiliates.QLogic and SANbox are trademarks or registered trademarks of QLogic Corporation.Red Hat is a trademark of Red Hat, Inc., registered in the U.S. and other countries. Used under license.SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc.SPARC is a registered trademark of SPARC International, Inc.Symantec, NetBackup, and VERITAS are trademarks or registered trademarks of Symantec Corporation or its affiliates in the United Statesand other countries.Unicode is a registered trademark of Unicode, Inc. in the United States and other countries.UNIX is a registered trademark of The Open Group in the United States and other countries.Other product and company names mentioned herein may be the trademarks of their respective owners.

The information contained in this document is provided on an "as-is" basis, without warranty of any kind, either expressor implied, including the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.Some jurisdictions do not allow the exclusion of implied warranties, so the above exclusion may not apply to you. In noevent will Teradata Corporation be liable for any indirect, direct, special, incidental, or consequential damages, includinglost profits or lost savings, even if expressly advised of the possibility of such damages.

The information contained in this document may contain references or cross-references to features, functions, products, or services that arenot announced or available in your country. Such references do not imply that Teradata Corporation intends to announce such features,functions, products, or services in your country. Please consult your local Teradata Corporation representative for those features, functions,products, or services available in your country.Information contained in this document may contain technical inaccuracies or typographical errors. Information may be changed orupdated without notice. Teradata Corporation may also make improvements or changes in the products or services described in thisinformation at any time without notice.To maintain the quality of our products and services, we would like your comments on the accuracy, clarity, organization, and value of thisdocument. Please e-mail: [email protected] comments or materials (collectively referred to as "Feedback") sent to Teradata Corporation will be deemed non-confidential. TeradataCorporation will have no obligation of any kind with respect to Feedback and will be free to use, reproduce, disclose, exhibit, display,transform, create derivative works of, and distribute the Feedback and derivative works thereof without limitation on a royalty-free basis.Further, Teradata Corporation will be free to use any ideas, concepts, know-how, or techniques contained in such Feedback for any purposewhatsoever, including developing, manufacturing, or marketing products or services incorporating Feedback.Copyright © 2011 - 2012 by Teradata Corporation. All Rights Reserved.

Page 3: Teradata Alert

Table of Contents

Preface.............................................................................................................................................................7

Changes to This Book...........................................................................................................................................7Related Documentation.......................................................................................................................................7

Chapter 1: Overview........................................................................................................................................................9

Introduction to Teradata Alerts.........................................................................................................................9Alerts Integration..........................................................................................................................................9Alert Configuration Workflow..................................................................................................................10

Chapter 2: System Administration..................................................................................................................13

Alert Setup...........................................................................................................................................................13Setting Alert Retention...............................................................................................................................13Configuring Email Settings for Alerts......................................................................................................14Adding and Editing SNMP Configurations.............................................................................................15Adding and Editing BTEQ and SQL Login Configurations..................................................................16Adding and Editing SQL Query Configurations....................................................................................17Deleting SNMP, BTEQ/SQL Login, or SQL Queries Configurations..................................................18About Core Hours.......................................................................................................................................18Setting Core Hours......................................................................................................................................19Adding and Editing Action Sets................................................................................................................19Adding and Editing Groups.......................................................................................................................22Deleting Action Sets or Groups.................................................................................................................22Configuring Alert Exceptions....................................................................................................................22Alert Properties............................................................................................................................................23Alert Configuration Examples...................................................................................................................23

Group Examples...................................................................................................................................23Customizing Email Alerts Example...................................................................................................24

Alert Property Syntax...................................................................................................................24Sample Email Message.................................................................................................................26

Overview: Customizing Email Alerts for Server Management......................................................26Example: Creating an Email Message for Critical Server Management Alerts...........................27

Teradata Alerts User Guide, Release 14.01 3

Page 4: Teradata Alert

SNMP Example......................................................................................................................................28BTEQ Example......................................................................................................................................30BTEQ Script Processing and Migrating Alerts from Teradata Manager......................................32

BTEQ Script Processing................................................................................................................32Alerts Migrated from Teradata Manager to Teradata Alerts...................................................33

SQL Queries Example...........................................................................................................................33Run a Program Example......................................................................................................................36Adding Alert Properties as Arguments to the Run a Program Example.......................................38Check Logon Timeout with Canary Query Example.......................................................................40

Sample Email Message..................................................................................................................42Teradata MSM Alert Example.............................................................................................................42

Sample Email Message..................................................................................................................44Workload Designer Alert Example.....................................................................................................44

Server Management.............................................................................................................................................47About Alerts in Server Management.........................................................................................................47Alert Properties.............................................................................................................................................47Adding Site IDs.............................................................................................................................................48Adding and Copying Alerts........................................................................................................................48Disabling Alerts............................................................................................................................................49Deleting Alerts..............................................................................................................................................50

Alerts in Teradata Systems.................................................................................................................................50Alerts..............................................................................................................................................................50

Alert Types.............................................................................................................................................51Teradata Database Alert Metrics and Properties..............................................................................52Teradata Aster Alert Metrics and Properties....................................................................................55Migrating Alerts....................................................................................................................................56Adding and Copying Alerts.................................................................................................................57Copying Alerts Between Systems........................................................................................................59Deleting Alerts.......................................................................................................................................60

About Alerts in Teradata Database...................................................................................................................60AlertRequest Table.......................................................................................................................................61MonitorRequest Table.................................................................................................................................62

Chapter 3: Alert Viewer...............................................................................................................................................65

Alert Viewer.........................................................................................................................................................65About Alerts..................................................................................................................................................65About the Alert Viewer View ....................................................................................................................65About Filters and Sorting............................................................................................................................66

Filtering by Severity..............................................................................................................................67Selecting a Time Period........................................................................................................................67

Table of Contents

4 Teradata Alerts User Guide, Release 14.01

Page 5: Teradata Alert

Filter Symbols..................................................................................................................................................67Clearing Filters.................................................................................................................................................68Configuring Columns to Display..................................................................................................................68Exporting Table Data......................................................................................................................................69

Viewing Alert Details.............................................................................................................................................69

Table of Contents

Teradata Alerts User Guide, Release 14.01 5

Page 6: Teradata Alert

Table of Contents

6 Teradata Alerts User Guide, Release 14.01

Page 7: Teradata Alert

Preface

Changes to This Book

Date and Release Description

October 2012

14.01

• Added a section about alerts in Server Management.• Added information about Teradata Aster system alert types and Teradata

Aster alert metrics and properties• Added an About the Alert Viewer View topic• Updated the Alert Configuration Examples in Chapter 2.

Related DocumentationAccess the Teradata Information Products web site to view or download additionaldocumentation related to this product.

1. Go to http://www.info.teradata.com.2. Under the Online Publications subcategory, click General Search.3. Search on the title or publication ID.

Title Publication ID

Teradata Alerts Installation and Configuration Guide

Describes how to install, configure, and upgrade Teradata Alerts software.

B035-2211

Teradata Viewpoint User Guide

Describes the Teradata Viewpoint portal, portlets, and system administrationfeatures.

B035-2206

Teradata Multi-System Manager User Guide

Describes how to use Teradata MSM portlets.

B035-3201

Teradata Alerts User Guide, Release 14.01 7

Page 8: Teradata Alert

Preface

8 Teradata Alerts User Guide, Release 14.01

Page 9: Teradata Alert

CHAPTER 1

Overview

Introduction to Teradata AlertsTeradata Alerts enables alert functionality in the Teradata Viewpoint portal. The TeradataSystem Administrator can set up alerts to invoke actions to automatically respond todatabase or system triggers.

Alerts can be configured to:• Send an email notification• Send an SNMP notification• Run a BTEQ script• Run a SQL query• Run a Windows or Linux executable program• Write to an alert log that can be viewed in the Alert Viewer portlet

Alerts Integration

Teradata Alerts enables you to configure shared alert actions that can be invoked fromdifferent sources. You can configure threshold levels and triggers to generate alerts using theTeradata Systems, Workload Designer, and MSM Setup portlets.

For example, you can:• Configure the Teradata Systems portlet to send an SNMP trap if the current perm space

used on any database in a Teradata Database system exceeds 80%.• Configure the MSM Setup portlet to run a BTEQ script when a Heartbeat event occurs

for an application server that is a component of a defined ecosystem.• Configure the Workload Designer portlet to send an email alert when the spool space

usage on a non-production Teradata Database system exceeds 500 GB.

Teradata Alerts consists of several components that are included in the Teradata Viewpointserver. Teradata Alerts can also use the Windows and Linux Notification Services to runBTEQ scripts and executable programs.

Teradata Alerts User Guide, Release 14.01 9

Page 10: Teradata Alert

Teradata Viewpoint

Server

Windows Server

Linux Server

Cache DB

Portlets:Alert Setup Alert Viewer

Notification Service

Notification Service

Messaging Service

Alert Service

Optional(Required for BTEQ and Run Program

Actions)

Optional(Required for BTEQ and Run Program

Actions)

Cache DB

A local repository instance used by the Teradata Viewpoint server. The Cache DBstores delivery settings and action set definitions used by the alert service.

Portlets

The Alert Setup portlet is used to configure alerts.The Alert Viewer portlet displays logged alerts.

Messaging Service

The Java Message Service provider (Apache ActiveMQ) that enables messageexchange between the software components.

Alert Service

The Java daemon that processes alerts.

Notification Service

The service that can execute BTEQ scripts and executable programs to activelyrespond to generated alerts. You must activate this service on a Windows or Linuxserver you provide.

Alert Configuration Workflow

The alert configuration workflow has the following phases:

Chapter 1 Overview

10 Teradata Alerts User Guide, Release 14.01

Page 11: Teradata Alert

1. Configure delivery settings and alert action sets.2. Define the triggers, conditions, and thresholds that cause alert actions to be generated.3. View generated alerts in the Alert Viewer portlet.

The alert configuration workflow has several access points:

Alert Setup

You can configure delivery settings and alert action sets in the Alert Setup portlet,from the Admin menu. You can define the hours during which alert actions run.You can define notifications in Alert Exceptions to notify you if an alert action setfails to execute properly.

Alert Triggers

After alert action sets are configured, they are available to other portlets in theTeradata Viewpoint portal. You define triggers, conditions, and threshold levels andselect corresponding alert action sets.

Teradata Alerts source Configure alert triggers in...

Teradata Viewpoint portal Teradata Systems portlet in the Admin menu

Teradata WorkloadManagement

Workload Designer portlet

Teradata Multi-SystemManager

MSM Setup portlet in the Admin menu

Teradata Database

You can integrate Teradata Database with Teradata Alerts directly by inserting rowsin the AlertRequest and MonitorRequest tables to trigger alert actions. The AlertRequest data collector forwards the row contents to the Alert Viewer portlet.

Alert Viewer

The Alert Viewer portlet displays alerts generated from many sources. The alertincludes the date, time, alert name, type, source, and system for each alert generatedif it was configured to be logged during alert setup. Additional details, including thealert property and metric that triggered the alert, can also be displayed.

Chapter 1 Overview

Teradata Alerts User Guide, Release 14.01 11

Page 12: Teradata Alert

Chapter 1 Overview

12 Teradata Alerts User Guide, Release 14.01

Page 13: Teradata Alert

CHAPTER 2

System Administration

Alert SetupThe Alert Setup portlet enables you to configure actions that are triggered when the alertservice generates an alert. You can configure delivery settings for the following actions:• Write to the alert log• Send email notifications• Send SNMP notifications• Run BTEQ scripts• Run SQL queries• Run Windows and Linux executable programs

You can also configure the following alert presets:• Core hours of operation• Action sets of multiple alert actions that run in a single operation• Groups of multiple alert action sets that run in a single operation

You can configure notifications to be logged or sent by email if an alert action set cannot beprocessed due to an error.

The settings configured in the Alert Setup portlet determine the alert action choicesavailable in the Teradata Systems portlet and the data displayed in the Alert Viewer portlet.The Teradata Systems portlet enables you to add alerts to a system and set rules to triggeralerts based on the actions defined in the Alert Setup portlet. If you have Teradata MSM,you can use Teradata MSM Setup to configure event responses to trigger alerts. If you usethe Workload Designer portlet, you can configure a ruleset to trigger an alert when anexception to the workload occurs.

Setting Alert Retention

You can set limits that define how long to retain alert log data and how much to retain.

1 Click Delivery Settings under SETUP OPTIONS.

2 Click Alert Log under DELIVERY TYPES.

3 Under Delete Alert Log Data, do any of the following:• Select After to set the retention period.

Enter an integer number in the box and select a time period from the list.• Select Over to set the file-size restriction.

Teradata Alerts User Guide, Release 14.01 13

Page 14: Teradata Alert

Enter an integer number in the box and select a file-size unit from the list.

4 Click Apply.

If you set a retention period, alert log data is deleted in weekly increments after the specifiedperiod expires. If you set a file-size restriction, alert log data is deleted in weekly incrementsafter the specified file size is exceeded, and the oldest data is deleted first.

Configuring Email Settings for Alerts

You can configure the alert service to send alert notifications by email.

Note: The Teradata Viewpoint Administrator or Teradata System Administrator mustcomplete the Email configuration under SETUP OPTIONS>Delivery Settings>DELIVERYTYPES>Email before you can create an action set that delivers an email message.

1 Click Delivery Settings under SETUP OPTIONS.

2 Click Email under DELIVERY TYPES.

3 Under SMTP Host, do the following:

a Enter the SMTP Host address of the outgoing (SMTP) email server.

b [Optional] Select Use SSL to use Secure Sockets Layer as the transmission protocol.

4 Under Port, select one of the following:

Option Action

Use default port Use the default communications port on the SMTP host for outgoingemail.

Enter port number Enter a number in the box to use as the custom port number on the SMTPhost for outgoing email.

5 In the Server Timeout box, enter the number of seconds to wait for a connection withthe SMTP host before the system times out.The default is 30 seconds.

6 Enter the email address to use as the Reply-to address in alert-email messages.

7 Under Login, select one of the following:

Option Action

Anonymous login Log on to the SMTP host anonymously.

Enter credentials Enter a Username and Password to log on to the SMTP host.

8 Leave the Advanced box blank.

Note: The alert service uses this field for diagnostic purposes. Enter information in thisfield only under the guidance of a Teradata Technical Support Specialist.

9 To verify your email delivery settings, enter a valid email address for the Test Recipientand click Test.

Chapter 2 System Administration

14 Teradata Alerts User Guide, Release 14.01

Page 15: Teradata Alert

The icon appears if the operation is successful. The icon appears if the operationfails; verify that the settings are correct, and try again.

If the operation is successful, the alert service sends an email message to the testrecipient address.

10 Click Apply.

Adding and Editing SNMP Configurations

You can configure the alert service to deliver alert notifications to third-party managementapplications using SNMP.

Note: The Teradata Viewpoint Administrator or Teradata System Administrator mustdefine an SNMP configuration under SETUP OPTIONS>Delivery Settings>DELIVERYTYPES>SNMP before you can create an action set that uses SNMP.

1 Click Delivery Settings under SETUP OPTIONS.

2 Click SNMP under DELIVERY TYPES.

3 From the SNMP list, do one of the following:• To add an SNMP configuration, click next to SNMP.• To copy an SNMP configuration, click next to the SNMP configuration you want

to copy.• To edit an SNMP configuration, click the SNMP configuration name.

4 Enter an SNMP Configuration Name.

5 [Optional] Select Default for Alert Request Collector to make this the defaultconfiguration for SNMP requests that originate from the AlertRequest andMonitorRequest tables in the dbcmngr database.

Note: When you make this configuration the default, the alert service overwrites theprevious default configuration for SNMP requests.

6 Enter the IP address or host name of the Destination for SNMP alert notifications.

7 Enter an SNMP Community name.The default is public.

You can add or remove Destination and Community pairs.

8 Configure the information to display in the SNMP trap details. Select at least one of thecheck boxes. If both options are selected, the SNMP trap details include a descriptionfollowed by the message.• Select Alert message to include the message in the SNMP Trap details. For Teradata

Systems alerts, this message is composed when defining the alert rules.• Select Alert description to display the conditions that triggered the alert in the

SNMP trap details.

9 [Optional] To test the SNMP trap:

a Select a Management Information Base (MIB) from the Test SNMP Trap list.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 15

Page 16: Teradata Alert

The following table provides information on the MIB location and OID for the alertservice and Teradata MSM.

Provider MIB Location OIDAlertService

/opt/teradata/cam/alert/

config/teradataCamMib.txt onthe Teradata Viewpoint server

iso.org.dod.internet.private.

enterprises.teradata.td-

products.tdcam

TeradataMSM

See the Teradata MSM ConfigurationGuide for more information on theMIB.

iso.org.dod.internet.private.

enterprises.teradata.td-

products.tmsm.dualActive

b Click Test to verify the SNMP configuration on the specified destination host orhosts.

The icon appears if the operation is successful. The icon appears if the operationfails; verify that the settings are correct, and try again.

If the operation is successful, the alert service sends an SNMP trap (notification) toeach specified destination. Verify that the SNMP trap is received at each destination.

10 Click Apply.

Adding and Editing BTEQ and SQL Login Configurations

You can configure the alert service to run BTEQ and SQL alert actions for Teradata Databasesystems.

Note: The Teradata Viewpoint Administrator or Teradata System Administrator must definea Login configuration under SETUP OPTIONS>Delivery Settings>DELIVERYTYPES>BTEQ/SQL Login before you can create an action set that runs a BTEQ script or aSQL action.

1 Click Delivery Settings under SETUP OPTIONS.

2 Click BTEQ/SQL Login under DELIVERY TYPES.

3 From the BTEQ/SQL Login list, do one of the following:• To add a BTEQ/SQL configuration, click next to BTEQ/SQL Login.• To copy a BTEQ/SQL configuration, click next to the BTEQ/SQL Login

configuration you want to copy.• To edit a BTEQ/SQL configuration, click the BTEQ/SQL Login configuration name.

4 Enter the TDPID of the Teradata Database you want to log on to.The scripts run against the specified TDPID.

5 Enter the login credentials to be used for BTEQ and SQL actions. Account String isoptional.Use the Password that is associated with the Username.

6 [Optional] For BTEQ, enter the information in the BTEQ Authentication Optionsfields.• Logmech Name is the name of the logon mechanism.

Chapter 2 System Administration

16 Teradata Alerts User Guide, Release 14.01

Page 17: Teradata Alert

• Logmech Data is the logon data (parameters or credentials) associated with theselected logon mechanism.

7 For SQL, under JDBC Authentication Options, select the Logmech Name from the list.Logmech data is automatically generated from the user name and password, ifnecessary.

8 Select the Session Character Set from the list.

9 [Optional] To test the Teradata logon:

a Select the logon configuration you want to test from the Test Teradata Logon list.If the host name is known, it is displayed.

b Click Test to verify that the alert service can execute the logon.The icon appears if the operation is successful. The icon appears if the operationfails; verify that the settings are correct, and try again.• If a JDBC login fails, verify that the alert service is running properly on the

Viewpoint server.• If a BTEQ login fails, verify that the Teradata Notification Service is running

properly on the Windows or Linux server where it was installed. In addition,examine the cam.properties file (Linux: /etc/opt/teradata/cam/cam.properties, Windows: C:\etc\opt\teradata\cam\cam.properties) to make sure the cam.activemq.host property is set tothe Viewpoint server's hostname.

• Also verify that tdactivemq is configured and running on the TeradataViewpoint server.

10 Click Apply.

Adding and Editing SQL Query Configurations

You can configure the alert service to run SQL Query alert actions for Teradata Databasesystems.

Note: The Teradata Viewpoint Administrator or Teradata System Administrator mustdefine a SQL Queries configuration under SETUP OPTIONS>DeliverySettings>DELIVERY TYPES>SQL Queries before you can create an action set that runs aSQL query.

1 Click Delivery Settings under SETUP OPTIONS.

2 Click SQL Queries under DELIVERY TYPES.

3 From the SQL Queries list, do one of the following:• Click next to SQL Queries to add a SQL query.• Click next to the SQL Query configuration you want to copy.• Click the SQL Query name to edit its configuration.

4 Enter a Name for the SQL configuration.

5 [Optional] Enter the name of the Default Database for the SQL query.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 17

Page 18: Teradata Alert

6 Enter the SQL query for the alert action in the SQL field.

7 Click Apply.

Deleting SNMP, BTEQ/SQL Login, or SQL Queries Configurations

You can delete an SNMP, BTEQ/SQL Login, or SQL Queries configuration if it is not used inan action set.

1 Click Delivery Settings under SETUP OPTIONS.

2 Click SNMP, BTEQ/SQL Login, or SQL Queries under DELIVERY TYPES.

3 Click under SNMP, BTEQ/SQL Login, or SQL Queries to delete a configuration.

A confirmation message appears.

4 Click OK.

The following scenarios result in an error:• You attempt to delete an SNMP, BTEQ/SQL Login, or SQL Queries configuration that is

part of a defined action set.• You attempt to delete the last BTEQ/SQL Login configuration, but BTEQ or SQL action

sets that use the Get from Alert option still remain.

About Core Hours

The alert service operates 24 hours a day, 7 days a week.

You can schedule alert actions to run during a combination of core, evening, or weekendhours as described in the following table.Hours DescriptionCORE HOURS Days and Time during the week that you define.

Define a period to include one or more consecutive days of the week.Define Time as a period that includes one or more consecutive hours or as allday (24 hours).

EVENINGHOURS

The hours opposite Core Hours for core days.

WEEKENDHOURS

The ending time of the ending core day to the beginning time of the beginningcore day.

Time Interval

If the core hours are Monday through Friday, 9:00 AM to 5:00 PM, then evening hours areMonday through Friday, 5:00 PM to 9:00 AM, and weekend hours are from Friday at 5:00PM through Monday at 9:00 AM.

All Day

If the core hours are Monday through Friday, 24 hours, then there are no evening hours,and weekend hours are Saturday through Sunday, 24 hours.

Chapter 2 System Administration

18 Teradata Alerts User Guide, Release 14.01

Page 19: Teradata Alert

Setting Core Hours

This task describes how to set core hours of operation for the alert service. When you makeselections in this view, the EVENING HOURS and WEEKEND HOURS are updated in thebox to the right.

1 Click Alert Presets under SETUP OPTIONS.

2 Click Core Hours under PRESET OPTIONS.

3 In the CORE HOURS pane, select the beginning and ending core Days from the twolists.

4 Under Time, do one of the following:• Select 24 hours to specify the entire day on core days.• Select beginning and ending times from the two lists.Confirm changes that you make to the core hour definitions in the EVENING HOURSand WEEKEND HOURS box.

5 Select the Time Zone to use for the core hours.

6 Click Apply.

Adding and Editing Action Sets

Alert actions can be combined into action sets. An action set enables you to run multiplealert actions in a single operation.

Note: You must define an email, SNMP, BTEQ, or SQL query configuration under SETUPOPTIONS>Delivery Settings>DELIVERY TYPES before you can create action sets thatspecify email, SNMP, BTEQ, or SQL queries.

1 Click Alert Presets under SETUP OPTIONS.

2 Click Action Sets under PRESET OPTIONS.

3 From the ACTION SETS list, do one of the following:• Click to add an action set.• Click in the row of the action set you want to copy.• Click the name of the action set you want to edit.

4 Enter an Action Set Name.

5 Select check boxes under Times to run the action set at the hours defined underPRESET OPTIONS.

6 Select the check box under Actions for any of the following:

Action Description

Include inalert log

Logs the alert details so the alert can be viewed using the Alert Viewer portlet.

Send toperson

Designates the recipient of an email alert as one of the following:

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 19

Page 20: Teradata Alert

Action Description

• Viewpoint user• Viewpoint role• Email addressSeparate multiple recipients with semicolons and by using any combination ofuser, role, or email address.

Select the TO radio button to make all recipients visible in the email notification.Select the BCC option if you want the recipients to be hidden.

For example, to send an alert to Viewpoint users Francine and Eugene, typeFrancine; Eugene in the User box. To send an alert to Viewpoint usersFrancine and Eugene, Viewpoint roles dba and admin, and email [email protected], type Francine; Eugene in the User box, dba; adminin the Role box, and [email protected] in the Email box.

The Send to person action is available if you configured the DeliverySettings>DELIVERY TYPES>Email.

SNMP Lists the SNMP configurations that are defined under DELIVERY TYPES.

Select an SNMP configuration from the list.

The SNMP action is available if you configured the Delivery Settings>DELIVERYTYPES>SNMP.

SQL Lists the SQL queries defined under DELIVERY TYPES.

a. Select the Query from the list.b. Do one of the following:

• Select Get from alert to specify the Teradata Database that generated thealert.

This option runs the selected SQL query against the Teradata Database thattriggered the alert if the TDPID is defined in the Alert Setup and TeradataSystems portlets.

• Select the TDPID of the Teradata Database that you want to log on to. TheSQL query runs on this system, regardless of the system that triggered thealert.

The SQL action is available if you configured a SQL Query and a BTEQ/SQL login.

BTEQ Lists the BTEQ scripts that are located on the Windows or Linux system that ishosting the Teradata Notification Service.

a. Select the Location to indicate the Windows or Linux Server on which thescript is run.

b. Select the BTEQ Script.c. Do one of the following:

• Select Get from alert to specify the Teradata Database that generated thealert.

This option enables you to run one BTEQ script against multiple TDPIDs,if the TDPID is defined in the Alert Setup and Teradata Systems portlets.

Chapter 2 System Administration

20 Teradata Alerts User Guide, Release 14.01

Page 21: Teradata Alert

Action Description

The system dynamically determines which TDPID to select based on theTeradata Database system or TDPID that triggered the alert action set.

Suppose that you created two BTEQ configurations (PROD1 and PROD2)in the Alert Setup portlet. If you select Get from alert and PROD1 triggersthe alert action, the Teradata Notification Service logs on to PROD1 andruns the BTEQ script on PROD1. Similarly, if PROD2 triggers the alertaction, the service logs on to PROD2 and runs the script.

By contrast, suppose that STAGE1 triggers the alert action, but STAGE1 isnot defined in the BTEQ configurations in the Alert Setup portlet. In thiscase, logon information for STAGE1 is not available. The service writes thefailed logon attempt to /var/opt/teradata/cam/alert/logs/alertservice.log on the Viewpoint server.

• Select the TDPID of the Teradata Database that you want to log on to. TheBTEQ script runs on this system, regardless of the system that triggered thealert.

The BTEQ action is available if these conditions are met:• The BTEQ delivery settings are configured in the Alert Setup portlet under

SETUP OPTIONS>Delivery Settings>DELIVERY TYPES>BTEQ/SQLLogin.

• The Teradata Notification Service must be installed and running on theWindows or Linux server.

• The BTEQ script is located on the Windows server at: <InstallFolder>\Teradata\Client\14.00\Teradata Notification Service\sql. It is located on the Linux server at: /opt/teradata/client/cam/tdnotification/sql.

Run aprogram

Lists the programs and batch files located on the Windows and Linux servers thatrun the Teradata Notification Service.

a. From the Location list, select the location where the program is located.b. From the Program list, select the program or batch file to run.c. Enter any command-line arguments you want to pass as part of the alert.

For example, if the batch file on the Windows server is currentSpace.bat andthe batch file takes arguments -db for the name of the database and -sp for thepercentage of space used, you can type -db TEST1 -sp 90 in the Arguments box.This specifies that the batch file runs with TEST1 as the database name, and 90 asthe percentage of space used.

Run a program is available if the following conditions are met:• The Teradata Notification Service is installed and running on the Windows or

Linux server.

• The program or batch file is located on the Windows server at:<InstallFolder>\Teradata\Client\14.00\TeradataNotification Service\usrcmd. It is located on the Linux server at: /opt/teradata/client/cam/tdnotification/usrcmd.

7 Click Apply.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 21

Page 22: Teradata Alert

Adding and Editing Groups

Alert actions can be combined into action sets and action sets can be combined into groupsin the alert service. A group enables you to run multiple action sets in a single operation. Youmust define action sets before you can include them in a group.

1 Click Alert Presets under SETUP OPTIONS.

2 Click Groups under PRESET OPTIONS.

3 From the GROUPS list, do one of the following:• Click next to GROUPS to add a group.• Click next to the group you want to copy.• Click the group name to edit the group.

4 Enter a Group Name.

5 From the list under Include the Following Action Sets, select the action set to include.You can add or remove action sets.

6 Click Apply.

Deleting Action Sets or Groups

If you delete a group in the alert service, the group configuration is lost, but the action setscombined in the group remain. You cannot delete an action set if it is used in a group or analert rule. You cannot delete a group if it is used in an alert rule.

1 Click Alert Presets under SETUP OPTIONS.

2 Click Action Sets or Groups under PRESET OPTIONS.

3 Click to delete a configuration under ACTION SETS or GROUPS.

A confirmation message appears.

4 Click OK.

Configuring Alert Exceptions

You can designate that an email notification be sent or an alert logged if an alert action fails.For example, you could designate that the Viewpoint Administrator be notified by email if aparticular BTEQ script does not run because it was deleted from the server. Or you mightwant an alert to be logged in the Alert Viewer portlet if an email alert is not deliveredbecause the Viewpoint user specified in the email action was deleted.

1 Click Alert Exceptions under SETUP OPTIONS.

2 To prevent an alert from being sent more than once in a certain time frame, enter thenumber of minutes in the Repeat section. Zero is the default value and is a valid entry,indicating that there is no alert inactivity period.

3 For the alert action types for which you want to generate alert exceptions:• Select the Severity level associated with the alert type.

Chapter 2 System Administration

22 Teradata Alerts User Guide, Release 14.01

Page 23: Teradata Alert

• [Optional] Select the Send Email check box to configure an email message to be sent.• [Optional] Select the Log check box if you want the alert to be displayed in the Alert

Viewer portlet.Choose the General category for any alert exceptions that do not fall into the other alerttypes listed below it.

4 [Optional] Enter one or more email addresses to which an email message is sent if analert exception occurs. Separate multiple addresses with semicolons.You may enter email addresses even if you have not selected any Send Email checkboxes in the previous step. However emails are only generated when Send Email isenabled.

Alert Properties

The following table lists the available properties for all alert types, regardless of the alertsource. The associated property names enable you to customize alert actions in the AlertSetup portlet.

Property Name

Alert Type alertType

Alert Name alertName

Source source

Timestamp timestamp

Severity severity

System systemName

Alert Configuration Examples

This section presents step-by-step examples of how you would configure various types ofalerts.

The process for setting up alerts is specific to the products and versions that are installed inyour environment and the permissions for your role. The details in these examples may notapply to your particular system.

Group Examples

The following examples explore how to combine action sets into groups to manage alertactions for specific use cases.

Different Alert Actions for Weekday and Weekend Hours

To designate a set of different alert actions to be performed for an event depending on thetime period, define time-specific action sets and assign them to a group.

Suppose you want the alert to provide SNMP notification and send an email messageunder the following conditions:• An SNMP trap when a space-usage threshold is exceeded on a weekday

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 23

Page 24: Teradata Alert

• An SNMP trap and an email message sent to the Teradata Database Administratorwhen the threshold is exceeded on a weekend

To do this, define two action sets:• One SNMP notification action for core, evening, and weekend hours• One email notification action for weekend hours only

Create a group and assign both action sets to the group. In the Teradata Viewpointadministrative portlet where you want to define the alert, assign the group as the alertaction.

Managing Email Alert Recipients

Groups and action sets can be used to manage alert recipients, similar to emaildistribution lists.

Define action sets that send email notifications to different sets of people in yourorganization:• Define one action set to send an email notification to the Teradata Database

Administrator• Define another action set to send an email notification to end users in the finance

department

Create a group and assign both action sets to the group. In the Teradata Viewpointadministrative portlet where you want to define the alert, assign the group as the alertaction. When an alert is issued, both sets of users receive an email notification.

Customizing Email Alerts Example

This example describes how to customize the body of an email message used in an alert. Youcan define a threshold for a Teradata Database metric when a specific event occurs. You canthen specify that the event triggers an alert. The alert service has access to information onseveral properties of a monitored system, depending on the data collectors that you enable. Ifyou configure the alert to send text, such as an email message, you can select which of theavailable properties to display in the message.

The following is an overview of the process:

1. Configure the delivery type for the Teradata Database system in the Alert Setup portlet.2. Configure email delivery options in the Alert Setup portlet.3. Configure the Teradata Database system for Teradata Viewpoint to monitor in the

Teradata Systems portlet.4. Configure data collectors to monitor the configured Teradata system in the Teradata

Systems portlet.5. Create a custom message with alert properties in the Teradata Systems portlet.6. Review alert messages that arrive in the email inbox.

Alert Property Syntax

The following guidelines apply to alert properties:• Enclose the alert property with curly brackets ({}) and precede the expression with the

dollar sign ($), as in ${alert_property}.

For example, type ${databaseName} to return the name of the database that triggers analert.

Chapter 2 System Administration

24 Teradata Alerts User Guide, Release 14.01

Page 25: Teradata Alert

• Ensure that you enter alert properties with the correct case, because they are case-sensitive.

• If an alert property is misspelled, uses incorrect case, or does not exist in the list ofproperties, the alert service displays the string literally.For example, if you use ${databaseNME} instead of ${databaseName} when addingthe alert property, the alert service returns ${databaseNME} instead of displaying thename of the database that triggers the alert.

Suppose you want to send an email message to [email protected] with medium severityif the current perm space that is used in any database on Teradata Database systemTEST1 exceeds 80%. On the system TEST1, finance is one of the databases you want tomonitor.

1. In the Alert Setup portlet, configure Delivery Settings.

a. Click Delivery Settings under SETUP OPTIONS.b. Click Email under DELIVERY TYPES.c. Enter the SMTP Host address of the outgoing (SMTP) email server, such as

smtp.example.com.d. Select Use default port under Port to use the default port 25.e. Enter a default Server Timeout, such as 30 seconds.f. Enter an address in the Reply-to box, such as [email protected]. Keep the default Anonymous login.h. Leave the Advanced box blank.i. Type [email protected] in the Test Recipient box.j. Click Test to verify that the SMTP server delivers the email to [email protected]. Click Apply.

2. In the Alert Setup portlet, create an Action Set.

a. Click Alert Presets under SETUP OPTIONS.b. Click Action Sets under PRESET OPTIONS.c. Click next to ACTION SETS.d. Enter an ACTION SET NAME. For example: CustomEmailAlert.e. Ensure that Include in alert log is selected under ACTIONS. This option is

selected by default.

If you do not select Include in alert log, you cannot view alerts for this action setin the Alert Viewer portlet.

f. Select Send to person under Actions.g. Click To and type [email protected] in the Email box.h. Click Apply.

3. In the Teradata Systems portlet for Teradata Viewpoint monitoring, configureTEST1.

a. Click next to SYSTEMS and select Add Teradata System.b. Enter a SYSTEM NICKNAME, such as TEST1.c. Select the Enable System check box to activate the TEST1 system for monitoring.d. Enter the TDPID of the TEST1 system.e. Enter a LOGIN name and password.f. Click Apply.

4. In the Teradata Systems portlet for Teradata Viewpoint monitoring, click DataCollectors under SETUP.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 25

Page 26: Teradata Alert

a. Click the Database Space data collector.b. Select the Enable Database Space Collector check box and use the default

settings.c. Click Apply.

5. In the Teradata Systems portlet, define alert rules.

a. Click TEST1 under SYSTEMS.b. Click Alerts under SETUP.c. Click Database Space under ALERT TYPES.d. Click next to ALERTS.e. Enter an Alert Name, such as PermExceeds80.f. Select Enabled.g. Select the All databases option under Alert Rules.h. Select Current Perm % from the metric list.i. Type 80 in the box to the right of the greater-than symbol (>).j. Select CustomEmailAlert from the Alert Action list.k. Leave the value unchanged in the Do not run twice in ... minutes box.l. Select Medium from the Severity list.m. Enter the following in the Message box: The database ${databaseName} is

more than 80% full.

n. Click Apply.6. In the email inbox for the account [email protected], check for messages from

[email protected].

Sample Email Message

The email message contains the following formatted information when it arrives in theinbox.

From: [email protected]: Tuesday, August 7, 2012 2:20 PMTo: [email protected]: [Alert] permExceeds80 (System: TEST1, Database: finance)

The database finance is more than 80% full.

Event Timestamp: 2012-08-07T14:20:27.016-07:00

Database Name=financeSpace Used Percentage=85.0Max Space Used Percentage=85.28

Description: (Space Used Percentage > 80.0)

Overview: Customizing Email Alerts for Server Management

Use the Alert Setup and Server Management portlets to send a customized email whenalerts with certain criteria are triggered.

The following is an overview of the process:

1. In SMWeb, configure the system to monitor the Server Management portlet.

Chapter 2 System Administration

26 Teradata Alerts User Guide, Release 14.01

Page 27: Teradata Alert

2. Configure the delivery settings in the Alert Setup portlet.3. Create an action set in the Alert Setup portlet.4. In the Server Management portlet, configure the site ID.5. In the Server Management portlet, define the alert rules for the site ID.6. Monitor the messages that arrive in the email inbox.

Example: Creating an Email Message for Critical Server Management Alerts

Suppose you want to send an email message to [email protected] whenever a critical orfatal Server Management alert is triggered.

1 In SMWeb, configure the system to monitor the Server Management portlet.

a On the SMWeb Home page, select External Connections.

b Under Viewpoint Settings, at IP Address, type the IP address of the Viewpointserver.

c Click Save.

2 In the Alert Setup portlet, configure Delivery Settings.

a Under SETUP OPTIONS, click Delivery Settings.

b Under DELIVERY TYPES, click Email.

c At SMTP Host, enter the Host address of the outgoing (SMTP) email server.For example, smtp.example.com.

d At Port, select Use default port to use the default port 25.

e Enter a default Server Timeout, in seconds.

f At Reply-to, enter a reply address.For example, [email protected].

g Leave Advanced blank.

h At Test Recipient, type the address to send the email messages.For example, [email protected].

i Click Test to verify that the SMTP server delivers the email to the address youspecified.

j Click Apply.

3 In the Alert Setup portlet, create an Action Set.

a Under SETUP OPTIONS, click Alert Presets.

b Under PRESET OPTIONS, click Action Sets.

c Click next to ACTION SETS.

d Enter an Action Set Name.For example, CustomEmailAlert.

e Under ACTIONS, ensure that Include in alert log is selected.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 27

Page 28: Teradata Alert

f Under ACTIONS, select Send to person.

g At Email, enter an email address.For example, [email protected].

h Click Apply.

4 In the Server Management portlet, configure TEST1.

a Click next to SITE IDS.

b At Site ID, enter TEST1.

c Click Apply.

5 In the Server Management portlet, define the alert rules for TEST1.

a Under SITE IDS, click TEST1.

b Click next to Alerts.

If you just created TEST1, skip this step. The alert configuration fields are ready forinput.

c At Alert Name, enter a descriptive name for this alert.For example, Test Alert.

d At Alert Rules, accept the default of All.

e In the first drop down menu, select Severity.

f In the second drop down menu, select is greater than or equal to.

g In the third drop down menu, select Critical.

h Leave Notify again if alert updates selected.

i At Alert Action, select the action set name you established.For example, CustomEmailAlert.

j At Message, enter a sample message.For example, Severity is critical or fatal,

k Click Apply.

6 In the email inbox for [email protected], monitor the messages [email protected].

SNMP Example

This example describes how to configure and send an SNMP trap as an alert action.

The following is an overview of the process:

1. Configure the SNMP delivery type in the Alert Setup portlet.2. Create an action set in the Alert Setup portlet.3. Configure the Teradata Database system for Teradata Viewpoint to monitor in the

Teradata Systems portlet.

Chapter 2 System Administration

28 Teradata Alerts User Guide, Release 14.01

Page 29: Teradata Alert

4. Configure data collectors to monitor the configured Teradata Database system in theTeradata Systems portlet.

5. Define alert rules in the Teradata Systems portlet for each system that the alert applies6. Review the delivered SNMP trap.7. Review alerts in the Alert Viewer portlet.

Suppose that you want to send a trap to an SNMP management server when the currentperm space that is used by any database on Teradata Database system TEST1 exceeds80%. You want the trap to include the name of the database on which the threshold wasexceeded as well as the actual percent of perm space in use for that database.

For this example, the SNMP management package is running on a system namedprodMgr1.

1. In the Alert Setup portlet, create an SNMP configuration.

a. Click Delivery Settings under SETUP OPTIONS.b. Click SNMP under DELIVERY TYPES.c. Click next to SNMP.d. Enter a CONFIGURATION NAME, such as snmpConfig.e. Enter a hostname for the trap Destination, for this example: prodMgr1.f. Enter a valid SNMP Community name (default is public).g. Click the Alert message check box to select it.h. The Alert description check box should be selected by default; if not, select it.i. Click Apply.

2. In the Alert Setup portlet, create an Action Set.

a. Click Alert Presets under SETUP OPTIONS.b. Click Core Hours under PRESET OPTIONS.c. Verify that the CORE HOURS displayed correspond to the weekday hours for

this alert action.d. Click Action Sets under PRESET OPTIONS.e. Click next to ACTION SETS.f. Enter an ACTION SET NAME, such as sendTrap.g. Select all of the TIMES check boxes: Core, Evening, and Weekend.h. Ensure that Include in alert log is selected under ACTIONS. This option is

selected by default.

Note: If you do not select Include in alert log, you cannot view alerts for thisaction set in the Alert Viewer portlet.

i. Select SNMP under ACTIONSj. Select snmpConfig from the list of SNMP configurations.k. Click Apply.

3. In the Teradata Systems portlet for Teradata Viewpoint monitoring, configureTEST1.

a. Click next to SYSTEMS and select Add Teradata System.b. Enter a SYSTEM NICKNAME, such as TEST1.c. Select the Enable System check box to activate the TEST1 system for monitoring.d. Enter the TDPID of the TEST1 system.e. Enter a LOGIN name and password.f. Click Apply.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 29

Page 30: Teradata Alert

4. In the Teradata Systems portlet, click Data Collectors under SETUP.

a. Click Database Space under DATA COLLECTORS.b. Select the Enable Database Space Collector check box and keep the default

settings.c. Click Apply.

5. In the Teradata Systems portlet, define alert rules.

a. Click TEST1 under SYSTEMS.b. Click Alerts under SETUP.c. Click Database Space under ALERT TYPES.d. Click next to ALERTS.e. Enter an Alert Name, such as PermExceeds80.f. Select Enabled.g. Select the All databases option under Alert Rules.h. Select Current Perm % from the metric list.i. Type 80 in the box to the right of the greater-than symbol (>).j. Select sendTrap from the Alert Action list.k. Enter the following in the Message box: Database ${databaseName}

current perm use is ${spaceUsedPct}%.l. Click Apply.

Note: You can include alert properties in the Message field by enclosing theproperty name in curly brackets ({}) and preceding the expression with a dollarsign ($) as shown above for the databaseName and spaceUsedPct properties. Seethe topic Alert Properties for a description of the alert properties that are availablefor Teradata Viewpoint alerts.

When the perm space usage for a database exceeds 80%, a trap is sent to theconfigured trap destination, in this example, prodMgr1. Because you configuredthe SNMP delivery settings with both the Alert description and Alert messageoptions enabled, the trap Details field contains a description of the event thatgenerated the trap followed by the message you provided in the PermExceeds80alert rule: (Space Used Percentage > 80. 0), Database financecurrent perm use is 81.9%.

Note: The trap description field was renamed to Details in Teradata Alerts 14.00.6. In the Alert Viewer portlet, review triggered actions.

BTEQ Example

This example shows how to enable a BTEQ script when creating action sets in the AlertSetup portlet.

The following is an overview of the process:

1. Copy BTEQ scripts to the server that is running the Teradata Notification Service.2. Verify that the Teradata Notification Service is running.3. Configure the delivery type for the Teradata Database system in the Alert Setup portlet.4. Create an action set in the Alert Setup portlet.5. Configure the Teradata Database system for Teradata Viewpoint to monitor in the

Teradata Systems portlet.6. Configure data collectors to monitor the configured Teradata Database system in the

Teradata Systems portlet.

Chapter 2 System Administration

30 Teradata Alerts User Guide, Release 14.01

Page 31: Teradata Alert

7. Define alert rules in the Teradata Systems portlet for each system that the alert appliesto.

8. Review alerts in the Alert Viewer portlet.

Suppose you want to run the BTEQ script cpuUsageReport.txt as an alert action forthe Teradata Database system TEST1 only on weeknights, and track alerts in the AlertViewer portlet. cpuUsageReport.txt contains the following macro that returns aproblem analysis of daily workloads:

EXECUTE ResPmaTotal;

1. Copy the BTEQ script cpuUsageReport.txt to the Windows server at<InstallFolder>\Teradata\Client\14.00\Teradata NotificationService\sql.

2. Verify that the Teradata Notification Service is running on the Windows server.

a. Type services.msc at the Windows command prompt.b. 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.3. In the Alert Setup portlet, configure the delivery type for TEST1.

a. Click Delivery Settings under SETUP OPTIONS.b. Click BTEQ/SQL Login under DELIVERY TYPES.c. Click next to BTEQ/SQL Login.d. Enter the TDPID of the TEST1 system.e. Enter a valid Username and Password to log on to the TDPID.f. Select a Session Character Set from the list.g. Select BTEQ (Windows) from the TEST TERADATA LOGON list.h. Click Test to verify the BTEQ configuration for the TDPID.i. Click Apply.

4. In the Alert Setup portlet, create an Action Set.

a. Click Alert Presets under SETUP OPTIONS.b. Click Core Hours under PRESET OPTIONS.c. Verify that the EVENING HOURS displayed in the box correspond to the

weeknight hours for this alert action.d. Click Action Sets under PRESET OPTIONS.e. Click next to ACTION SETS.f. Enter an ACTION SET NAME. . For example: cpuUsageReport.g. Clear the Core and Weekend check boxes under TIMES.h. Ensure that Include in alert log is selected under ACTIONS. This option is

selected by default.

If you do not select Include in alert log, you cannot view alerts for this action setin the Alert Viewer portlet.

i. Select BTEQ under Actions.j. Select the Windows host from the Location list.k. Select cpuUsageReport.txt from the Script list.

If the script does not appear in the list, verify that the script exists at<InstallFolder>\Teradata\Client\14.00\Teradata NotificationService\sql\cpuUsageReport.txt.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 31

Page 32: Teradata Alert

l. Select TEST1 from the TDPID list.m. Click Apply.

5. In the Teradata Systems portlet for Teradata Viewpoint monitoring, configureTEST1.

a. Click next to SYSTEMS and select Add Teradata System.b. Enter a SYSTEM NICKNAME, such as TEST1.c. Select the Enable System check box to activate the TEST1 system for monitoring.d. Enter the TDPID of the TEST1 system.e. Enter a LOGIN name and password.f. Click Apply.

6. In the Teradata Systems portlet for Teradata Viewpoint monitoring, click DataCollectors under SETUP.

a. Click the following DATA COLLECTORS:• Resource Usage• System Stats

b. For each data collector, select the Enable check box, use the default settings, andclick Apply.

7. In the Teradata Systems portlet, define alert rules.

a. Click TEST1 under SYSTEMS.b. Click Alerts under SETUP.c. Click System under ALERT TYPES.d. Click next to ALERTS.e. Enter an Alert Name, such as cpuUsageReportAlert.f. Select Enabled.g. Select Any from the Alert Rules list.h. Select Node CPU Usage and is greater than from the lists.i. Enter a threshold percentage, such as 80.j. Select cpuUsageReport from the Alert Action list.k. Select High from the Severity list.l. Click Apply.

8. In the Alert Viewer portlet, review triggered actions.

a. [Optional] Click High to filter the alerts in the portlet by high severity.b. [Optional] Type TEST1 in the SYSTEM NAME filter box to view alerts for the

TEST1 system.

BTEQ Script Processing and Migrating Alerts from Teradata Manager

BTEQ Script Processing

When you configure Teradata Alerts to run a BTEQ script as an alert action, it creates alogon session with the Teradata Database system, runs the script to completion, and ends thesession. Teradata Alerts processes BTEQ scripts sequentially as shown in the following table.

Chapter 2 System Administration

32 Teradata Alerts User Guide, Release 14.01

Page 33: Teradata Alert

BTEQ Command Description Details Executed.LOGON. Creates a logon session Enters the TDPID, Account ID,

Username and Password that youused when creating the BTEQconfiguration

Note: Because you define logoncredentials in the Alert Setupportlet, ensure that BTEQ scripts donot contain the .LOGON.command.

Automatically

.LOGMECH. Provides extrainformation for a logonsession

Enters the optional Logmech Name Only if you define Logmech Namewhen creating the BTEQconfiguration

.LOGDATA. Provides extrainformation for a logonsession

Enters the optional Logmech Nameand the corresponding LogmechData

Only if you define Logmech Nameand the corresponding LogmechData when creating the BTEQconfiguration

.RUN FILE. Executes the BTEQscript

Executes the commands in theBTEQ script in <InstallFolder>\Teradata\Client

\14.00\Teradata

Notification Service\sql

that is available from the Script listwhen you created a BTEQ action set

Automatically

.QUIT. Logs out of the session Automatically

Alerts Migrated from Teradata Manager to Teradata Alerts

You can migrate alerts that you defined in Teradata Manager to alerts in Teradata Alerts.Unlike Teradata Manager, which could only run BTEQ scripts on Windows, Teradata Alertscan run BTEQ scripts on Linux as well as on Windows. Teradata Manager differs fromTeradata Alerts in the following ways:

Interface Program ...LOGONsyntaxsupport

Where to Enter LoginCredentials

Script File Location

TeradataAlerts

BTEQ No Alert Setup portlet

SETUP OPTIONS>DeliverySettings>DELIVERYTYPES>BTEQ/SQL Login>Login

For Linux: /opt/teradata/client/cam/tdnotification/sql For Windows:<InstallFolder>\Teradata\Client

\14.00\Teradata Notification Service\sql

TeradataManager

DMTEQ Yes Teradata ManagerAdministration

Systems window

Windows: <InstallFolder>\Teradata\Teradata Manager 13.0\secure

SQL Queries Example

This example describes how to submit a SQL statement as an alert action.

The following is an overview of the process:

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 33

Page 34: Teradata Alert

1. Configure login credentials for the Teradata Database system in the Alert Setup portlet.2. Configure a SQL query delivery type in the Alert Setup portlet.3. Create an action set in the Alert Setup portlet.4. Configure the Teradata Database system for Teradata Viewpoint to monitor in the

Teradata Systems portlet.5. Configure data collectors to monitor the configured Teradata Database system in the

Teradata Systems portlet.6. Define alert rules in the Teradata Systems portlet for each system to which the alert

applies.7. Enable the alert to be generated.8. Review the SQL output.9. Review alerts in the Alert Viewer portlet.

Suppose that you want to run the following SQL insert statement as an alert action for theTeradata Database system TEST1 only on weekdays:

INSERT INTO admin.sessionHist (TheTime, UserName, SessionCount)VALUES (CURRENT_TIMESTAMP, ${userName}, ${sessionsForUser})

This insert is to be performed when the session count for any user on the TEST1 systemexceeds ten.

Notice the alert properties ${userName} and ${sessionsForUser} in the insertstatement above. When you configure an alert action to run a SQL statement using theSQL Queries delivery type, the text can include alert properties that will be replaced withruntime values. See the topic Alert Properties for a description of the alert propertiesavailable for Teradata Viewpoint alert types.

For this example, assume the target table (admin.sessionHist) has already been created onTEST1. For example:

CREATE TABLE admin.sessionHist (TheTime TIMESTAMP NOT NULL, UserName VARCHAR(256) NOT NULL, SessionCount INTEGER NOT NULL)

1. In the Alert Setup portlet, configure the login credentials for TEST1.

a. Click Delivery Settings under SETUP OPTIONS.b. Click BTEQ/SQL Login under DELIVERY TYPES.c. Click next to BTEQ/SQL Login.d. Enter the TDPID of the TEST1 system.e. Enter a valid Username and Password to log on to TEST1.f. Select a Session Character Set from the list.g. Ensure that JDBC is selected in the TEST TERADATA LOGON dropdown list.h. Click Test to verify the login credentials for TEST1.i. Click Apply.

2. In the Alert Setup portlet, configure the SQL query for TEST1.

a. Click Delivery Settings under SETUP OPTIONS.b. Click SQL Queries under DELIVERY TYPESc. Click next to SQL Queriesd. Enter a query NAME, such as insertSessionHistory.e. [Optional] Enter the name of a DEFAULT DATABASE.f. Enter the SQL insert statement shown above.

Chapter 2 System Administration

34 Teradata Alerts User Guide, Release 14.01

Page 35: Teradata Alert

g. Click Apply.3. In the Alert Setup portlet, create an Action Set.

a. Click Alert Presets under SETUP OPTIONS.b. Click Core Hours under PRESET OPTIONS.c. Verify that the CORE HOURS displayed correspond to the weekday hours for

this alert action.d. Click Action Sets under PRESET OPTIONS.e. Click next to ACTION SETS.f. Enter an ACTION SET NAME. For example: runSessionCount.g. Clear the Evening and Weekend check boxes under TIMESh. Ensure that Include in alert log is selected under ACTIONS. This option is

selected by default.

If you do not select Include in alert log, you cannot view alerts for this action setin the Alert Viewer portlet.

i. Select SQL under Actions.j. Select insertSessionHistory from the Query list.k. Select TEST1 from the TDPID list.l. Click Apply.

4. In the Teradata Systems portlet, configure TEST1.

a. Click next to SYSTEMS and select Add Teradata System.b. Enter a SYSTEM NICKNAME, such as TEST1.c. Select the Enable System check box to activate the TEST1 system for monitoring.d. Enter the TDPID of the TEST1 system.e. Enter a LOGIN name and password.f. Click Apply.

5. In the Teradata Systems portlet, click Data Collectors under SETUP.

a. Click Sessions under DATA COLLECTORS.b. Select the Enable Sessions Collector check box and keep the default settings.c. Click Apply.

6. In the Teradata Systems portlet, define alert rules.

a. Click TEST1 under SYSTEMS.b. Click Alerts under SETUP.c. Click Session under ALERT TYPES.d. Click next to ALERTSe. Enter an Alert Name, such as userSessionCountAlert.f. Select Enabled.g. Select All from the Alert Rules list.h. Select Sessions Per User and is greater than from the lists.i. Enter a threshold number, such as 10.j. Select runSessionCount from the Alert Action list.k. Select High from the Severity list.l. Click Apply.

7. If no single user on TEST1 has more than ten sessions, then create the conditions forthe alert to be raised by opening 11 sessions for a Teradata user. For example, usingBTEQ:

.set sessions 11

.logon TEST1/myUser,myPassword

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 35

Page 36: Teradata Alert

8. On the TEST1 system, review the sessionHist table. Use a query tool such as BTEQ orSQL Scratchpad to query the table. For example:

select * from admin.sessionHist order by TheTime

Note: You may need to wait a few minutes for the alert to be triggered, depending onthe Teradata session monitoring rate on TEST1.

9. In the Alert Viewer portlet, review triggered actions.

Run a Program Example

This example explores how to Run a program as an alert action in the Alert Setup portlet.

The following is an overview of the process:

1. Verify that the Teradata Notification Service is running.2. Copy programs or batch files to the server that is running the Teradata Notification

Service.3. Create an action set in the Alert Setup portlet.4. Configure the Teradata Database system for Teradata Viewpoint to monitor in the

Teradata Systems portlet.5. Configure data collectors to monitor the configured Teradata Database system in the

Teradata Systems portlet.6. Define alert rules in the Teradata Systems portlet for each system that the alert applies

to.7. Review alerts in the Alert Viewer portlet.

Suppose that you want to use the batch file echoUsage.bat as an alert action for theTeradata Database system PROD1 only on weekends and track alerts in the Alert Viewerportlet. The batch file echoUsage.bat launches the program that monitors theperformance of your system. The program output includes information about the spaceusage on PROD1 if the current perm space that is used in any database on the PROD1system exceeds 80%.

1. Verify that the Teradata Notification Service is running on the Windows server.

a. Type services.msc at the Windows command prompt.b. 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.2. Copy the batch file echoUsage.bat to the Windows server at <InstallFolder>

\Teradata\Client\14.00\Teradata Notification Service\usrcmd

3. In the Alert Setup portlet, create an Action Set.

a. Click Alert Presets under SETUP OPTIONS.b. Click Core Hours under PRESET OPTIONS.c. Verify that the WEEKEND HOURS displayed in the box correspond to the

weekend hours that you want for this alert action.d. Click Action Sets under PRESET OPTIONS.e. Click next to ACTION SETS.f. Enter an ACTION SET NAME. For example: echoUsageReportg. Select Weekend, and clear Core and Evening under TIMES.

Chapter 2 System Administration

36 Teradata Alerts User Guide, Release 14.01

Page 37: Teradata Alert

h. Ensure that Include in alert log is selected under ACTIONS. This option isselected by default.

If you do not select Include in alert log, you cannot view alerts for this action setin the Alert Viewer portlet.

i. Select Run a program under ACTIONS.j. Select the Windows host from the Location list.k. Select echoUsage.bat from the Program list.

If the program or script does not appear in the list, verify that it exists at<InstallFolder>\Teradata\Client\14.00\Teradata NotificationService\usrcmd\echoUsage.bat.

l. Leave the Arguments box blank.m. Click Apply.

4. In the Teradata Systems portlet for Teradata Viewpoint monitoring, configurePROD1.a. Click next to SYSTEMS and select Add Teradata System.b. Enter a SYSTEM NICKNAME, such as PROD1.c. Select the Enable System check box to activate the PROD1 system for

monitoring.d. Enter the TDPID of the PROD1 system.e. Enter a LOGIN name and password.f. Click Apply.

5. In the Teradata Systems portlet for Teradata Viewpoint monitoring, click DataCollectors under SETUP.a. Click the Database Space data collectorb. Select the Enable Database Space Collector check box and keep the default

settings.c. Click Apply.

6. In the Teradata Systems portlet, define alert rules.a. Click PROD1 under SYSTEMS.b. Click Alerts under SETUP.c. Click Database Space under ALERT TYPES.d. Click next to ALERTS.e. Enter an Alert Name, such as echoUsageReportAlert.f. Select Enabled.g. Select the All databases option under Alert Rules.h. Select Current Perm % from the metric list.i. Type 80 in the box to the right of the greater-than symbol (>).j. Select echoUsageReport from the Alert Action list.k. Leave the value unchanged in the Do not run twice in ... minutes box.l. Select Medium from the Severity list.m. Click Apply.

7. In the Alert Viewer portlet, review triggered actions.a. [Optional] Click Medium to filter the alerts in the portlet by medium severity.b. [Optional] Type PROD1 in the SYSTEM NAME filter box to view alerts for the

PROD1 system.Note: The alert or alert detail information that the Alert Viewer portlet displays does notinclude the output of the program or batch file.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 37

Page 38: Teradata Alert

Adding Alert Properties as Arguments to the Run a Program Example

This example explores how to add alert properties as arguments to the Run a Programaction. You can define a threshold for a Teradata Database metric when a specific eventoccurs. You can then specify that the event triggers an alert. The alert service has access toinformation on several properties of a monitored system, depending on the data collectorsthat you enable. If you configure the alert to run a program and the program acceptscommand-line parameters, you can add custom parameters that the program can access.

The following is an overview of the process:

1. Verify that the Teradata Notification Service is running.2. Copy programs or batch files to the server that is running the Teradata Notification

Service.3. Create an action set that adds alert properties as arguments under the Run a program

action in the Alert Setup portlet .4. Configure the Teradata Database system for Teradata Viewpoint to monitor in the

Teradata Systems portlet.5. Configure data collectors to monitor the configured Teradata system in the Teradata

Systems portlet.6. Define alert rules in the Teradata Systems portlet for each system that the alert applies

to.7. Review alerts in the Alert Viewer portlet.

Suppose that you want to use the script echoUsage.sh as a medium severity alert actionfor the Teradata Database system PROD1 only on weekends and track alerts in the AlertViewer portlet. echoUsage.sh launches the program that monitors the performance ofyour system. The script reads in any arguments that appear on the command-line andexecutes the program using these arguments as run-time parameters. The program outputincludes information about the space usage on PROD1 if the current perm space that isused in any database on the PROD1 system exceeds 80%.

1. Verify that the Teradata Notification Service is running on the Linux server:

a. Use the following Linux command to check that the service is running: /etc/init.d/tdnotification status

b. If the result is not "running," use: /etc/init.d/tdnotification start2. Copy the script echoUsage.sh to the Linux server at/opt/teradata/client/

cam/tdnotification/usrcmd/echoUsage.sh.3. In the Alert Setup portlet, create an Action Set.

a. Click Alert Presets under SETUP OPTIONS.b. Click Core Hours under PRESET OPTIONS.

i. Verify that the WEEKEND HOURS displayed in the box correspond to theweekend hours that you want for this alert action.

c. Click Action Sets under PRESET OPTIONS.d. Click next to ACTION SETS.e. Enter an ACTION SET NAME. For example: echoUsageSpaceUsedPctf. Select Weekend, and clear Core and Evening under TIMES.g. Ensure that Include in alert log is selected under ACTIONS. This option is

selected by default.

Chapter 2 System Administration

38 Teradata Alerts User Guide, Release 14.01

Page 39: Teradata Alert

If you do not select Include in alert log, you cannot view alerts for this action setin the Alert Viewer portlet.

h. Select Run a program under ACTIONS.i. Select echoUsage.sh from the Program list.

If the script does not appear in the list, verify that it exists at /opt/teradata/client/cam/tdnotification/usrcmd/echoUsage.sh.

j. Type -db ${databaseName} -sp ${spaceUsedPct} in the Argumentsbox.

k. Click Apply.4. In the Teradata Systems portlet for Teradata Viewpoint monitoring, configure

PROD1.

a. Click next to SYSTEMS and select Add Teradata System.b. Enter a SYSTEM NICKNAME, such as PROD1.c. Select the Enable System check box to activate the PROD1 system for

monitoring.d. Enter the TDPID of the PROD1 system.e. Enter a LOGIN name and password.f. Click Apply.

5. In the Teradata Systems portlet for Teradata Viewpoint monitoring, click DataCollectors under SETUP.

a. Click Database Space under DATA COLLECTORS.b. Select the Enable Database Space Collector check box and keep the default

settings.c. Click Apply.

6. In the Teradata Systems portlet, define alert rules.

a. Click PROD1 under SYSTEMS.b. Click Alerts under SETUP.c. Click Database Space under ALERT TYPES.d. Click next to ALERTS.e. Enter an Alert Name, such as echoPermSpaceLow.f. Select Enabled.g. Select the All databases option under Alert Rules.h. Select Current Perm % from the metric list.i. Type 80 in the box to the right of the greater-than symbol (>).j. Select echoUsageSpaceUsedPct from the Alert Action list.k. Leave the value unchanged in the Do not run twice in ... minutes box.l. Select Medium from the Severity list.m. Click Apply.

7. In the Alert Viewer portlet, review triggered actions.

a. [Optional] Click Medium to filter the alerts in the portlet by medium severity.b. [Optional] Type PROD1 in the SYSTEM NAME filter box to view alerts for the

PROD1 system.

Note: The alert or alert detail information that the Alert Viewer portlet displays does notinclude the output of the program or script.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 39

Page 40: Teradata Alert

Check Logon Timeout with Canary Query Example

This example explores how to create an alert action that is based on an expired timeoutperiod when connecting to a Teradata system.

The following is an overview of the process:

1. Configure email delivery options in the Alert Setup portlet.2. Create an action set in the Alert Setup portlet.3. Configure the Teradata Database system for Teradata Viewpoint to monitor in the

Teradata Systems portlet.4. Define a canary query in the Teradata Systems portlet to run on the Teradata system.5. Define a canary query alert rule in the Teradata Systems portlet.6. Review alerts in the Alert Viewer portlet.7. Review alert messages that arrive in the email inbox.

Suppose that you want to monitor when locks that occur on data-dictionary tables preventyou from logging on to Teradata system PROD1. You create an alert action that is basedon an expired logon-timeout period using a canary query. Each time the query runs, itattempts to log on to PROD1 and then executes a simple SQL statement. If the logon fails,it times out and emails an alert to [email protected] and logs the alert in the AlertViewer portlet.

1. In the Alert Setup portlet, configure Delivery Settings.

a. Click Delivery Settings under SETUP OPTIONS.b. Click Email under DELIVERY TYPES.c. Enter the SMTP Host address of the outgoing (SMTP) email server, such as

smtp.example.com.d. Select Use default port under Port to use the default port 25.e. Enter a default Server Timeout, such as 30 seconds.f. Enter an address in the Reply-to box, such as [email protected]. Keep the default Anonymous login.h. Leave the Advanced box blank.i. Type [email protected] in the Test Recipient box.j. Click Test to verify that the SMTP server delivers the email to [email protected]. Click Apply.

2. In the Alert Setup portlet, create an Action Set.

a. Click Alert Presets under SETUP OPTIONS.b. Click Action Sets under PRESET OPTIONS.c. Click next to ACTION SETS.d. Enter an ACTION SET NAME., such as Email dba.e. Ensure that Include in alert log is selected under ACTIONS. This option is

selected by default.

If you do not select Include in alert log, you cannot view alerts for this action setin the Alert Viewer portlet.

f. Select Send to person under ACTIONS.g. Click To, and type [email protected] in the Email box.h. Click Apply.

Chapter 2 System Administration

40 Teradata Alerts User Guide, Release 14.01

Page 41: Teradata Alert

3. In the Teradata Systems portlet for Teradata Viewpoint monitoring, configurePROD1.

a. Click next to SYSTEMS and select Add Teradata System.b. Enter a SYSTEM NICKNAME, such as PROD1.c. Select the Enable System check box to activate the PROD1 system for

monitoring.d. Enter the TDPID of the PROD1 system.e. Enter a LOGIN name and password.f. Click Apply.

4. Define a canary query in the Teradata Systems portlet to run on the Teradata system.

a. Click PROD1 under SYSTEMS.b. Click Canary Queries under SETUP.c. Click next to CANARY QUERIES.d. Enter a NAME for the canary query, such as LogonTimeout.e. Select Enabled.f. Enter a simple query in the SQL box, such as SELECT COUNT(*) FROM

DBC.DBCInfo ;.g. Enter the name of the DEFAULT DATABASE. For this query, type DBC.h. Select viewpoint in the LOGIN list.i. Select Log in each time the query executes under LOGIN.j. Enter a timeout period for the logon. Type 20 in the Time out the login attempt

after box.k. Leave the other default values unchanged.l. Click Apply.

5. Define a canary query alert rule in the Teradata Systems portlet.

a. Click PROD1 under SYSTEMS.b. Click Alerts under SETUP.c. Click Canary Queries under ALERT TYPES.d. Click next to ALERTS.e. Enter an Alert Name, such as Canary Query Logon Timeout.f. Select Enabled.g. Select All in the first list under Alert Rules to apply all the following rules.h. Select LogonTimeout as the rule from the second list under Alert Rules.i. Select Login Timeout Occurred from the third list under Alert Rules.j. Leave 0 as the default number of minutes for the Only trigger if alert rule(s) are

met for.k. Select Email dba in the list under Alert Action.l. Leave 0 as the default number of minutes for the Do not run twice box.m. Select Medium in the list under Severity.n. Enter a Message in the box, such as Logon Timeout occurred on PROD1.o. Click Apply.

6. In the Alert Viewer portlet, review triggered actions.

a. [Optional] Click Medium to filter the alerts in the portlet by medium severity.b. [Optional] Type PROD1 in the SYSTEM NAME filter box to view alerts for the

PROD1 system.7. In the email inbox for the account [email protected], check for messages from

[email protected].

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 41

Page 42: Teradata Alert

Sample Email Message

The email message contains the following formatted information when it arrives in theinbox.

From: [email protected]: Tuesday, August 7, 2012 2:23 PMTo: [email protected]: [Alert] PROD1 - Canary Query Logon Timeout (Source: Viewpoint, Type: Canary Query)

Logon timeout occurred on PROD1.

Event Timestamp: 2012-08-07T14:23:01.331-07:00

Canary Id=90Query Name=LogonTimeoutResponse Time=loginTimeoutOccurred=true

Description: ((Canary Id = 90 and loginTimeoutOccurred is true))

Teradata MSM Alert Example

This example explores how to define an event-response action in Teradata MSM Setup tosend an alert.

The following is an overview of the process:

1. Configure email delivery options in the Alert Setup portlet.2. Create an action set in the Alert Setup portlet.3. Add an ecosystem to the Teradata MSM Setup portlet.4. Add a component to the Teradata MSM Setup portlet.5. Add an event response to the Teradata MSM Setup portlet.6. Review alerts in the Alert Viewer portlet.7. Review alert messages that arrive in the email inbox.

Suppose that you want to send an email alert with warning severity to [email protected] a Heartbeat event during core hours occurs with code 321 for the application servermulti_gamma1 (a component of the MULTI ecosystem). You also want to track alerts inthe Alert Viewer portlet.

1. In the Alert Setup portlet, configure Delivery Settings.

a. Click Delivery Settings under SETUP OPTIONS.b. Click Email under DELIVERY TYPES.c. Enter the SMTP Host address of the outgoing (SMTP) email server, such as

smtp.example.com.d. Select Use default port under Port to use the default port 25.e. Enter a default Server Timeout, such as 30 seconds.f. Enter an address in the Reply-to box, such as [email protected]. Keep the default Anonymous login.h. Leave the Advanced box blank.

Chapter 2 System Administration

42 Teradata Alerts User Guide, Release 14.01

Page 43: Teradata Alert

i. Type [email protected] in the Test Recipient box.j. Click Test to verify that the SMTP server delivers the email to [email protected]. Click Apply.

2. In the Alert Setup portlet, create an Action Set.

a. Click Alert Presets under SETUP OPTIONS.b. Click Core Hours under PRESET OPTIONS.c. Click Action Sets under PRESET OPTIONS.d. Click next to ACTION SETS.e. Enter an ACTION SET NAME. For example: multi_gamma1_heartbeat321f. Select Core under TIMES.g. Ensure that Include in alert log is selected under ACTIONS. This option is

selected by default.

If you do not select Include in alert log, you cannot view alerts for this action setin the Alert Viewer portlet.

h. Select Send to person under Actions.i. Click To and type [email protected] in the Email box.j. Click Apply.

3. In the Teradata MSM Setup portlet, add an ecosystem.

a. Click Components and Ecosystems to expand the menu.b. Click Manage Components and Ecosystems.c. Click Add.d. Enter an Ecosystem ID and Ecosystem Name in the appropriate boxes, such as

MULTI and MTrig, respectively.e. Enter the Default TDPID of the system, such as GAMMA1.f. Click Apply.

4. In the Teradata MSM Setup portlet, add a component.

a. Click Components and Ecosystems to expand the menu.b. Click Manage Components and Ecosystems.c. Click to the right of the name of the ecosystem you added.d. Select APP from the Subcategory list.e. Enter the Component ID, such as multi_gamma1.f. Click Apply.

5. In the Teradata MSM Setup portlet, add an event response.

a. Click Components and Ecosystems to expand the menu.b. Click Manage Components and Ecosystems.c. Click to expand the MULTI ecosystem.d. Click to expand the APP SUBCATEGORY.e. Click to the right of multi_gamma1.f. Click the Event Responses tab.g. Click Add to the right of For metric Heartbeat.h. Click Execute Action from the Select response type list in the ADD EVENT

RESPONSE view.i. In the response details area, build the following response to a Heartbeat event:

If a ALERT event occurs with Warning severity and code 321 , execute selectedactionsTo build the response, do the following:

i. Select ALERT from the event list.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 43

Page 44: Teradata Alert

ii. Select Warning from the severity list.iii. Enter an alert code in the box, such as 321.

j. Type multi_gamma1_heartbeat321 in the Action Filter box and click Search.k. Click the multi_gamma1_heartbeat321 action in the Available box and click

to move the action to the Selected box.l. Click OK.m. In the Event Responses tab, ensure that the event response trigger you just created

is now in the list under For metric Heartbeat.n. Click Apply.

6. In the Alert Viewer portlet, review triggered actions.a. [Optional] Click Medium to filter the alerts in the portlet by normal severity.

7. In the email inbox for the account [email protected], check for messages [email protected].

Sample Email Message

The email message contains the following formatted information when it arrives in theinbox.

From: [email protected]: Tuesday, February 29, 2011 1:49 PMSubject: [Alert] TMSM Resource Alert (Source: TMSM, Type: TMSM Alert)

Event: COMPONENTSOccurred for resource: TDPID[COMPONENTS] Resource Id[multi_gamma1] Resource Type[Heartbeat] Unit of Work: NAMessage: test EMAIL FROM CAM

Description: TMSM Resource [COMPONENTS multi_gamma1 ALERT]

Event Timestamp: 2011-02-29T13:48:49.154-08:00

TMSM Unit of Work Identifier=NATMSM Event Type=ALERTTMSM Resource Identifier=multi_gamma1TMSM TDPID=COMPONENTSSeverity Level=WarningTMSM Alert Code=321TMSM Resource Type=HeartbeatTMSM Message contents=test EMAIL FROM CAM

Workload Designer Alert Example

This example explores how to define an exception in the Workload Designer portlet to sendan alert. The example makes the following assumptions:• You implement this example first in a testing environment. Because only one ruleset can

be active in Workload Designer at a given time, the ruleset you create with this procedurereplaces the currently active ruleset. An untested ruleset that you apply to a productionsystem can degrade performance.

• The example only generates alerts for queries that are classified under the WD-Defaultworkload for the ALWAYS planned environment.

Chapter 2 System Administration

44 Teradata Alerts User Guide, Release 14.01

Page 45: Teradata Alert

The following is an overview of the process:

1. Configure the Teradata Database system for Teradata Viewpoint to monitor in theTeradata Systems portlet.

2. Configure data collectors to monitor the configured Teradata Database system in theTeradata Systems portlet.

3. Configure email delivery options in the Alert Setup portlet.4. Create an action set in the Alert Setup portlet.5. Create a ruleset in the Workload Designer portlet.6. Create an exception in the Workload Designer portlet to trigger the alert.7. Activate the ruleset in the Workload Designer portlet.8. Review alerts in the Alert Viewer portlet.9. Review alert messages that arrive in the email inbox.

Suppose that you want to send an email alert to [email protected] for core hours whenthe usage of spool space on a non-production Teradata Database system TEST1 exceeds500 GB and track alerts in the Alert Viewer portlet.

1. In the Teradata Systems portlet for Teradata Viewpoint monitoring, configureTEST1, a SLES 11 Teradata Active System Management (TASM) system on anEnterprise Data Warehouse (EDW) platform.

a. Click next to SYSTEMS and select Add Teradata System.b. Enter a SYSTEM NICKNAME, such as TEST1.c. Select the Enable System check box to activate the TEST1 system for monitoring.d. Enter the TDPID of the TEST1 system.e. [Optional] Enter the SITE ID assigned by Teradata Customer Services.f. Enter a LOGIN name and password.g. Select the ENHANCED TASM FUNCTIONS check box to activate the workload

management features available with your TASM license in SLES 11.h. Click Apply.

2. In the Teradata Systems portlet for Teradata Viewpoint monitoring, click DataCollectors under SETUP.

a. Click the following DATA COLLECTORS:• Alert Request• AWT Info• Database Space• Sessions• System Stats

b. For each data collector, select the Enable check box, and keep the default settings.c. Click Apply.

3. In the Alert Setup portlet, configure Delivery Settings.

a. Click Delivery Settings under SETUP OPTIONS.b. Click Email under DELIVERY TYPES.c. Enter the SMTP Host address of the outgoing (SMTP) email server, such as

smtp.example.com.d. Select Use default port under Port to use the default port 25.e. Enter a default Server Timeout, such as 30 seconds.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 45

Page 46: Teradata Alert

f. Enter an address in the Reply-to box, such as [email protected]. Keep the default Anonymous login.h. Leave the Advanced box blank.i. Type [email protected] in the Test Recipient box.j. Click Test to verify that the SMTP server delivers the email to [email protected]. Click Apply.

4. In the Alert Setup portlet, create an Action Set.

a. Click Alert Presets under SETUP OPTIONS.b. Click Core Hours under PRESET OPTIONS.c. Verify that the core hours are correctly set for your environment.d. Click Action Sets under PRESET OPTIONS.e. Click next to ACTION SETS.f. Enter an ACTION SET NAME., such as TEST1_spool_500GB.g. Select Core under TIMES.h. Ensure that Include in alert log is selected under ACTIONS. This option is

selected by default.

If you do not select Include in alert log, you cannot view alerts for this action setin the Alert Viewer portlet.

i. Select Send to person under Actions.j. Click To and type [email protected] in the Email box.k. Click Apply.

5. In the Workload Designer portlet, create a ruleset.

a. Select TEST1 from the system list under Rulesets.b. Enter a Name such as TEST1_spool under the General tab.c. Leave the Description blank.d. Click Save.

6. In the Workload Designer portlet, create an exception to trigger the alert.

a. Click Exceptions in the ruleset toolbar for TEST1.b. Click Create Exception under the By Planned Environment tab.c. Enter a Name, such as TEST1_spool_500GB_exception under General.d. Leave the Description blank.e. Select Spool Usage (bytes) from the Exception Criteria list under Criteria and

click Add.f. Type 500 in the Spool Usage box.g. Select GigaBytes from the units list.h. Select the Notification Only option under Actions.i. Select the Alert check box under Notifications.j. Select TEST1_spool_500GB from the alert list.k. Click OK.l. Click the By Exception tab.m. Click the ALWAYS check box for WD-Default under PLANNED

ENVIRONMENTS.n. Click Save.

7. In the Workload Designer portlet, activate the ruleset.

a. In the rulesets under Working, click the TEST1_spool .b. Click Make Active.

8. In the Alert Viewer portlet, review triggered actions.

Chapter 2 System Administration

46 Teradata Alerts User Guide, Release 14.01

Page 47: Teradata Alert

a. [Optional] Type TEST1 in the SYSTEM NAME filter box to view alerts for theTEST1 system.

9. In the email inbox for the account [email protected], check for messages [email protected].

Server ManagementThe Server Management portlet allows you to select actions for Server Managementsummary alerts.

You can monitor several Server Management instances with Teradata Viewpoint and addalerts for specific site IDs or all site IDs. You create and select alert action sets from the AlertSetup portlet.

About Alerts in Server Management

In the Server Management portlet, you can define actions to occur in response to certainServer Management alerts.

After you add alert action sets in the Alert Setup portlet, they appear in the ServerManagement portlet.

The types of alert actions you can choose are:

Send an Email

Choose a defined email address and text message. Event information, such as date,time, event name, threshold, and actual value, is automatically added to the body ofthe email message.

Run a Program

Choose a program to execute (.exe).

Run a BTEQ Script

Choose a BTEQ script.

Run a SQL Query

Choose a SQL query.

Notify SNMP System

Choose an SNMP trap.

Alert Properties

The following table lists the available properties for Server Management alerts. Theassociated values allow you to categorize alerts.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 47

Page 48: Teradata Alert

Property Description Values

Impact A short impact statement about the problem any text

Severity Severity level of the alert • Unknown• OK• Information• Warning• Degraded• Critical• Fatal

Subsystem Subsystem origin of the alert • Client• Database• Network• Node• OS• Power• ServerMgmt• Storage• Other

Synopsis A short summary of the problem any text

Adding Site IDs

A site ID represents a Server Management instance and Teradata Viewpoint can monitorseveral site IDs. Each site ID can represent a different purpose, such as production,development, and so on.

1 Click next to SITE IDS.

2 Enter a name up to 15 characters.

3 Click Apply.

The icon appears if the operation is successful. The icon appears if the operationfails; verify that the settings are correct, and try again.

Adding and Copying Alerts

You can create alerts for a single site ID or all site IDs and select alert actions from theconfigured action sets in the Alert Setup portlet. You can create different alerts to monitordifferent conditions for each site ID depending on the purpose of the site ID, such asproduction, development, and so on. If you want alerts to monitor the same conditions onany of the site IDs, you can create alerts for all sites.

1 From the SITE IDS list, do one of the following:• Click All for alerts on all sites.• Click a site ID for alerts on a single site.

2 From the ALERTS list, do one of the following:

Chapter 2 System Administration

48 Teradata Alerts User Guide, Release 14.01

Page 49: Teradata Alert

• Click to add an alert.• Click in the row of the alert you want to copy.• Click the name of the alert you want to edit.

3 Enter a name for the alert.

4 [Optional] Select the Enabled check box to enable the alert.

5 Under Alert Rules, do the following:

a Select the scope of the alert rule.• All means that all of the listed conditions must be met.• Any means that any of the listed conditions can be met.

b Select a metric from the list and enter a threshold value.You can add or remove rules.

c [Optional] Select the Notify again if alert updates check box to be notified if thealert is updated.

6 Under Alert Action, do the following:

a Select an alert action from the list.

b Enter a limit for Do not run twice in a number of minutes.The alert action does not run more than once during the time span you entered.

7 [Optional] Under Message, enter a message that appears when the alert action executes.

8 Click Apply.

The icon appears if the operation is successful. The icon appears if the operationfails; verify that the settings are correct, and try again.

Disabling Alerts

Disabling an alert makes it temporarily unavailable, while maintaining the configuredsettings. You can enable the alert as needed.

1 From the SITE IDS list, do one of the following:• Click All for alerts on all sites.• Click a site ID for alerts on a single site.

2 Under ALERTS, select the alert name.

3 Clear the Enabled check box.

4 Click Apply.

The icon appears if the operation is successful. The icon appears if the operationfails; verify that the settings are correct, and try again.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 49

Page 50: Teradata Alert

Deleting Alerts

1 From the SITE IDS list, do one of the following:• Click All for alerts on all sites.• Click a site ID for alerts on a single site.

2 Under ALERTS, select the alert name.

3 Click in the row of the alert you want to delete.

A confirmation message appears.

4 Click OK.

The alert row disappears.

Alerts in Teradata SystemsThe Teradata Systems portlet allows the Teradata Viewpoint Administrator to add, delete,copy, and configure alert triggers for the alert service settings from the Alert Setup portlet.

Alerts

Alerts monitor the performance of a system and automatically take action when eventsoccur. You can add, copy, and configure alerts, as well as migrate Teradata Manager alerts.

You can activate alert actions that send a notification, or take some other type of action,when a metric exceeds a threshold.

After you add alert action sets in the Alert Setup portlet, they appear in the TeradataSystems portlet.

The types of alert actions you can choose are:

Send an Email

Choose a defined email address and text message. Event information, such as date,time, event name, threshold, and actual value, is automatically added to the body ofthe email message.

Run a Program

Choose a program to execute (.exe).

Run a BTEQ Script

Choose a BTEQ script.

Run a SQL Query

Choose a SQL query.

Notify SNMP System

Choose an SNMP trap.

Chapter 2 System Administration

50 Teradata Alerts User Guide, Release 14.01

Page 51: Teradata Alert

You can also choose one of the following alert actions for Teradata Database session alert-types:

Abort Session

Abort the session for which an alert was detected. This action is only available forsessions.

Lower Priority

Set the priority of the session for which an alert was detected to the one specified inthe New priority for lower priority action text box, located under Data Collectorssetup for Sessions.

Alert Types

You can set alerts that take place when performance or database space events occur on oneor more systems.

TeradataDatabase SystemAlert Type

Description

System Set an alert to occur when the performance on a Teradata Database reaches thespecified threshold.

Node Set an alert to occur when the performance on a Teradata Database reaches thespecified threshold at the node level.

Vproc Set an alert to occur when the performance on a Teradata Database reaches thespecified threshold at the vproc level.

Database Space Set an alert to occur when the space used on any resource, such as an AMP,exceeds the specified percentage.

Session Set an alert to occur when the performance on a Teradata Database reaches thespecified threshold at the session level.

Canary Queries Set an alert to occur when the response time for a canary query exceeds thethreshold.

System Health Set an alert to occur when the system health of a Teradata Database reaches thespecified level.

Data Collectors Set an alert to occur when any errors are encountered by the DCS for thespecified data collectors.

Teradata AsterSystem Alert Type

Description

System Set an alert to occur when the performance on Teradata Aster reaches thespecified threshold.

Node Set an alert to occur when the performance on Teradata Aster reaches thespecified threshold at the node level.

Process Set an alert to occur when the performance on Teradata Aster reaches thespecified threshold at the process level.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 51

Page 52: Teradata Alert

Teradata AsterSystem Alert Type

Description

System Health Set an alert to occur when the system health of Teradata Aster reaches thespecified level.

Data Collectors Set an alert to occur when any errors are encountered by the DCS for thespecified data collectors.

Teradata Database Alert Metrics and Properties

These metrics are available for Teradata Database alerts. The associated property names allowyou to customize alert actions in the Alert Setup portlet.

The metrics that you can specify in the System dialog box for alerts are listed below.

Metric Description Property Name

Node CPU Usage Average percent of CPU usage of all online nodesin the configuration

aveNodeCpuUsage

Node Disk Usage Average percent of disk usage of all online nodesin the configuration

aveNodeDiskUsage

Net A Usage Total BYNET utilization (average of the onlineBYNETs)

netAUse

AMP CPU Usage Average percent of CPU usage of all online AMPsin the configuration

aveAmpCpuUsage

PE CPU Usage Average percent of CPU usage of all online PEs inthe configuration

avePeCpuUsage

Node CPU Skew Comparison of CPU use on the busiest node tothe average node

nodeCpuSkew

AMP CPU Skew Comparison of CPU use on the busiest AMP tothe average AMP

ampCpuSkew

Total Sessions Total number of logged on sessions totalSessions

Blocked Sessions Total number of blocked sessions blockedSessions

The metrics that you can specify in the Node dialog box and Vproc dialog box for alerts arelisted below.

Metric Description Property Name

Id ID of the process

Note: Not available in the dialog box.

procId

Node ID ID of the node

Note: Not available in the dialog box.

nodeId

Vproc Number Number of the vproc

Note: Not available in the dialog box.

vprocNo

Chapter 2 System Administration

52 Teradata Alerts User Guide, Release 14.01

Page 53: Teradata Alert

Metric Description Property Name

Status Status of the node, where U means the resource isup and D means the resource is down

status

CPU Usage Percent of CPU usage that is not idle (includessystem CPU and user CPU)

cpuUse

Disk Usage Percent of disk usage for this resource diskUse

Net A Usage Total BYNET utilization (average of the onlineBYNETs)

netAUse

CIC Usage Percent of Channel Interface Controller usage forthis resource

cicUse

Disk Out Req Avg Average number of outstanding disk requests forthis resource

diskOutReqAvg

Disk I/O Number of disk I/Os diskIO

Host I/O Number of host I/Os hostIO

Swaps Total number of swap reads and swap writes swaps

Mem Failures Segment allocation attempts that failed memFailures

Node CPU Usage Average percent of CPU usage of all online nodesin the configuration

aveNodeCpuUsage

Node Disk Usage Average percent of disk usage of all online nodesin the configuration

aveNodeDiskUsage

Net A Use Total BYNET utilization (BYNET receiver usage) systemNetAUse

Node CPU Skew Comparison of CPU use on the busiest node tothe average node

nodeCpuSkew

Total Sessions Number of sessions logged on to the PE sessLogCount

Available AWT Total available AMP worker tasks availableAWTCount

Message Count Messages waiting on the vproc msgCount

AMP CPU Usage Average percent of CPU usage of all online AMPsin the configuration

aveAmpCpuUsage

PE CPU Usage Average percent of CPU usage of all online PEs inthe configuration

avePeCpuUsage

AMP CPU Skew Comparison of CPU use on the busiest AMP tothe average AMP

ampCpuSkew

The metrics that you can specify in the Database Space dialog box for alerts are listed below.

Metric Description Property Name

Database Name Name of the database

Note: Not available in the dialog box.

databaseName

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 53

Page 54: Teradata Alert

Metric Description Property Name

Current Perm % Percentage of the total permanent disk space thedatabase is currently using (Current Permdivided by Max Perm)

spaceUsedPct

Current Perm Max % Current Perm Max * Number of Vprocs / MaxPerm

maxSpaceUsedPct

The metrics that you can specify in the Table Space dialog box for alerts are listed below.

Metric Description Property Name

Current Perm Amount of permanent disk space theDBC.TransientJournal table is currently using

totalSize

Skew Percentage of uneven distribution of disk spaceused for the DBC.TransientJournal table acrossall AMPs

skewPct

The metrics that you can specify in the Session dialog box for alerts are listed below.

Metric Description Property Name

Session Number Number of the session

Note: Not available in the dialog box.

sessionNo

User User of the session

Note: Not available in the dialog box.

userName

Host ID Host ID or LAN ID associated with the PE thatprocessed the logon request for the session

hostId

Account Account from which a query was submitted userAccount

CPU Skew CPU skew during the last sample cpuSkew

CPU delta Total CPU usage time consumed, in seconds,since the last sample

deltaCPU

AMP CPU Current elapsed CPU time, in seconds, used onall AMPs by the associated session for executingrequests

ampCPUSec

AMP I/O Current number of logical Reads and Writesissued across all AMPs by the associated session

ampIO

Request AMP CPU Current elapsed CPU time, in seconds, used onall AMPs by the current request

requestAmpCPU

Request AMP I/O Current number of logical Reads and Writesissued across all AMPs by the current request

requestAmpIO

Hot AMP CPU CPU time of the highest CPU utilized AMPduring the collection interval

hotAmp1CPU

Connection Time How long the session has been connected timeLoggedOn

Blocked Time How long the query has been blocked blockedTime

Chapter 2 System Administration

54 Teradata Alerts User Guide, Release 14.01

Page 55: Teradata Alert

Metric Description Property Name

Idle Time How long the query has been idle idleTime

Sessions Per User Number of sessions logged on under thisusername

sessionsForUser

Partition Partition to which the session is connected (SQL,CONSOLE, MONITOR)

partName

Utility Session Session from one of the Teradata utilities,indicated by True and False

utility

Blocked SessionNumber 1

Session ID of the first blocked query blk1SessNo

Blocked User Name 1 Name of the user running the first blocked query blk1Username

Blocked SessionNumber 2

Session ID of the second blocked query blk2SessNo

Blocked User Name 2 Name of the user running the second blockedquery

blk2Username

Blocked SessionNumber 3

Session ID of the third blocked query blk3SessNo

Blocked User Name 3 Name of the user running the third blocked query blk3Username

The metrics that you can specify in the Canary Queries dialog box for alerts are listed below.

Metric Description Property Name

Canary ID ID of the canary query canaryId

Query Name Name of the query queryName

Login TimeoutOccurred

Timeout for the login, indicated by True andFalse

loginTimeoutOccurred

Response Time Number of milliseconds it took for the canaryquery to return a response

responseTime

The metrics that you can specify in the System Health dialog box for alerts are listed below.

Metric Description Property Name

Health Name of the system health state health

Teradata Aster Alert Metrics and Properties

These metrics are available for Teradata Aster alerts. The associated property names allowyou to customize alert actions in the Alert Setup portlet.

The metrics that you can specify in the System dialog box for alerts are listed below.

Metric Description Property Name

CPU Average node CPU use cpu

Memory Available amount of memory used by node memory

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 55

Page 56: Teradata Alert

Metric Description Property Name

Node CPU Skew Comparison of CPU use on the busiest node tothe average node

nodeCpuSkew

Node I/O Skew Comparison of I/O use on the busiest node to theaverage node

nodeIoSkew

Replication Factor Number of copies of user data replicationFactor

Active Processes Number of processes with active queries activeSessions

The metrics that you can specify in the Node dialog box for alerts are listed below.

Metric Description Property Name

State State of the node status

Type Values for node types as follows:• Worker nodes hold the data and process the

queries• Queen nodes manage the process, including

the performance of the other nodes anddelegation of queries

• Loader nodes transfer data in and out ofvirtual workers

type

CPU Amount of available processing power used bythe node

cpuUse

Memory Memory used on the node memUse

Network In Rate of network traffic into the node in bytes persecond

netIn

Network Out Rate of network traffic out of the node in bytesper second

netOut

Disk In Rate of disk traffic into the node in bytes persecond

diskWrite

Disk Out Rate of disk traffic out of the node in bytes persecond

diskRead

% Disk Full Percent of used disk space on the node. Includesuser data, replica data, and system data

percentFull

The metrics that you can specify in the Process dialog box for alerts are listed below.

Metric Description Property Name

User Name of the user who submitted the process userName

Database Name of the database on which the process ran dbName

Duration How long the process ran processExecutionTime

Migrating Alerts

After a Teradata Database system has been configured in Teradata Viewpoint, all of the alertsexcept event alerts can be migrated from Teradata Manager to Teradata Viewpoint.

Chapter 2 System Administration

56 Teradata Alerts User Guide, Release 14.01

Page 57: Teradata Alert

Configured rates cannot be migrated. You must configure data collection rates in TeradataViewpoint.

Alerts can only be migrated when there are no alerts in Teradata Viewpoint for a TeradataDatabase system; therefore, migrate existing Teradata Manager alerts before adding andcopying alerts.

1 From the SYSTEMS list, click the name of the system you want to update.

2 From the SETUP list, click Alerts.

3 From the ALERT TYPES list, click an alert type.

4 Under ALERTS, click Migrate Alerts.

5 Enter the log on information for an account that has permission to read data from themigrating database.

6 Select an Authentication Mechanism for the migrating database.

7 [Optional] Under SNMP Config, select the SNMP configuration that you assigned toany migrated action sets containing an SNMP action.This is required when the alert actions being migrated contain any SNMP actions. TheSNMP configurations are defined in the Alert Setup portlet.

8 Click Apply.

A message appears in the dialog box with the number of alerts that were migrated.

Adding and Copying Alerts

After you configure a system in Teradata Viewpoint, you can add an alert. Available alerttypes differ depending on the type of system you choose.

Because you can only migrate alerts when no alerts currently exist in Teradata Viewpointfor a Teradata Database system, migrate existing Teradata Manager alerts before adding andcopying alerts.

1 From the SYSTEMS list, click the name of the system you want to update.

2 From the SETUP list, click Alerts.

3 From the ALERT TYPES list, click an alert type.

4 From the ALERTS list, do one of the following:• Click to add an alert.• Click in the row of the alert you want to copy.• Click the name of the alert you want to edit.

5 Enter a name for the alert.

6 [Optional] Select the Enabled check box to enable the alert.

7 Under Alert Rules, do the following:

Alert Type Trigger

• System a. Select a scope to apply to the defined rules.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 57

Page 58: Teradata Alert

Alert Type Trigger

• Node• Process• Vproc• Canary

Queries

• All applies all of the defined alert rules.

• Any applies one defined alert rule, depending on which rule firstmeets criteria in the definition.

b. Select a metric from the list and enter a threshold value.You can add or remove rules.

c. [Optional] Enter the number of minutes in the Only trigger if alertrule(s) are met for box.

The alert triggers if the rule is true for the number of minutes that youentered.

• Session a. Select a scope to apply to the defined rules.• All applies all of the defined alert rules.

• Any applies one defined alert rule, depending on which rule firstmeets criteria in the definition.

b. Select a metric from the list and enter a threshold value.If you set up an alert rule whose only condition is Sessions per User, onlyuserName and sessionsForUser metrics are available when customizingTeradata Alerts alert actions.

You can add or remove rules.c. [Optional] Enter the name of one or more users to exclude from

receiving the alert.You can add or remove users.

• DatabaseSpace

a. [Optional] Select the scope of databases that the alert rule applies to.• All databases includes all databases.

• All databases except excludes one or more databases that you specify.

• Only include databases includes one or more databases that youspecify.

You can add or remove databases from the scope.b. Select a metric from the menu and enter a threshold value.

The alert triggers if the metric exceeds the value that you enter.

• Table Space a. [Optional] Enable and enter a value for one or more of the following forthe DBC.TransientJournal table:• Current Perm is the amount of total permanent disk space the table

is currently using.

• Skew is the percentage of uneven distribution of disk space used forthe table across all AMPs.

The alert triggers if the metric exceeds the value that you entered.

• SystemHealth

a. Select a health level from the Trigger if system health is this level orworse list.

Chapter 2 System Administration

58 Teradata Alerts User Guide, Release 14.01

Page 59: Teradata Alert

Alert Type Trigger

b. [Optional] Enter the number of minutes in the Only trigger if alertrule(s) are met for box.

The alert triggers if the rule is true for the number of minutes that youentered.

• DataCollectors

a. Select one or more data collectors from the Available box.b. Click to move them to the Selected box.

The alert triggers if any errors are encountered by the DCS for theselected data collectors.

8 Under Alert Action, do the following:

a Select an alert action from the list.

b Enter a limit for Do not run twice in a number of minutes.The alert action does not run twice during the minutes that you entered. The alertaction does not run more frequently than the data collector SAMPLE RATE.

c [Optional] For session alerts only, select one of the following check boxes:• Abort Session

This aborts the Teradata Database session after performing the selected alertaction.

• Lower Priority

This modifies the priority level for the Teradata Database session whileperforming the selected alert action. The priority level is configured in the Sessiondata collector under New priority for Lower Priority action.

9 Under Severity, select a severity from the menu.

10 [Optional] Under Message, enter a message that appears when the alert action executes.

11 Click Apply.

The icon appears if the operation is successful. The icon appears if the operationfails; verify that the settings are correct, and try again.

Copying Alerts Between Systems

You can copy all alerts, except canary query alerts, from one system to another compatiblesystem.

Note: Alerts with duplicate names are overwritten in the target system.

1 From the SYSTEMS list, click the system from which you want to copy alerts.

2 From the SETUP list, click next to Alerts.

3 Do one of the following:• Select a target system.• Select multiple target systems with Shift or Ctrl.

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 59

Page 60: Teradata Alert

4 Click Copy.

Deleting Alerts

An alert can be deleted any time after it has been added to a system.

1 From the SYSTEMS list, click the name of the system you want to update.

2 From the SETUP list, click Alerts.

3 From the ALERT TYPES list, click an alert type.

4 Under ALERTS, select the alert name.

5 Click in the row of the alert you want to delete.

A confirmation message appears.

6 Click OK.

The alert row disappears.

About Alerts in Teradata DatabaseTeradata Database can leverage Teradata Alerts for use with your own applications or toprocess rules violations in Teradata Workload Management. You can invoke alerts byinserting rows in the following tables:

Alert Request

The dbcmngr.AlertRequest table can monitor incoming alert requests. The AlertRequest data collector forwards the row contents to the alert service for processing ifthe inserted row contains valid data.

Monitor Request

The dbcmngr.MonitorRequest table can monitor progress for any Teradata Databaseutility or program. The Alert Request data collector forwards the row contents to thealert service for processing if the job finished before the specified date and time.

If your alert actions use SNMP, the Teradata Viewpoint Administrator or Teradata SystemAdministrator must select Default for Alert Request Collector in the SNMP configurationunder SETUP OPTIONS>Delivery Settings>DELIVERY TYPES>SNMP.

You can view the details of the alert request from the Alert Request data collector in theAlert Viewer portlet.

Request an Email Alert

In the following example, the SQL statement inserts values into the dbcmngr.AlertRequesttable. The action sends an email message to the DBA and does not repeat for 20 minutes.

INSERT dbcmngr.alertrequest VALUES (date, time, 'Job1', 'Load job completed', 0, 'E', 20, '[email protected]','This message indicates that the load job completed!');

Chapter 2 System Administration

60 Teradata Alerts User Guide, Release 14.01

Page 61: Teradata Alert

Monitor a Five-Minute Job

In the following example, a job takes five minutes to complete, but lock conflicts preventexecution, add steps before and after the job execution.

Before the job, run the following SQL statement:

INSERT dbcmngr.monitorrequest SELECT '20010523100142011234', date, monTime, 'My Job', 0, '+', 'Email Admin', '' FROM (SELECT EXTRACT(hour FROM xt)*10000+EXTRACT(minute FROM xt)*100+EXTRACT(second FROM xt), (current_time+interval '10' minute) AS xt) t1(monTime, xt);

After the job, run the following SQL statement:

INSERT dbcmngr.monitorrequest VALUES ('20010523100142011234', date, time, 'My Job', 0, '0', '', '');

The Alert Request data collector requests the alert action 'Email Admin' if the job doesnot finish within ten minutes.

Monitor a Long-Running Job

In the following example, the Alert Request data collector sends updated statusinformation on long-running jobs. The job uses date and time when inserting into thedbcmngr.MonitorRequest table. This forces the designated alert action to run. Use theEventValue or Message fields to indicate current status.

In the following SQL example, [email protected] receives email messages that reporton the progress of a large load job after 150000 rows have loaded. You run the job atregular intervals. Each time that the job inserts a row, it also inserts the latest row countin the EventValue column.

INSERT dbcmngr.monitorrequest VALUES ('20010523100142011234', date, time, 'Load Job', 150000, 'E', '[email protected]', '');

AlertRequest Table

The following table provides information on the columns, data types, and field descriptionsfor the AlertRequest table.

Column Type Description Possible Values

ReqDate DATE Request dategenerated on theTeradata Database

ReqTime INTEGER Request timegenerated on theTeradata Database

JobName CHAR(60) Name of therequesting job

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 61

Page 62: Teradata Alert

Column Type Description Possible Values

Description CHAR(120) Text description ofthe event, that is, thereason for the alert

Event Value INTEGER Event value (ifappropriate)

Note: Event Value is null ifthe value is unknown orcannot be represented as asingle numeric value.

ActionCode CHAR(1) Type of action beingrequested

'E' - Send an email'L' - Write a log entry'R' - Run a program'S' - Send an SNMP trap'T' - Run a BTEQ script'+' - Run an action set orgroup

RepeatPeriod SMALLINT Minimum time (inminutes) betweenalerts for this event

0 - Always run the alert.

This value is ignored if thevalue of ActionCode is '+'.

Destination CHAR(120) Indicates thedestination based onthe ActionCode

'E' - The email address'R' - The program name torun'T' - The BTEQ script to run'S' - Ignored. Uses the defaultSNMP configuration forAlert Request Collector'+' - The Action Set or Groupaction to run

Message VARCHAR(600) Message to send forthis alert

For example, you can senduse an email message ornumeric page and callbacknumber as the Message.

MonitorRequest Table

The following table provides information on the columns, data types, and field descriptionsfor the MonitorRequest table.

Column Type Description Possible Values

MonitorId CHAR(60) A unique ID for thejob.

Recommended ID values:DateStartTimeHost IDSession ID

Chapter 2 System Administration

62 Teradata Alerts User Guide, Release 14.01

Page 63: Teradata Alert

Column Type Description Possible Values

ActionDate DATE Insert the next rowfor this job before thedate specified inActionDate.

ActionTime INTEGER Insert the next rowfor this job before thetime specified inActionTime

JobName CHAR(60) Name of therequesting job

EventValue INTEGER A value to display inthe Alert Viewerportlet, or included inthe alert action.

For example, if monitoring aload job, you can use thenumber of rows inserted sofar as the EventValue.

ActionCode CHAR(1) Type of action beingrequested.

'E' - Send an email'L' - Write a log entry'R' - Run a program'S' - Send an SNMP trap'T' - Run a BTEQ script'+' - Run an action set orgroup'0' - The job completed, thatis, no alert ran.

Destination CHAR(120) Indicates thedestination based onthe ActionCode.

'E' - The email address'R' - The program name torun'T' - The BTEQ script to run'S' - Ignored. Uses the defaultSNMP configuration forAlert Request Collector'+' - The Action Set or Groupaction to run

Message VARCHAR(600) Message to be sent forthis alert

Chapter 2 System Administration

Teradata Alerts User Guide, Release 14.01 63

Page 64: Teradata Alert

Chapter 2 System Administration

64 Teradata Alerts User Guide, Release 14.01

Page 65: Teradata Alert

CHAPTER 3

Alert Viewer

Alert ViewerThe Alert Viewer portlet allows users to view alerts defined for the system. The alertinformation in the summary view is updated every 30 seconds. Every alert has a time stamp,displaying the date and time at which the alert was issued.

About Alerts

An alert is an event that the Teradata System Administrator defines as being significant. TheTeradata System Administrator assigns alert severity levels to rank alerts, and can alsoinclude an explanatory message. The severity levels are critical, high, medium, or low. Thealerts displayed in the Alert Viewer portlet are specific to your system.

Alert Example

The Teradata System Administrator can define that a database exceeding a certainamount of storage usage triggers an alert. After the usage level is exceeded, an alertappears in the Alert Viewer portlet to inform the portlet user that the threshold wasexceeded.

About the Alert Viewer View

The ALERT VIEWER view displays detailed information about what triggered the alert, thesource of the alert, and any relevant messages. You can filter the alerts by severity, timeperiod, type, or name. You can also combine the filters to narrow the results further.

Severity Filter Bar

Displays a count of the alerts for each severity. Click any severity in the bar tochange the displayed data in the summary table to only show the alerts of thatseverity.

Time Period Sets the time period for the alerts in the Severity Filter Bar.

Filters

Displays data by showing only rows that match your filter criteria. Sort on thecolumn headers to group data in ascending or descending order.

Teradata Alerts User Guide, Release 14.01 65

Page 66: Teradata Alert

Summary Table

Displays summary information about alerts in columns. The current view isconfigured in the Columns dialog box. The view is refreshed every 30 seconds. Clicka row in the table to see details.

Table Actions

Clear Filters removes any content in the filter boxes.Configure Columns allows you to choose the columns to display and setthresholds.Export creates a .csv file containing all available data. If filters are used, only filtereddata is exported.

About Filters and Sorting

Filters allow you to display only rows that match your filter criteria. You can narrow thesearch further by filtering on multiple columns. Use greater than or less than symbols whenfiltering columns with numeric values. When using these symbols, exact matches may notproduce the expected results due to rounding of numbers containing decimals.

Sorting allows you to change the order of rows in a table based upon criteria in a column andapplies across all pages of the table. Sort on a column by clicking the column header. Asecond click toggles the sort order. You can sort on two columns consecutively using Ctrl+Click in the column header. Primary sort order is indicated by a single arrow, andsecondary sort order is indicated by a double arrow.

The filtering, sorting, and page number settings that you choose for the default or minimizedview are not used when you switch to the maximized view.

Chapter 3 Alert Viewer

66 Teradata Alerts User Guide, Release 14.01

Page 67: Teradata Alert

Filtering by Severity

You can filter the results to show only alerts with a specific severity level.

1 In the toolbar, click the button for the severity level you want to display.

Selecting a Time Period

You can filter the results to show alerts issued within the last 5 minutes, 1 hour, 1 day, or 1week.

1 Select a time period from the list.

Filter Symbols

Use wildcard characters or symbols in a filter to expand or limit search criteria. Somesymbols are used for string filtering and others are used for numeric filtering. String filtersare not case sensitive and an asterisk wildcard is applied to the end of the filter string.

Wildcard orSymbol Description Example Results

? Use this wildcard character to match alpha or numericcharacters in the position it occupies. Type this wildcardcharacter at the beginning, middle, or end of your search.This wildcard character can be used more than once in thesame search.

This wildcard character can be used in conjunction withany other symbol.

cat?

?cat

cat?l

cat???

p???er

cats, catalog

scat, Scatter

catalog

catalog

packer, parser, proper

* Use this wildcard character to match zero, one, or multiplealpha or numeric characters in the position it occupies.Type this symbol at the beginning, middle, or end of yoursearch. This wildcard character can be used more than oncein the same search.

This wildcard character can be used in conjunction withany other symbol.

*cat

cat*l

cat*

*ews*er

*%

cat, cats, catalog, scatter, wildcat

catalog

cat, cats, catalog

newscaster, newspaper

what is 100%?

= Use this symbol at the beginning of your search to matchalpha or numeric characters literally. The search results arecase-sensitive.

This symbol can be used in conjunction with * and ?.

=CAT

=cat?

=Cat*

=Cat_

=Cat\?

CAT

cats

Cat, Cats, Catalog

Cat_

Cat?

\ Use this symbol in front of a wildcard character so thewildcard is interpreted as a regular character and not as awildcard.

This symbol can be used in conjunction with *, ?, and \.

*\?

=cat\*

cat\?

what is 100%?

cat*

cat?, Cat?

> Use this symbol to match any number that is greater thanthe specified value. This symbol is only used to performmathematical comparisons.

>60 61, 62, 70, 500, and so forth

Chapter 3 Alert Viewer

Teradata Alerts User Guide, Release 14.01 67

Page 68: Teradata Alert

Wildcard orSymbol Description Example Results

For columns containing percentages, avoid using % in thefilter. Type only > and the number.

>= Use these symbols in conjunction to match values greaterthan or equal to the specified number.

For columns containing percentages, avoid using % in thefilter. Type only >= and the number.

>=60 60, 61, 62, 70, 500, and so forth

< Use this symbol to match any number that is less than thespecified value. This symbol is only used to performmathematical comparisons.

For columns containing percentages, avoid using % in thefilter. Type only < and the number.

<60 59, 58, 50, 8, and so forth

<= Use these symbols in conjunction to match values less thanor equal to the specified number.

For columns containing percentages, avoid using % in thefilter. Type only <= and the number.

<=60 60, 59, 58, 50, 8, and so forth

! Use this symbol at the beginning of your search to matchalpha or numeric characters that do not contain the alphaor numeric characters.

This symbol can be used in conjunction with any othersymbol or wildcard character.

!cat33 cat32, cat34, and so forth

Clearing Filters

You can clear the filter box values from the table.1 Do one of the following:

Option Description

Clearindividualfilter boxes

a. Click on the filter box.

Clear allfilter boxes

a. Select Clear Filters at the bottom of the portlet.

Configuring Columns to Display

Use the Columns dialog box to select, lock, and order columns. You can resize columns inthe table. The column selection, order, and lock settings that you choose are applied to theminimized and maximized views separately.1 Click in the table header and select Configure Columns.

2 In the Columns dialog box, select the check boxes of columns to display.

Chapter 3 Alert Viewer

68 Teradata Alerts User Guide, Release 14.01

Page 69: Teradata Alert

Mouse over the name to see the complete name.

3 [Optional] Click next to the column name.The columns at the top of the list can be locked in the table to remain on the left whenscrolling horizontally.

4 [Optional] Click and drag the row to reorder the column.

5 Click Apply to save the changes.

6 [Optional] In the table, drag the column heading border in either direction to resizethe column.

Exporting Table Data

You can export data to a .csv file for further analysis and formatting. The exported .csv filecontains all available data. If filters are used, only filtered data is exported. The format for thetime, date, and some numeric values differs in the view and exported .csv file.

1 Click in the table header and select Export.

2 Save the file using the browser options.

The file is saved to your download area or to a location that you specify, depending onthe browser settings.

Viewing Alert Details

The ALERT DETAILS view displays details about a specific alert. The details include adescription, message, resulting action, and any alert properties associated with the alert. Ifthe alert source is Viewpoint, the following fields appear:• Alert Type. The system action defines the alert type.• Resulting Action. The Teradata Viewpoint Administrator defines the resulting action in

Teradata Systems Alerts.

1 In the summary view, click anywhere in a row to display the ALERT DETAILS view forthat alert.

2 Click Previous/Next to view the details for each alert without returning to thesummary view.

Chapter 3 Alert Viewer

Teradata Alerts User Guide, Release 14.01 69

Page 70: Teradata Alert

Chapter 3 Alert Viewer

70 Teradata Alerts User Guide, Release 14.01