Download Teradata Alerts User Guide - Teradata

Document related concepts

Microsoft Jet Database Engine wikipedia , lookup

SQL wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Clusterpoint wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

PL/SQL wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
Teradata Alerts
User Guide
Release 14.10
B035-2210-053K
May 2013
The product or products described in this book are licensed products of Teradata Corporation or its affiliates.
Teradata, Active Data Warehousing, 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, The Best Decision Possible, WebAnalyst, and Xkoto are trademarks or registered trademarks of Teradata
Corporation or its affiliates in the United 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 Software
Foundation 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, Axeda
Access, Axeda Software Management, Axeda Service, Axeda ServiceLink, and Firewall-Friendly are trademarks and Maximum Results and
Maximum 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 other
countries.
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 the
United 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 States
and 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 express
or 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 no
event will Teradata Corporation be liable for any indirect, direct, special, incidental, or consequential damages, including
lost 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 are
not 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 or
updated without notice. Teradata Corporation may also make improvements or changes in the products or services described in this
information 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 this
document. Please e-mail: [email protected]
Any comments or materials (collectively referred to as "Feedback") sent to Teradata Corporation will be deemed non-confidential. Teradata
Corporation 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 purpose
whatsoever, including developing, manufacturing, or marketing products or services incorporating Feedback.
Copyright © 2011 - 2013 by Teradata Corporation. All Rights Reserved.
Table of Contents
Preface.............................................................................................................................................................7
Changes to This Book...........................................................................................................................................7
Related Documentation.......................................................................................................................................7
Chapter 1:
Overview........................................................................................................................................................9
Introduction to Teradata Alerts.........................................................................................................................9
Alerts Integration..........................................................................................................................................9
Alert Configuration Workflow..................................................................................................................10
Chapter 2:
Alert Setup.................................................................................................................................................13
Introduction to Alert Setup...............................................................................................................................13
Delivery Settings..........................................................................................................................................13
Adding a Login Account.....................................................................................................................13
Defining Alert Retention.....................................................................................................................14
Defining Email Configuration............................................................................................................15
Adding SNMP Configurations...........................................................................................................16
Adding SQL Query Configurations...................................................................................................17
Configuring BTEQ Script Settings.....................................................................................................18
Teradata Manager Alert Migration.....................................................................................18
Configuring User Program Settings..................................................................................................19
Disabling Alert Configurations..........................................................................................................20
Deleting Alert Configurations............................................................................................................21
Alert Presets.................................................................................................................................................21
About Core Hours................................................................................................................................21
Setting Core Hours..............................................................................................................................22
Adding and Editing Action Sets.........................................................................................................22
Adding and Editing Groups...............................................................................................................24
Example: Different Alert Actions for Weekday and Weekend Hours...........................25
Example: Managing Email Alert Recipients......................................................................25
Deleting Action Sets or Groups.........................................................................................................25
Teradata Alerts User Guide, Release 14.10
3
Table of Contents
Alert Exceptions...........................................................................................................................................26
Configuring Alert Exceptions..............................................................................................................26
Alert Properties.............................................................................................................................................26
SNMP Overview...........................................................................................................................................27
Teradata Alerts SNMP MIB File.........................................................................................................27
SNMP Configurations..........................................................................................................................28
Viewpoint SNMP Alerts.......................................................................................................................28
Server Management SNMP Alerts......................................................................................................28
Alert Request Data Collector Alerts...................................................................................................29
Workload Designer SNMP Alerts.......................................................................................................29
Alert Configuration Examples....................................................................................................................30
Customizing Email Alerts Example....................................................................................................30
Alert Property Syntax....................................................................................................................31
Example: Custom Email Alerts.............................................................................................31
SNMP Trap Example............................................................................................................................33
Example: SNMP Trap.............................................................................................................33
BTEQ Script...........................................................................................................................................36
Example: BTEQ Script...........................................................................................................36
SQL Queries Example...........................................................................................................................38
Example: SQL Queries...........................................................................................................38
Run a Program Example......................................................................................................................41
Example: Run User Program.................................................................................................41
Adding Alert Properties as Arguments to the Run a Program Example.......................................43
Example: Adding Alert Properties to a Program................................................................44
Check Logon Timeout with Canary Query Example.......................................................................46
Example: Canary Query Logon Timeout............................................................................46
Teradata MSM Alert Example.............................................................................................................49
Example: Teradata MSM Alert.............................................................................................49
Workload Designer Alert Example.....................................................................................................52
Example: Workload Designer Alert.....................................................................................52
Chapter 3:
Alerts in Server Management..................................................................................................55
Server Management.............................................................................................................................................55
About Alerts in Server Management.........................................................................................................55
Alert Properties.............................................................................................................................................56
Adding Site IDs.............................................................................................................................................57
Adding and Copying Alerts........................................................................................................................57
Disabling Alerts............................................................................................................................................59
Deleting Alerts..............................................................................................................................................59
4
Teradata Alerts User Guide, Release 14.10
Table of Contents
Customizing Email Alerts for Server Management Example...........................................................................59
Example: Creating an Email Message for Critical Server Management Alerts......................................59
Enabling SNMP Traps in Server Management Example..................................................................................61
Example: Configuring SNMP Traps in Server Management....................................................................61
Chapter 4:
Alerts in MSM Setup....................................................................................................................................65
MSM Setup.....................................................................................................................................................................65
Adding an Alert Action to an Action Set............................................................................................................65
Alert Properties................................................................................................................................................66
Action Properties....................................................................................................................................................66
Adding a Script Action..........................................................................................................................................67
Adding a State Change Action..............................................................................................................................68
Editing an Action....................................................................................................................................................68
Deleting an Action..................................................................................................................................................69
Chapter 5:
Alerts in Teradata Systems..................................................................................................................71
Alerts in Teradata Systems...........................................................................................................................................71
Alerts........................................................................................................................................................................71
Alert Types..............................................................................................................................................................72
Teradata Database System Alert Types........................................................................................................72
Teradata Aster System Alert Types...............................................................................................................73
Teradata Hadoop System Alert Types..........................................................................................................73
Teradata Database Alert Metrics and Properties...............................................................................................73
Metrics for Node and Vproc Alert Types....................................................................................................73
Metrics for Database Space Alert Types.......................................................................................................75
Metrics for Session Alert Types.....................................................................................................................75
Metrics for System Alert Types.....................................................................................................................76
Metrics for System Health Alert Types........................................................................................................77
Metrics for Table Space Alert Types.............................................................................................................77
Metrics for Canary Queries Alert Types......................................................................................................77
Teradata Aster Alert Metrics and Properties......................................................................................................77
Metrics for Node Alert Types........................................................................................................................77
Metrics for Process Alert Types.....................................................................................................................78
Metrics for System Alert Types.....................................................................................................................78
Teradata Hadoop Alert Metrics and Properties.................................................................................................79
Metrics for HDFS Alert Types.......................................................................................................................79
Metrics for MapReduce Alert Types.............................................................................................................79
Metrics for System Alert Types.....................................................................................................................80
Teradata Alerts User Guide, Release 14.10
5
Table of Contents
Migrating Alerts............................................................................................................................................80
Adding and Copying Alerts........................................................................................................................81
Copying Alerts between Systems...............................................................................................................84
Deleting Alerts..............................................................................................................................................84
Chapter 6:
Alert Administration in Teradata Database..............................................................85
About Alerts in Teradata Database...................................................................................................................85
AlertRequest Table.......................................................................................................................................86
MonitorRequest Table.................................................................................................................................87
Chapter 7:
Alert Viewer...............................................................................................................................................89
Alert Viewer.........................................................................................................................................................89
About Alerts..................................................................................................................................................89
About the Alert Viewer View ....................................................................................................................89
About Filters and Sorting............................................................................................................................90
Filtering by Severity..............................................................................................................................90
Selecting a Time Period........................................................................................................................91
Filter Symbols........................................................................................................................................91
Clearing Filters......................................................................................................................................92
Configuring Columns to Display........................................................................................................92
Exporting Table Data............................................................................................................................93
Viewing Alert Details...................................................................................................................................93
6
Teradata Alerts User Guide, Release 14.10
Preface
Changes to This Book
Date and Release Description
May 2013
Updated for the 14.10 release.
14.10
Reorganized content structure.
Related Documentation
Access the Teradata Information Products web site to view or download additional
documentation 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 Viewpoint User Guide
B035-2206
Teradata Viewpoint Configuration and Upgrade Guide
B035-2207
Teradata Alerts Installation, Configuration, and Upgrade Guide
B035-2211
Teradata Server Management Web Services User Guide
B035-5350
Teradata Alerts User Guide, Release 14.10
7
Preface
8
Teradata Alerts User Guide, Release 14.10
CHAPTER 1
Overview
Introduction to Teradata Alerts
Teradata Alerts enables alert functionality in the Teradata Viewpoint portal. The Teradata
System Administrator can set up alerts to invoke actions to automatically respond to
database 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 from
different sources. You can configure threshold levels and triggers to generate alerts using the
Teradata 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.
• Configure the Server Management portlet to send a trap to an SNMP management
server when a database alerts with a Warning severity.
Teradata Alerts consists of several components that are included in the Teradata Viewpoint
server. Teradata Alerts can also use the Windows and Linux Notification Services to run
BTEQ scripts and executable programs.
Teradata Alerts User Guide, Release 14.10
9
Chapter 1 Overview
Teradata
Viewpoint
Server
Windows
Server
Linux
Server
Notification
Service
Notification
Service
Optional
(Required for BTEQ
and Run Program
Actions)
Optional
(Required for BTEQ
and Run Program
Actions)
Cache DB
Portlets:
Alert Setup
Alert Viewer
Messaging
Service
Alert
Service
Cache DB
A local repository instance used by the Teradata Viewpoint server. The Cache DB
stores 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 message
exchange 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 actively
respond to generated alerts. You must activate this service on a Windows or Linux
server you provide.
Alert Configuration Workflow
The alert configuration workflow has the following phases:
1. Configure delivery settings and alert action sets.
10
Teradata Alerts User Guide, Release 14.10
Chapter 1 Overview
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 set
fails to execute properly.
Alert Triggers
After alert action sets are configured, they are available to other portlets in the
Teradata Viewpoint portal. You define triggers, conditions, and threshold levels and
select corresponding alert action sets.
Teradata Alerts source
Configure alert triggers in...
Teradata Viewpoint portal
Teradata Systems portlet in the Admin menu
Teradata Workload
Management
Workload Designer portlet
Teradata Multi-System
Manager
MSM Setup portlet in the Admin menu
Server Management
Server Management portlet in the Admin menu
Teradata Database
You can integrate Teradata Database with Teradata Alerts directly by inserting rows
in the AlertRequest and MonitorRequest tables to trigger alert actions. The Alert
Request data collector forwards the row contents to the alert service for processing.
Alert Viewer
The Alert Viewer portlet displays alerts generated from many sources. The alert
includes the date, time, alert name, type, source, and system for each alert generated
if it was configured to be logged during alert setup. Additional details, including the
alert property and metric that triggered the alert, can also be displayed.
Teradata Alerts User Guide, Release 14.10
11
Chapter 1 Overview
12
Teradata Alerts User Guide, Release 14.10
CHAPTER 2
Alert Setup
Introduction to Alert Setup
The Alert Setup portlet enables you to configure actions that are triggered when the alert
service generates an alert.
The settings configured in the Alert Setup portlet determine the alert action choices
available 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 trigger
alerts 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 use
the Workload Designer portlet, you can configure a ruleset to trigger an alert when an
exception to the workload occurs. If you use the Server Management portlet, you can select
actions for Server Management summary alerts.
Delivery Settings
You can configure delivery settings for the following alert actions:
• Write to the alert log
• Send an email notification
• Send an SNMP notification
• Run a SQL query
• Run a BTEQ script
• Run a Windows or Linux executable program
Adding a Login Account
The Teradata Viewpoint Administrator or Teradata System Administrator must define a
login configuration before you can create an action set that runs a BTEQ script or a SQL
action.
A login configuration must be enabled before BTEQ scripts or SQL queries in an action set
may be executed.
1 From the SETUP OPTIONS list, click Delivery Settings.
2 From the AUTHENTICATION list, click Teradata Login.
3 From the TERADATA LOGIN list, do one of the following:
• To add a login configuration, click
• To copy a login configuration, click
copy.
Teradata Alerts User Guide, Release 14.10
.
next to the login configuration you want to
13
Chapter 2 Alert Setup
• To edit a login configuration, click the login configuration name.
4 Enter the TDPID of the Teradata Database you want to log on to.
The BTEQ scripts and SQL queries you provide as alert actions run against the TDPID
you specify.
5 Select the Enable checkbox to enable the login configuration.
6 Under LOGIN, enter a Username and its associated Password.
Account String is optional.
7 [Optional] For BTEQ, enter BTEQ AUTHENTICATION OPTIONS.
• Logmech Name is the name of the logon mechanism.
• Logmech Data is the logon data (parameters or credentials) associated with the
selected logon mechanism.
8 For SQL, under JDBC AUTHENTICATION OPTIONS, select the Logmech Name
from the list.
Logmech data is automatically generated from the user name and password, if necessary.
9 Select the Session Character Set from the list.
10 [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
fails.
appears if the operation is successful. The icon
appears if the operation
• 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 that the
cam.activemq.host property is set to the Viewpoint server's hostname.
11 Click Apply.
Defining Alert Retention
You can set limits that define how long to retain alert log data and how much to retain.
If you set a retention period, alert log data is deleted in weekly increments after the specified
period expires. If you set a file-size restriction, alert log data is deleted in weekly increments
after the specified file size is exceeded, and the oldest data is deleted first.
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.
14
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
Enter an integer number in the box and select a time period from the list.
• Select Over to set the file-size restriction.
Enter an integer number in the box and select a file-size unit from the list.
4 Click Apply.
Defining Email Configuration
You can configure the alert service to send alert notifications by email. Once you configure
the email notification using these steps, you must also create an action set.
1 From the SETUP OPTIONS list, click Delivery Settings.
2 From the DELIVERY TYPES list, click Email.
3 Enter the SMTP Host address of the outgoing (SMTP) email server.
4 Select the Enable check box.
5 [Optional] Select the Use SSL check box to use Secure Sockets Layer as the transmission
protocol.
6 Under Port, select one of the following:
Option
Action
Use default port
Use the default communications port on the SMTP host for outgoing
email.
Enter port number Enter a number in the box to use as the custom port number on the SMTP
host for outgoing email.
7 In the Server Timeout box, enter the number of seconds to wait for a connection with
the SMTP host before the system times out.
The default is 30 seconds.
8 Under REPLY-TO, enter the Email Address and Display Name to appear in alert email
messages.
9 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.
10 Leave the Advanced box blank.
Note: The alert service uses this field for diagnostic purposes. Enter information in this
field only under the guidance of a Teradata Technical Support Specialist.
11 To verify your email delivery settings, enter a valid email address for Test Recipient and
click Test.
The icon appears if the operation is successful. The icon
fails; verify that the settings are correct, and try again.
Teradata Alerts User Guide, Release 14.10
appears if the operation
15
Chapter 2 Alert Setup
If the operation is successful, the alert service sends an email message to the test recipient
address.
12 Click Apply.
Postrequisite:
Once the email configuration is done, you must create an action set.
Adding SNMP Configurations
You can configure the alert service to deliver alert notifications to third-party management
applications using SNMP. Once you define the SNMP configuration using these steps, you
must also create an action set.
1 From the SETUP OPTIONS list, click Delivery Settings.
2 From the DELIVERY TYPES list, click SNMP.
3 From the SNMP list, do one of the following:
• To add an SNMP configuration, click
• To copy an SNMP configuration, click
copy.
next to SNMP.
next to the SNMP configuration you want to
• To edit an SNMP configuration, click the SNMP configuration name.
4 Enter a name in the CONFIGURATION NAME field.
5 Select the Enable check box.
6 [Optional] Select the Default for Alert Request Collector check box to make this the
default configuration for SNMP requests that originate from the AlertRequest and
MonitorRequest tables in the dbcmngr database.
Note: When you make this configuration the default, the alert service overwrites the
previous default configuration for SNMP requests.
7 Enter the IP address or host name of the Destination for SNMP alert notifications.
8 Enter an SNMP Community name.
The default value is public.
You can add
or remove
Destination and Community pairs.
9 Under Include in SNMP Trap Details, configure the information to display in the
SNMP trap details. Select at least one of the check boxes. If both are selected, the SNMP
trap details include a description followed 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.
10 [Optional] To test the SNMP trap:
a Select a Management Information Base (MIB) from the Test SNMP Trap list.
The following table provides information on the MIB location and OID for the alert
service and Teradata MSM.
16
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
Provider
MIB Location
OID
Alert
Service
/opt/teradata/cam/alert/
config/teradataCamMib.txt on
the Teradata Viewpoint server
iso.org.dod.internet.private.
enterprises.teradata.tdproducts.tdcam
Teradata
MSM
See the Teradata MSM Configuration
Guide for more information on the
MIB.
iso.org.dod.internet.private.
enterprises.teradata.tdproducts.tmsm.dualActive
b Click Test to verify the SNMP configuration on the specified destination host or
hosts.
The icon appears if the operation is successful. The icon
fails; verify that the settings are correct, and try again.
appears if the operation
If the operation is successful, the alert service sends an SNMP trap (notification) to
each specified destination. Verify that the SNMP trap is received at each destination.
11 Click Apply.
Postrequisite:
Once the SNMP configuration is done, you must create an action set.
Adding SQL Query Configurations
You can configure the alert service to run SQL query alert actions for Teradata Database
systems. Once you configure the alert service using these steps, you must also create an
action set.
1 From the SETUP OPTIONS list, click Delivery Settings.
2 From the DELIVERY TYPES list, click SQL Queries.
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 Select the Enable check box.
6 [Optional] Enter the name of the DEFAULT DATABASE for the SQL query.
7 Enter the SQL query for the alert action in the SQL field.
8 [Optional] In the TIMEOUT section, select an action to perform if a SQL query is still
running after a specified time period.
• Select the Notify check box to be notified, and indicate the time period. You
configure notifications under SETUP OPTIONS>Alert Exceptions.
• Select the Terminate check box to terminate the SQL query, and indicate the time
period.
A notification is always sent when a SQL query is terminated.
9 Click Apply.
Teradata Alerts User Guide, Release 14.10
17
Chapter 2 Alert Setup
Postrequisite:
Once the SQL query configuration is done, you must create an action set.
Related Topics
Configuring Alert Exceptions, on page 26
Configuring BTEQ Script Settings
The alert service can run BTEQ scripts as alert actions for Teradata Database systems.
When the Teradata Notification Service is installed and the service is running, the Alert
Setup portlet automatically displays a list of the BTEQ scripts that have been installed on the
Windows or Linux server.
Once you configure the BTEQ script using these steps, you must also create an action set.
1 From the SETUP OPTIONS list, click Delivery Settings.
2 From the NOTIFICATION SERVICE list, click the operating system on which the
BTEQ script is installed.
3 Click the name of the BTEQ script that you want to configure.
4 [Optional] In the TIMEOUT section, select an action to perform if a BTEQ script is still
running after a specified time period.
• Select the Notify check box to be notified, and indicate the time period. You configure
notifications under SETUP OPTIONS>Alert Exceptions.
• Select the Terminate check box to terminate the BTEQ script and indicate the time
period after which the script is terminated.
5 Click Apply.
Postrequisite:
Once the BTEQ configuration is done, you must create an action set.
Related Topics
Configuring Alert Exceptions, on page 26
Teradata Manager Alert Migration
BTEQ Script Processing
When you configure Teradata Alerts to run a BTEQ script as an alert action, it creates a
logon session with the Teradata Database system, runs the script to completion, and ends the
session. Teradata Alerts processes BTEQ scripts sequentially as shown in the following table.
BTEQ Command
Description
Details
Executed
.LOGON.
Creates a logon session Enters the TDPID, Account ID, Username and
Password that you used when creating the
BTEQ configuration
Automatically
Note: Because you define logon credentials in
the Alert Setup portlet, ensure that BTEQ
scripts do not contain the .LOGON. command.
18
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
BTEQ Command
Description
Details
Executed
.LOGMECH.
Provides extra
Enters the optional Logmech Name
information for a logon
session
Must define Logmech
Name when creating
the BTEQ
configuration
.LOGDATA.
Provides extra
Enters the optional Logmech Name and the
information for a logon corresponding Logmech Data
session
Must define Logmech
Name and the
corresponding
Logmech Data when
creating the BTEQ
configuration
.RUN FILE.
Executes the BTEQ
script
Automatically
Executes the commands in the BTEQ script in
InstallFolder\Teradata\Client
\14.10\Teradata Notification Service
\sql that is available from the Script list when
you created a BTEQ action set
.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 Alerts
can run BTEQ scripts on Linux as well as on Windows. Teradata Manager differs from
Teradata Alerts in the following ways:
Interface
Program
LOGON ...
Syntax Support
Where to Enter Login
Credentials
Script File Location
Teradata
Alerts
BTEQ
No
Alert Setup portlet
For Linux: /opt/teradata/client/cam/
tdnotification/sql For Windows:
Teradata
Manager
DMTEQ
SETUP
InstallFolder\Teradata\Client
OPTIONS>Delivery
\14.10\Teradata Notification
Settings>AUTHENTICATI
Service\sql
ON>Teradata Login
Yes
Teradata Manager
Administration
Windows: InstallFolder\Teradata
\Teradata Manager 13.0\secure
Systems window
Configuring User Program Settings
You can configure the alert service to run a program as an alert action.
When the Teradata Notification Service is installed and the service is running, the Alert
Setup portlet automatically displays a list of the programs that have been installed on the
Windows or Linux server.
Once you configure the user program using these steps, you must also create an action set.
1 From the SETUP OPTIONS list, click Delivery Settings.
2 From the NOTIFICATION SERVICE list, click the operating system on which the
program is installed.
Teradata Alerts User Guide, Release 14.10
19
Chapter 2 Alert Setup
3 Click the name of the user program you want to configure.
4 [Optional] In the TIMEOUT section, select an action to perform if the user program is
still running after a specified time period.
• Select the Notify check box to be notified, and indicate the time period. You configure
notifications under SETUP OPTIONS>Alert Exceptions.
• Select the Terminate check box to terminate the user program and indicate the time
period after which the program is terminated.
5 Click Apply.
Postrequisite:
Once the user program configuration is done, you must create an action set.
Related Topics
Configuring Alert Exceptions, on page 26
Disabling Alert Configurations
You can disable an alert delivery configuration so that triggered alerts using that
configuration are not executed.
When you disable email as a delivery type, a disabled icon, , is displayed next to Email
under Delivery Types. When you disable a BTEQ script or user program, the disabled icon is
displayed next to the configuration name.
Even though a delivery configuration is disabled, you can still configure action sets that use
it. When you do so, the disabled components are highlighted in red on the action set
configuration screen.
If the Include in alert log option is selected when configuring an action set, a triggered alert
is logged in the alert log and can be viewed in the Alert Viewer portlet, regardless of whether
any other delivery configuration is enabled.
1 From the SETUP OPTIONS list, click Delivery Settings.
2 Do one of the following, depending on the type of configuration you want to disable:
Option
Description
Email
a. From the DELIVERY TYPES list, click Email.
b. Clear the Enable check box next to the SMTP Host field.
SNMP,
a. From the DELIVERY TYPES list, click SNMP or SQL Queries.
b. Under SNMP or SQL QUERIES, click the configuration name.
c. Clear the Enable check box next to the NAME field.
SQL Query
BTEQ Script, a. From the NOTIFICATION SERVICE list, click Windows or Linux,
depending on the operating system the Teradata Notification Service is
Program
running on.
b. Under BTEQ SCRIPTS or PROGRAMS, click the configuration name.
c. Clear the Enable check box next to the NAME field.
3 Click Apply.
20
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
Deleting Alert Configurations
You can delete an email, SNMP, or SQL query delivery configuration.
You cannot delete a BTEQ script or a user program using the Alert Setup portlet. However,
if you remove scripts or programs from the Windows or Linux server running the Teradata
Notification Service, they are not listed and cannot be configured in the Alert Setup portlet.
The following scenarios result in an error:
• You attempt to delete an alert delivery configuration that is part of a defined action set.
• You attempt to delete the last Teradata Login configuration, but BTEQ or SQL action
sets that use the Get from Alert option still remain.
1 From the DELIVERY TYPES list, click Email.
2 Do one of the following, depending on the type of configuration you want to delete:
Delivery Type Delete Action
Email
a. From the DELIVERY TYPES list, click Email.
b. Click Delete, and OK to confirm the deletion.
SNMP,
a. From the DELIVERY TYPES list, click SNMP or SQL Queries.
b. Click next to the configuration name, and OK to confirm the deletion.
SQL query
Alert Presets
You can configure alert presets for the following:
• 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
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 weekend
hours as described in the following table.
Hours
Description
CORE HOURS
The days and times 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 all
day (24 hours).
EVENING
HOURS
The hours opposite Core Hours for core days.
WEEKEND
HOURS
The ending time of the ending core day to the beginning time of the beginning
core day.
Teradata Alerts User Guide, Release 14.10
21
Chapter 2 Alert Setup
Time Interval
If the core hours are Monday through Friday, 9:00 AM to 5:00 PM, then evening hours are
Monday through Friday, 5:00 PM to 9:00 AM, and weekend hours are from Friday at 5:00
PM 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.
Setting Core Hours
This task describes how to set core hours of operation for the alert service. When you make
selections in this view, the EVENING HOURS and WEEKEND HOURS are updated in the
box 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 two
lists.
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 HOURS
and 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 multiple
alert actions in a single operation.
Note: You must define alert delivery settings under SETUP OPTIONS>Delivery
Settings>DELIVERY TYPES or NOTIFICATION SERVICE before you can create action
sets that use those alert actions.
Any disabled components are highlighted in red on the actions set configuration screen. You
can configure action sets with disabled components, but disabled delivery types will not be
executed. To enable a disabled component, go to SETUP OPTIONS>Delivery
Settings>DELIVERY TYPES or NOTIFICATION SERVICE and select the Enable check
box for the disabled components.
1 From the SETUP OPTIONS list, click Alert Presets.
2 From the PRESET OPTIONS list, click Action Sets.
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.
22
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
4 Enter an ACTION SET NAME.
5 Under TIMES, select the desired check boxes to run the action set at the hours defined
under PRESET OPTIONS>Core Hours.
6 Under ACTIONS, select the check box for any of the following:
Action
Description
Include in Logs the alert details so you can view alerts for this action set in the Alert Viewer
alert log
portlet.
Send to
person
Designates the recipient of an email alert as a Viewpoint user, Viewpoint role, or
email address.
• Select BCC to hide the recipients.
•
Select TO to make all recipients visible in the email notification.
•
Use semicolons to separate multiple recipients and use any combination of
user, role, or email address.
The Send to person action is available if you configured the Delivery
Settings>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>DELIVERY
TYPES>SNMP.
SQL
Lists the SQL queries defined under DELIVERY TYPES.
a. Select the Query from the list and do one of the following under TDPID:
• Select the TDPID of the Teradata Database on which to run the SQL query,
regardless of which system generated the alert.
• Select Get from alert to run the SQL query on any Teradata Database that
generated the alert.
For Get from alert option, the TDPID must be defined in the Alert Setup
and Teradata Systems portlets. If the system is not defined, the alert service
writes the failed logon attempt to /var/opt/teradata/cam/alert/
logs/alertservice.log on the Viewpoint server.
The SQL action is available if you configured a SQL Query and a Teradata login.
BTEQ
Lists the BTEQ scripts that are located on the Windows or Linux system that is
hosting the Teradata Notification Service.
a. Select the Location to indicate the Windows or Linux Server on which the
script is run.
b. Select the BTEQ Script from the list and do one of the following under
TDPID:
• Select the TDPID of the Teradata Database on which to run the BTEQ
script, regardless of which system generated the alert.
• Select Get from alert to run the BTEQ script on any Teradata Database
that generated the alert.
Teradata Alerts User Guide, Release 14.10
23
Chapter 2 Alert Setup
Action
Description
For Get from alert option, the TDPID must be defined in the Alert Setup
and Teradata Systems portlets. If the system is not defined, the alert service
writes the failed logon attempt to /var/opt/teradata/cam/alert/
logs/alertservice.log on the Viewpoint server.
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>AUTHENTICATION>Teradata
Login.
•
•
Run a
program
The Teradata Notification Service must be installed and running on the
Windows or Linux server.
The BTEQ script is located on the Windows server at: InstallFolder
\Teradata\Client\14.10\Teradata Notification Service
\sql. It is located on the Linux server at: /opt/teradata/client/cam/
tdnotification/sql.
Lists the programs and batch files located on the Windows and Linux servers that
run 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 and
the batch file takes arguments -db for the name of the database and -sp for the
percentage 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 as
the 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.10\Teradata
Notification Service\usrcmd. It is located on the Linux server at: /
opt/teradata/client/cam/tdnotification/usrcmd.
7 Click Apply.
Adding and Editing Groups
Alert actions can be combined into action sets and action sets can be combined into groups
in the alert service. A group enables you to run multiple action sets in a single operation. You
must 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:
24
• Click
next to GROUPS to add a group.
• Click
next to the group you want to copy.
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
• 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.
Example: Different Alert Actions for Weekday and Weekend Hours
To designate a set of different alert actions to be performed for an event depending on the
time 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 message under
the following conditions:
• An SNMP trap when a space-usage threshold is exceeded on a weekday
• An SNMP trap and an email message sent to the Teradata Database Administrator when
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 Viewpoint
administrative portlet where you want to define the alert, assign the group as the alert
action.
Example: Managing Email Alert Recipients
Groups and action sets can be used to manage alert recipients, similar to email distribution
lists.
Define action sets that send email notifications to different sets of people in your
organization:
• 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 Viewpoint
administrative portlet where you want to define the alert, assign the group as the alert
action. When an alert is issued, both sets of users receive an email notification.
Deleting Action Sets or Groups
If you delete a group in the alert service, the group configuration is lost, but the action sets
combined in the group remain. You cannot delete an action set if it is used in a group or an
alert rule. You cannot delete a group if it is used in an alert rule.
1 From the SETUP OPTIONS list, click Alert Presets.
2 From the PRESET OPTIONS list, click Action Sets or Groups.
3 Click
to delete a configuration from the ACTION SETS or GROUPS list.
A confirmation message appears.
Teradata Alerts User Guide, Release 14.10
25
Chapter 2 Alert Setup
4 Click OK.
Alert Exceptions
An alert action may fail. For example, a BTEQ script may not run because it was deleted
from the server. Or an email alert may not be delivered because the Viewpoint user specified
in the email action was deleted. You can configure notifications for such alert exceptions.
Configuring Alert Exceptions
You can designate that an email notification be sent or an alert logged if an alert action fails.
1 Click Alert Exceptions under SETUP OPTIONS.
2 To prevent an alert from being sent more than once in a certain time frame, enter the
number 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.
• [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 alert
types listed below it.
4 [Optional] Enter one or more email addresses to which an email message is sent if an
alert exception occurs. Separate multiple addresses with semicolons.
You may enter email addresses even if you have not selected any Send Email check boxes
in the previous step. However emails are only generated when Send Email is enabled.
Alert Properties
The following table lists the available properties for all alert types, regardless of the alert
source. The associated property names enable you to customize alert actions in the Alert
Setup portlet.
Property
Name
Alert Type
alertType
Alert Name
alertName
Source
source
Timestamp
timestamp
Severity
severity
System
systemName
Additional property available for Run a Program arguments and in SQL queries:
26
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
Property
Name
Message
message
Note: When using the Message property as a Run a Program argument, the property token
should be enclosed in quotes: "${message}".
SNMP Overview
Teradata Alerts provides the ability to send an SNMP Trap Notification as an alert action.
The system takes the incoming alert that was generated in response to an alert rule, maps
values from the arriving alert into the SNMP trap fields, and then forwards an SNMP trap to
the configured destination using the snmptrap Linux command.
This section is an overview of the MIB fields and describes how they are mapped from the
alert that is being processed, based on how the alert was generated.
Teradata Alerts SNMP MIB File
The Teradata Alerts SNMP MIB file is shipped with the camalerts package, in the following
location: /opt/teradata/cam/alert/config/teradataCamMib.txt. The table
below shows the Teradata Alerts SNMP MIB file syntax.
Field
Type
Values
alertId
Integer
Unique integer generated by the alert service when the alert
is generated.
alertName
String
The alert name as defined by the user.
source
String
The Teradata application that generated the event or alert
that triggered the alert. These include:
• Viewpoint
• Server Management
• Teradata Alerts
TMSM alerts use the TMSM MIB, which is not discussed
here.
subcomponent
String
Unused.
timestamp
String
A timestamp, formatted as:
2013-05-04T10:06:21.227-08:00.
severity
String
Low, Medium, High, or Critical.
systemName
String
The system that generated the alert. This varies by the
source of the alert.
details
String
The alert message or description that indicates the reason
for the alert.
If both the alert message and the alert description are
selected, then details contains both the description, then
the message, separated by a comma.
Teradata Alerts User Guide, Release 14.10
27
Chapter 2 Alert Setup
SNMP Configurations
The SNMP configurations define where the SNMP trap notifications should be sent.
Configure these through the Alert Setup portlet, under Delivery Settings > SNMP. Use the
Include in SNMP Trap Details option to include the alert message or description.
Select the Default for Alert Request Collector check box to identify the default
configuration for the alert request collector. This configuration is used for SNMP alert
requests using the DBCMNGR AlertRequest alert mechanism. Although multiple SNMP
configurations can be defined, only one can be identified as this default.
Viewpoint SNMP Alerts
Viewpoint alerts are defined in the Teradata Systems portlet by selecting Alerts under
SETUP. While the exact thresholds differ based on the alert type being configured (for
example, System, Node, Vproc), the basic components of the alert rule are the same.
The table below illustrates the mapping.
Teradata Alerts SNMP Fields
Value
alertName
AlertName
source
Viewpoint
systemName
The system being configured
severity
The severity
details
The message or description:
• message = Message
• description = Alert rules displayed as a string. For example,
CPU Usage > 70.
Server Management SNMP Alerts
Server Management service-required summary alerts are defined in the Server Management
portlet, under the Alerts configuration.
The table below illustrates the mapping.
28
Teradata Alerts SNMP Fields
Value
alertName
AlertName
source
Server Management
systemName
The site ID being configured
severity
Severity is automatically mapped based on alert severity:
• Low = Unknown, OK, information
• Medium = Warning
• High = Degraded
• Critical = Critical, fatal
details
The message or description:
• message = Message
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
Teradata Alerts SNMP Fields
Value
•
description = Alert rules displayed as a string. For example,
Synopsis contains "restart".
Alert Request Data Collector Alerts
The Alert Request data collector monitors the DBCMNGR.AlertRequest table in the
Teradata database. When rows are inserted into the table, the alert requests are forwarded to
the Teradata Alerts alert service.
The table below illustrates the mapping.
Teradata Alerts SNMP Fields
Value
alertId
0 (unused)
alertName
AlertRequest.jobName
source
Viewpoint
systemName
Teradata system for which the Alert Request data collector is
configured
severity
Low
details
The message or description, as configured in the default SNMP
delivery settings:
• message = AlertRequest.message
• description = AlertRequest.description
Workload Designer SNMP Alerts
Workload Designer can generate alerts for either an event or an exception.
Events can be:
• Planned or scheduled, such as a weekend time period begins
• Unplanned, such as a node going down
Exceptions are generated when a query exceeds some user-defined threshold.
TDWM generates the alerts using the DBCMNGR.AlertRequest table, using the same
mapping as the Alert Request Data Collector. The contents of the jobName, message, and
description columns are specified by the TDWM software.
The table below illustrates the mapping.
Teradata Alerts
SNMP Fields
Value
alertId
0 (unused)
alertName
AlertRequest.jobName
source
Viewpoint
Teradata Alerts User Guide, Release 14.10
TDWM Specific Contents
TDWM: HostID=hostId,
SesNum=sessionNumber,
ReqNum=requestNumber
29
Chapter 2 Alert Setup
Teradata Alerts
SNMP Fields
Value
TDWM Specific Contents
systemName
Teradata system for which the Alert
Request data collector is configured
severity
Low
details
The message or description, as
configured in the default SNMP
delivery settings:
• message = AlertRequest.message
• description =
AlertRequest.description
Message for exception:
TDWM: WD worlkloadName
encountered exception
'exceptionName' which resulted in
'action'
Message for event:
TDWM: Expression 'eventName'' was
triggered
Description for exception:
TDWM: WDId: workloadId,
ExceededCriteria type=type
Description for exception:
EventName
Alert Configuration Examples
This section presents step-by-step examples of how you would configure various types of
alerts.
The process for setting up alerts is specific to the products and versions that are installed in
your environment and the permissions for your role. The details in these examples may not
apply to your particular system.
Customizing Email Alerts Example
This example describes how to customize the body of an email message used in an alert. You
can define a threshold for a Teradata Database metric when a specific event occurs. You can
then specify that the event triggers an alert. The alert service has access to information on
several properties of a monitored system, depending on the data collectors that you enable. If
you configure the alert to send text, such as an email message, you can select which of the
available properties to display in the message.
The following is an overview of the process:
Configure the email delivery settings in the Alert Setup portlet.
Create and action set in the Alert Setup portlet.
Configure the Teradata Database system in the Teradata System portlet.
Configure data collectors to monitor the configured Teradata Database system in the
Teradata Systems portlet.
5. Define alert rules in the Teradata Systems portlet.
6. Review the alert messages that arrive in the email inbox.
1.
2.
3.
4.
30
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
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
an alert.
• Ensure that you enter alert properties with the correct case, because they are casesensitive.
• If an alert property is misspelled, uses incorrect case, or does not exist in the list of
properties, the alert service displays the string literally.
For example, if you use ${databaseNME} instead of ${databaseName} when adding
the alert property, the alert service returns ${databaseNME} instead of displaying the
name of the database that triggers the alert.
Example: Custom Email Alerts
Suppose you want to send an email message to [email protected] with medium severity if
the current perm space that is used in any database on Teradata Database system TEST1
exceeds 80%. On the system TEST1, finance is one of the databases you want to monitor.
1 In the Alert Setup portlet, configure delivery settings.
a From the SETUP OPTIONS list, click Delivery Settings.
b From the DELIVERY TYPES list, click Email.
c Type smtp.example.com as the SMTP Host address of the outgoing (SMTP) email
server.
d Select the Enable check box.
e From the Port list, select Use default port to use the default port 25.
f
Enter a default Server Timeout of 30 seconds.
g Type [email protected] in the Reply-to box.
h Keep the default Anonymous login.
i
Leave the Advanced box blank.
j
Type [email protected] in the Test Recipient box.
k Click Test to verify that the SMTP server delivers the email.
l
Click Apply.
2 In the Alert Setup portlet, create an Action Set.
a From the SETUP OPTIONS list, click Alert Presets.
b From the PRESET OPTIONS list, click Action Sets.
c Click
next to ACTION SETS.
d In ACTION SET NAME, type CustomEmailAlert.
Teradata Alerts User Guide, Release 14.10
31
Chapter 2 Alert Setup
e Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
f
From the Actions list, select Send to person.
g Click BCC or TO and type [email protected] in the Email box.
h Click Apply.
3 In the Teradata Systems portlet for Teradata Viewpoint monitoring, configure TEST1.
a Click
next to SYSTEMS and select Add Teradata System.
b In SYSTEM NICKNAME, type 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, configure the data collectors.
a From the SYSTEMS list , click TEST1.
b From the SETUP list, click Data Collectors.
c From the DATA COLLECTORS list, click Database Space.
d Select the Enable Database Space Collector check box and keep the default settings.
e Click Apply.
5 In the Teradata Systems portlet, define alert rules.
a From the SYSTEMS list, click TEST1.
b From the SETUP list, click Alerts.
c From the ALERT TYPES list, click Database Space.
d Click
next to ALERTS.
e In Alert Name, type PermExceeds80.
f
Select the Enabled check box.
g From the Alert Rules list, select Current Perm.
h In the box to the right of the greater-than symbol (>), type 80.
i
Click Include or exclude databases and include all databases.
j
From the Alert Action list, select CustomEmailAlert.
k Leave the value unchanged in the Do not run twice in ... minutes box.
32
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
l
In the Severity list, select Medium.
m In the Message field, enter: The database ${databaseName} is more than
80% full.
n Click Apply.
Note: You can include alert properties in the Message field by enclosing the property
name in curly brackets ({}) and preceding the expression with a dollar sign ($) as shown
above for the databaseName. See the topic Alert Properties for a description of the alert
properties that are available for Teradata Viewpoint alerts.
6 In the email inbox for the account [email protected], check for messages from
[email protected].
Example Email Message
The email message contains the following formatted information when it arrives in the
inbox.
From: [email protected]
Sent: Tuesday, August 7, 2012 2:20 PM
To: [email protected]
Subject: [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=finance
Space Used Percentage=85.0
Max Space Used Percentage=85.28
Description: (Space Used Percentage > 80.0)
SNMP Trap 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.
4. Configure data collectors to monitor the configured Teradata Database system in the
Teradata Systems portlet.
5. Define alert rules in the Teradata Systems portlet.
6. Review alerts in the Alert Viewer portlet.
Example: SNMP Trap
Suppose that you want to send a trap to an SNMP management server when the current
perm space that is used by any database on Teradata Database system TEST1 exceeds 80%.
You want the trap to include the name of the database on which the threshold was exceeded
as well as the actual percent of perm space in use for that database.
Teradata Alerts User Guide, Release 14.10
33
Chapter 2 Alert Setup
For this example, the SNMP management package is running on a system named
prodMgr1. To configure and send an SNMP trap as an alert action, perform the following
steps:
1 In the Alert Setup portlet, create an SNMP configuration.
a From the SETUP OPTIONS list, click Delivery Settings.
b From the DELIVERY TYPES list, click SNMP.
c Next to SNMP, click .
d In CONFIGURATION NAME, type snmpConfig.
e Select the Enable check box.
f
In Destination, type prodMgr1 as the hostname for the trap.
g Select the Alert message check box.
h If the Alert description check box is not already selected, select it.
i
Click Apply.
2 In the Alert Setup portlet, create an Action Set.
a From the SETUP OPTIONS list, click Alert Presets.
b From the PRESET OPTIONS list, click Core Hours.
c Verify that the CORE HOURS displayed correspond to the weekday hours.
d From the PRESET OPTIONS list, click Action Sets.
e Click
f
next to ACTION SETS.
In ACTION SET NAME, type sendTrap.
g Select all of the TIMES check boxes: Core, Evening, and Weekend.
h Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
i
From the ACTIONS list, select the SNMP check box.
j
From the list of SNMP configurations, select snmpConfig.
k Click Apply.
3 In the Teradata Systems portlet for Teradata Viewpoint monitoring, configure TEST1.
a Click
next to SYSTEMS and select Add Teradata System.
b In SYSTEM NICKNAME, type 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.
34
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
f
Click Apply.
4 In the Teradata Systems portlet, configure the data collectors.
a From the SYSTEMS list , click TEST1.
b From the SETUP list, click Data Collectors.
c From the DATA COLLECTORS list, click Database Space.
d Select the Enable Database Space Collector check box and keep the default settings.
e Click Apply.
5 In the Teradata Systems portlet, define alert rules.
a From the SYSTEMS list, click TEST1.
b From the SETUP list, click Alerts.
c From the ALERT TYPES list, click Database Space.
d Click
next to ALERTS.
e In Alert Name, type PermExceeds80.
f
Select the Enabled check box.
g From the Alert Rules list, select Current Perm.
h In the box to the right of the greater-than symbol (>), type 80.
i
Click Include or exclude databases and include all databases.
j
From the Alert Action list, select sendTrap.
k In the Message field, enter: Database ${databaseName} current perm use is
${spaceUsedPct}%.
l
Click Apply.
Note: You can include alert properties in the Message field by enclosing the property
name in curly brackets ({}) and preceding the expression with a dollar sign ($) as
shown above for the databaseName. See the topic Alert Properties for a description of
the alert properties that are available for Teradata Viewpoint alerts.
When the perm space usage for a database exceeds 80%, a trap is sent to the
configured trap destination, in this example, prodMgr1. Because you configured the
SNMP delivery settings with both the Alert description and Alert message options
enabled, the trap Details field contains a description of the event that generated the
trap followed by the message you provided in the PermExceeds80 alert rule: (Space
Used Percentage > 80. 0), Database finance current 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.
Teradata Alerts User Guide, Release 14.10
35
Chapter 2 Alert Setup
BTEQ Script
This example shows how to enable a BTEQ script when creating action sets in the Alert
Setup portlet. The following is an overview of the process:
Copy BTEQ scripts to the server that is running the Teradata Notification Service.
Verify that the Teradata Notification Service is running.
Configure the delivery type for the Teradata Database system in the Alert Setup portlet.
Create an action set in the Alert Setup portlet.
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.
7. Define alert rules in the Teradata Systems portlet.
8. Review alerts in the Alert Viewer portlet.
1.
2.
3.
4.
5.
Example: BTEQ Script
In this example, we run a BTEQ script as an alert action for the Teradata Database system
TEST1, weeknights only, and track alerts in the Alert Viewer portlet. The BTEQ script,
cpuUsageReport.txt contains the following macro that returns a problem analysis of
daily workloads: EXECUTE ResPmaTotal;.
1 Copy the BTEQ script cpuUsageReport.txt to the Windows server at:
InstallFolder\Teradata\Client\14.10\Teradata Notification Service
\sql.
2 Verify that the Teradata Notification Service is running on the Windows server.
a At the Windows command prompt, type services.msc.
b Check that the status for the Teradata Notification Service is started in the list of
services.
c If the service is stopped, right-click the service name and select Start.
3 In the Alert Setup portlet, configure delivery settings.
a From the SETUP OPTIONS list, click Delivery Settings.
b From the AUTHENTICATION list, click Teradata Login.
c Click
next to Teradata Login.
d Enter the TDPID of the TEST1 system.
e Select the Enable check box.
f
Enter a LOGIN name and password.
g [Optional] From the TEST TERADATA LOGON list, select BTEQ (Windows).
h [Optional] Click Test to verify that the logon settings are correct.
i
Click Apply.
4 In the Alert Setup portlet, create an action set.
36
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
a From the SETUP OPTIONS list, click Alert Presets.
b From the PRESET OPTIONS list, click Core Hours.
Verify that The EVENING HOURS displayed in the box correspond to the
weeknight hours for this alert action.
c From the PRESET OPTIONS list, click Action Sets.
d Click
next to ACTION SETS.
e In ACTION SET NAME, type cpuUsageReport.
f
From the TIMES check boxes, select the Evening check box, and clear both Core
and Weekend check boxes.
g Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
h From the ACTIONS list, select the BTEQ check box.
i
From the Location list, select Windows.
j
From the Script list, select cpuUsageReport.txt .
If the script does not appear in the list, verify that the script cpuUsageReport.txt
exists at: InstallFolder\Teradata\Client\14.10\Teradata
Notification Service\sql.
k From the TDPID list, select TEST1.
l
Click Apply.
5 In the Teradata Systems portlet for Teradata Viewpoint monitoring, configure TEST1.
a Click
next to SYSTEMS and select Add Teradata System.
b In SYSTEM NICKNAME, type 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, configure the data collectors.
a From the SYSTEMS list , click TEST1.
b From the SETUP list, click Data Collectors.
c From the DATA COLLECTORS list, click Resource Usage and System Stats.
d Enable the data collectors and accept all defaults.
e Click Apply.
7 In the Teradata Systems portlet, define alert rules.
Teradata Alerts User Guide, Release 14.10
37
Chapter 2 Alert Setup
a From the SYSTEMS list, click TEST1.
b From the SETUP list, click Alerts.
c From the ALERT TYPES list, click System.
d Click
next to ALERTS.
e In Alert Name, type cpuUsageReportAlert.
f
Select the Enabled check box.
g From the Alert Rules list, select Any.
h From the lists, select Node CPU Usage and is greater than.
i
In the box to the right of the greater-than symbol (>), type 80.
j
From the Alert Action list, select cpuUsageReport.
k From the Severity list, select High.
l
Click Apply.
8 In the Alert Viewer portlet, review triggered actions.
a Click High to filter the alerts in the portlet by high severity.
b In the SYSTEM NAME filter box, type TEST1 to view alerts for the TEST1 system.
SQL Queries Example
This example describes how to submit a SQL statement as an alert action.
The following is an overview of the process:
1.
2.
3.
4.
5.
6.
7.
8.
9.
Configure login credentials for the Teradata Database system in the Alert Setup portlet.
Configure a SQL query delivery type in the Alert Setup portlet.
Create an action set in the Alert Setup portlet.
Configure the Teradata Database system for Teradata Viewpoint to monitor in the
Teradata Systems portlet.
Configure data collectors to monitor the configured Teradata Database system in the
Teradata Systems portlet.
Define alert rules in the Teradata Systems portlet.
Enable the alert to be generated.
Review the SQL output.
Review alerts in the Alert Viewer portlet.
Example: SQL Queries
Suppose that you want to run the following SQL insert statement as an alert action for the
Teradata Database system TEST1.
This example applies only to core hours.
INSERT INTO admin.sessionHist (TheTime, UserName, SessionCount)
VALUES (CURRENT_TIMESTAMP, ${userName}, ${sessionsForUser})
38
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
This insert is to be performed when the session count for any user on the TEST1 system
exceeds ten.
Notice the alert properties ${userName} and ${sessionsForUser} in the insert
statement above. When you configure an alert action to run SQL statements using the SQL
Queries delivery type, the text can include alert properties that will be replaced with
runtime values. See the topic Alert Properties for a description of the alert properties
available for Teradata Viewpoint alert types.
For this example, assume the target table (admin.sessionHist) has already been created on
TEST1. For example:
CREATE TABLE admin.sessionHist (TheTime TIMESTAMP NOT NULL,
UserName VARCHAR(256) NOT NULL, SessionCount INTEGER NOT NULL)
To configure an SQL statement as an alert action for a Teradata Database system, perform
these steps.
1 In the Alert Setup portlet, configure the login credentials for TEST1.
a From the SETUP OPTIONS list, click Delivery Settings.
b From the AUTHENTICATION list, click Teradata Login.
c Click
next to TERADATA LOGIN.
d Enter the TDPID of the TEST1 system.
e Select the Enable check box.
f
Enter a LOGIN name and password.
g From the Session Character Set list, select UTF8.
h [Optional] From the TEST TERADATA LOGON list, select JDBC.
i
[Optional] Click Test to verify that the logon settings are correct.
j
Click Apply.
2 In the Alert Setup portlet, configure the SQL query for TEST1.
a From the SETUP OPTIONS list, click Delivery Settings.
b From the DELIVERY TYPES list, click SQL Queries.
c Click
next to SQL Queries
d In NAME, type insertSessionHistory.
e Select the Enable check box.
f
In SQL, type:
INSERT INTO admin.sessionHist (TheTime, UserName, SessionCount)
VALUES (CURRENT_TIMESTAMP, ${userName}, ${sessionsForUser})
g Click Apply.
3 In the Alert Setup portlet, create an Action Set.
Teradata Alerts User Guide, Release 14.10
39
Chapter 2 Alert Setup
a From the SETUP OPTIONS list, click Alert Presets.
b From the PRESET OPTIONS list, click Action Sets.
c Click
next to ACTION SETS.
d In ACTION SET NAME, type runSessionCount.
e From the Times list, check the Core check box, and clear both the Evening and
Weekend check boxes.
f
Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
g From the Actions list, click the SQL check box.
h From the Query list, select insertSessionHistory.
i
From the TDPID list, select TEST1 .
j
Click Apply.
4 In the Teradata Systems portlet for Teradata Viewpoint monitoring, configure TEST1.
a Click
next to SYSTEMS and select Add Teradata System.
b In SYSTEM NICKNAME, type 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, configure the data collectors.
a From the SYSTEMS list , click TEST1.
b From the SETUP list, click Data Collectors.
c From the DATA COLLECTORS list, click Sessions.
d Select the Enable Sessions Collector check box and keep the default settings.
e Click Apply.
6 In the Teradata Systems portlet, define alert rules.
a From the SYSTEMS list , click TEST1.
b From the SETUP list, click Alerts.
c From the ALERT TYPES list, click Session.
d Click
next to ALERTS
e In Alert Name, type userSessionCountAlert.
40
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
f
Select the Enabled check box.
g From the Alert Rules list, select All.
h From the lists, select Sessions Per User and is greater than.
i
In the empty field next to the lists, enter the threshold number 10.
j
From the Alert Action list, select runSessionCount.
k From the Severity list, select High.
l
Click Apply.
7 If no single user on TEST1 has more than ten sessions, then create the conditions for the
alert to be raised by opening 11 sessions for a Teradata user.
For example, using BTEQ:
.set sessions 11
.logon TEST1/myUser,myPassword
8 On the TEST1 system, review the sessionHist table. Use a query tool such as BTEQ or
SQL 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 on
the 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.
7. Review alerts in the Alert Viewer portlet.
Example: Run User Program
Suppose that you want to use the batch file echoUsage.bat as an alert action for the
Teradata Database system PROD1, weekends only, and track alerts in the Alert Viewer
portlet. The batch file echoUsage.bat launches the program that monitors the
performance of your system. The program output includes information about the space
usage on PROD1 if the current perm space that is used in any database on the PROD1
system exceeds 80%.
Teradata Alerts User Guide, Release 14.10
41
Chapter 2 Alert Setup
1 Verify that the Teradata Notification Service is running on the Windows server.
a At the Windows command prompts, type services.msc.
b Check that the status for the Teradata Notification Service is started in the list of
services.
c 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.10\Teradata Notification Service\usrcmd.
3 In the Alert Setup portlet, create an action set.
a From the SETUP OPTIONS list, click Alert Presets.
b From the PRESET OPTIONS list, click Core Hours.
c Verify that the WEEKEND HOURS displayed in the box correspond to the weekend
hours that you want for this alert action.
d From the PRESET OPTIONS list, click Action Sets.
e Click
f
next to ACTION SETS.
In ACTION SET NAME, type echoUsageReport.
g From the TIMES check boxes, select the Evening check box, and clear the Core and
Weekend check boxes.
h Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
i
From the ACTIONS list, select Run a program.
j
From the Location list, select Windows.
k From the Program list, select echoUsage.bat.
If the program or script does not appear in the list, verify that it exists at
InstallFolder\Teradata\Client\14.10\Teradata Notification
Service\usrcmd\echoUsage.bat.
l
Leave the Arguments box blank.
m 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 In SYSTEM NICKNAME, type 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.
42
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
f
Click Apply.
5 In the Teradata Systems portlet, configure the data collectors.
a From the SYSTEMS list , click PROD1.
b From the SETUP list, click Data Collectors.
c From the DATA COLLECTORS list, click Database Space.
d Select the Enable Database Space Collector check box and keep the default settings.
e Click Apply.
6 In the Teradata Systems portlet, define alert rules.
a From the SYSTEMS list, click PROD1.
b From the SETUP list, click Alerts.
c From the ALERT TYPES list, click Database Space.
d Click
next to ALERTS.
e Enter the Alert Name echoUsageReportAlert.
f
Select the Enabled check box.
g From the Alert Rules list, select Current Perm.
h In the box to the right of the greater-than symbol (>), type 80.
i
In the Alert Action list, select echoUsageReport.
j
Leave the value unchanged in the Do not run twice in ... minutes box.
k In the Severity list, select Medium.
l
[Optional] Enter a Message.
m Click Apply.
7 In the Alert Viewer portlet, review triggered actions.
a [Optional] Click Medium to filter the alerts in the portlet by normal severity.
b [Optional] In the SYSTEM NAME filter box, type PROD1 to view alerts for the
PROD1 system.
Note: The alert or alert detail information that the Alert Viewer portlet displays does
not include the output of the program or batch file.
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 Program
action. You can define a threshold for a Teradata Database metric when a specific event
occurs. You can then specify that the event triggers an alert. The alert service has access to
information on several properties of a monitored system, depending on the data collectors
Teradata Alerts User Guide, Release 14.10
43
Chapter 2 Alert Setup
that you enable. If you configure the alert to run a program and the program accepts
command-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 Database system in the
Teradata Systems portlet.
6. Define alert rules in the Teradata Systems portlet.
7. Review alerts in the Alert Viewer portlet.
Example: Adding Alert Properties to a Program
Suppose that you want to use the script echoUsage.sh as a medium severity alert action for
the Teradata Database system PROD1, weekends only, and track alerts in the Alert Viewer
portlet. echoUsage.sh launches the program that monitors the performance of your
system. The script reads in any arguments that appear on the command-line and executes the
program using these arguments as run-time parameters. The program output includes
information about the space usage on PROD1 if the current perm space that is used in any
database on the PROD1 system exceeds 80%.
1 Verify that the Teradata Notification Service is running on the Linux server:
a Use the following Linux command to validate that the service is running correctly:
/etc/init.d/tdnotification status
b If the result is not "running," use: /etc/init.d/tdnotification start
2 Copy the script echoUsage.sh to the Linux server at: /opt/teradata/client/
cam/tdnotification/usrcmd/echoUsage.sh.
a Ensure the script echoUsage.sh is executable by the tdnotification service user
account.
3 In the Alert Setup portlet, create an Action Set.
a From the SETUP OPTIONS list, click Alert Presets.
b From the PRESET OPTIONS list, click Core Hours.
c Verify that the WEEKEND HOURS displayed in the box correspond to the weekend
hours that you want for this alert action.
d From the PRESET OPTIONS list, click Action Sets.
e Click
f
44
next to ACTION SETS.
In Action Set Name, type echoUsageSpaceUsedPct.
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
g From the TIMES check boxes, select Weekend, and clear the Core and Evening
check boxes.
h Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
i
From the ACTIONS list, select Run a program.
j
From the Location list, select Linux.
k From the Program list, select echoUsage.sh.
If the script does not appear in the list, verify that it exists at /opt/teradata/
client/cam/tdnotification/usrcmd/echoUsage.sh.
l
In the Arguments box, type -db ${databaseName} -sp ${spaceUsedPct}.
m 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 In SYSTEM NICKNAME, type 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, configure the data collectors.
a From the SYSTEMS list, click PROD1.
b From the SETUP list, click Data Collectors.
c From the DATA COLLECTORS list, click Database Space.
d Select the Enable Database Space Collector check box and keep the default settings.
e Click Apply.
6 In the Teradata Systems portlet, define alert rules.
a From the SYSTEMS list, click PROD1.
b From the SETUP list, click Alerts.
c From the ALERT TYPES list, click Database Space.
d Click
next to ALERTS.
e In Alert Name, type echoPermSpaceLow.
f
Select the Enabled check box.
Teradata Alerts User Guide, Release 14.10
45
Chapter 2 Alert Setup
g From the Alert Rules list, select Current Perm.
h In the box to the right of the greater-than symbol (>), type 80.
i
Click Include or exclude databases and include all databases.
j
From the Alert Action list, select echoUsageSpaceUsedPct.
k Leave the value unchanged in the Do not run twice in ... minutes box.
l
From the Severity list, select Medium.
m Click Apply.
7 In the Alert Viewer portlet, review triggered actions.
a [Optional] Click Medium to filter the alerts in the portlet by normal severity.
b [Optional] In the SYSTEM NAME filter box, type PROD1 to view alerts for the
PROD1 system.
Note: The alert or alert detail information that the Alert Viewer portlet displays does not
include the output of the program or batch file.
Check Logon Timeout with Canary Query Example
This example explores how to create an alert action that is based on an expired timeout
period 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 alert rules in the Teradata Systems portlet.
6. Review alerts in the Alert Viewer portlet.
7. Review alert messages that arrive in the email inbox.
Example: Canary Query Logon Timeout
Suppose that you want to monitor when locks that occur on data-dictionary tables prevent
you from logging on to Teradata system PROD1. You create an alert action that is based on
an expired logon-timeout period using a canary query. Each time the query runs, it attempts
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 Alert Viewer portlet.
1 In the Alert Setup portlet, configure delivery settings.
a From the SETUP OPTIONS list, click Delivery Settings.
b From the DELIVERY TYPES list, click Email.
c Type smtp.example.com as the SMTP Host address of the outgoing (SMTP) email
server.
46
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
d Select the Enable check box.
e From the Port list, select Use default port to use the default port 25.
f
Enter a default Server Timeout of 30 seconds.
g Type [email protected] in the Reply-to box.
h Keep the default Anonymous login.
i
Leave the Advanced box blank.
j
In the Test Recipient box, type [email protected].
k Click Test to verify that the SMTP server delivers the email to [email protected].
l
Click Apply.
2 In the Alert Setup portlet, create an Action Set.
a From the SETUP OPTIONS list, click Alert Presets.
b From the PRESET OPTIONS list, click Action Sets.
c Click
next to ACTION SETS.
d In ACTION SET NAME, type Email dba.
e Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
f
From the Actions list, select Send to person.
g Click BCC or TO and type [email protected] in the Email box.
h Click Apply.
3 In the Teradata Systems portlet for Teradata Viewpoint monitoring, configure PROD1.
a Click
next to SYSTEMS and select Add Teradata System.
b In SYSTEM NICKNAME, type 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 In the Teradata Systems portlet, define a canary query to run on the Teradata system.
a From the SYSTEMS list, click PROD1.
b From the SETUP list, click Canary Queries.
c Click
next to CANARY QUERIES.
Teradata Alerts User Guide, Release 14.10
47
Chapter 2 Alert Setup
d In NAME, type LogonTimeout.
e Select the Enabled check box.
f
In the SQL box, enter SELECT COUNT(*) FROM DBC.DBCInfo;.
g In DEFAULT DATABASE, type DBC.
h From the LOGIN list, select the login credentials you selected for system tasks.
i
Select Log in each time the query executes.
j
In the Time out the login attempt after box, type 20.
This is a timeout period for the logon.
k Leave the other default values unchanged.
l
Click Apply.
5 In the Teradata Systems portlet, define a canary query alert rule.
a From the SYSTEMS list, click PROD1.
b From the SETUP list, click Alerts.
c From the ALERT TYPES list, click Canary Queries.
d Click
next to ALERTS.
e In Alert Name, type Canary Query Logon Timeout.
f
Select the Enabled check box.
g In the first list under Alert Rules, select All.
h From the metric Alert Rules lists, select LogonTimeout, and Login Timeout
Occurred.
i
For Only trigger if alert rule(s) are met for, leave 0 as the default number of
minutes.
j
In the Alert Action list, select Email dba.
k For the Do not run twice in box, leave 0 as the default number of minutes.
l
In the Severity list, select Medium.
m In the Message box, type Logon Timeout occurred on PROD1.
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.
b [Optional] In the SYSTEM NAME filter box, type PROD1 to view alerts for the
PROD1 system.
48
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
7 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 the
inbox.
From: [email protected]
Sent: Tuesday, August 7, 2012 2:23 PM
To: [email protected]
Subject: [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=90
Query Name=LogonTimeout
Response Time=
Login Timeout Occurred=true
Description: ((Canary Id = 90 and Login Timeout Occurred is true))
Teradata MSM Alert Example
This example explores how to define an event-response action in Teradata MSM Setup to
send an alert.
The following is an overview of the process:
1.
2.
3.
4.
5.
6.
Configure email delivery options in the Alert Setup portlet.
Create an action set in the Alert Setup portlet.
Add an ecosystem and component to the Teradata MSM Setup portlet.
Add an event response to the Teradata MSM Setup portlet.
Review alerts in the Alert Viewer portlet.
Review alert messages that arrive in the email inbox.
Example: Teradata MSM Alert
In this example, we send an email alert with warning severity to [email protected], and the
Alert Viewer portlet when a Heartbeat event with code 321 occurs during core hours for the
application server multi_gamma1.
1 In the Alert Setup portlet, configure delivery settings.
a From the SETUP OPTIONS list, click Delivery Settings.
b From the DELIVERY TYPES list, click Email.
c Type smtp.example.com as the SMTP Host address of the outgoing (SMTP) email
server.
d Select the Enable check box.
e From the Port list, select Use default port to use the default port 25.
f
Enter a default Server Timeout of 30 seconds.
Teradata Alerts User Guide, Release 14.10
49
Chapter 2 Alert Setup
g Type [email protected] in the Reply-to box.
h Keep the default Anonymous login.
i
Leave the Advanced box blank.
j
Type [email protected] in the Test Recipient box.
k Click Test to verify that the SMTP server delivers the email.
l
Click Apply.
2 In the Alert Setup portlet, create an Action Set.
a From the SETUP OPTIONS list, click Alert Presets.
b From the PRESET OPTIONS list, click Core Hours.
c Verify that the CORE HOURS displayed correspond to the correct hours for this
alert action.
d From the PRESET OPTIONS list, click Action Sets.
e Click
f
next to ACTION SETS.
In ACTION SET NAME, type multi_gamma1_heartbeat321.
g From the TIMES list, select the Core check box, and clear both Evening and
Weekend check boxes.
h Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
i
From the Actions list, select Send to person.
j
Click BCC or TO and type [email protected] in the Email box.
k Click Apply.
3 In the MSM Setup portlet, add an ecosystem with a component.
a Click Components and Ecosystems to expand the menu.
b Click Manage Components and Ecosystems.
c Click Add.
d In Ecosystem ID, type MULTI.
e In Ecosystem Name, type MTrig.
f
In Default TDPID, type GAMMA1.
g Click Apply.
h From the Manage Components and Ecosystems panel, to the right of the MULTI
ecosystem, click
50
to add a component.
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
i
From the Subcategory list, select APP.
j
In Component ID, type multi_gamma1.
k Leave the default value in the remaining fields.
l
Click Apply.
4 In the MSM Setup portlet, add an event response to the component.
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
f
to the right of multi_gamma1 to open editing.
Click the Event Responses tab.
g To the right of For metric Heartbeat, click Add.
h From the Select response type list, click Execute Action.
i
In the response details area, create the following response to a Heartbeat event:
If an ALERT event type occurs with Warning severity and alert code 321, execute
selected actions.
j
In Action Filter, type multi_gamma1_heartbeat321 and click Search.
k In Available, click the multi_gamma1_heartbeat321 action, then click
move multi_gamma1_heartbeat321 to the Selected field.
l
to
Click OK.
m In the Event Responses tab, verify that the event response trigger you just created is
now in the list under For metric Heartbeat.
n Click Apply.
5 In the Alert Viewer portlet, review triggered actions.
a [Optional] Click Medium to filter the alerts in the portlet by normal severity.
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 the
inbox.
From: [email protected]
Sent: Tuesday, February 29, 2011 1:49 PM
Subject: [Alert] TMSM Resource Alert (Source: TMSM, Type: TMSM Alert)
Event: COMPONENTS
Occurred for resource: TDPID[COMPONENTS] Resource Id[multi_gamma1]
Teradata Alerts User Guide, Release 14.10
51
Chapter 2 Alert Setup
Resource Type[Heartbeat] Unit of Work: NA
Message: 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=NA
TMSM Event Type=ALERT
TMSM Resource Identifier=multi_gamma1
TMSM TDPID=COMPONENTS
Severity Level=Warning
TMSM Alert Code=321
TMSM Resource Type=Heartbeat
TMSM Message contents=test EMAIL FROM CAM
Workload Designer Alert Example
This example shows how to define an exception in the Workload Designer portlet to send an
alert. The example makes the following assumptions:
• The example is implemented first in a test environment. Because only one ruleset can be
active in Workload Designer at a given time, the ruleset you create with this procedure
replaces the currently active ruleset. Applying an untested ruleset to a production system
can degrade performance.
• The example only generates alerts for queries that are classified under the WD-Default
workload for the ALWAYS planned environment.
The following is an overview of the process:
1. Configure the Teradata Database system for Teradata Viewpoint to monitor in the
Teradata Systems portlet.
2. Configure data collectors to monitor the configured Teradata Database system in the
Teradata 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. Activate the ruleset in the Workload Designer portlet.
7. Review alert messages that arrive in the email inbox.
Example: Workload Designer Alert
Suppose that you want to send an email alert to [email protected] during core hours when a
period event begins and ends.
1 In the Teradata Systems portlet, configure TEST1, a Teradata Active System
Management (TASM) system on an Enterprise Data Warehouse (EDW) platform.
a Click
next to SYSTEMS and select Add Teradata System.
b In SYSTEM NICKNAME, type TEST1.
c Select the Enable system check box.
d Enter the TDPID of the TEST1 system.
e [Optional] Enter the SITE ID assigned by Teradata Customer Services.
f
52
Enter a LOGIN name and password.
Teradata Alerts User Guide, Release 14.10
Chapter 2 Alert Setup
g Click Apply.
2 In the Teradata Systems portlet, configure the data collectors.
a From the SYSTEMS list , click TEST1.
b From the SETUP list, click Data Collectors.
c From the DATA COLLECTORS list, select the following collectors, enable them,
and click Apply for each:
• TASM Config
• TASM Distribution
• TASM Exception
• TASM State
• TASM Summary
3 In the Alert Setup portlet, configure delivery settings.
a From the SETUP OPTIONS list, click Delivery Settings.
b From the DELIVERY TYPES list, click Email.
c Type smtp.example.com as the SMTP Host address of the outgoing (SMTP) email
server.
d Select the Enable check box.
e From the Port list, select Use default port to use the default port 25.
f
In Server Timeout, type 30 seconds.
g Type [email protected] in the Reply-to box.
h Keep the default Anonymous login.
i
Leave the Advanced box blank.
j
Type [email protected] in the Test Recipient box.
k Click Test to verify that the SMTP server delivers the email to [email protected].
l
Click Apply.
4 In the Alert Setup portlet, create an Action Set.
a From the SETUP OPTIONS list, click Alert Presets.
b From the PRESET OPTIONS list, click Core Hours.
c Verify that the core hours are correctly set for your environment.
d From the PRESET OPTIONS list, click Action Sets.
e Click
f
next to ACTION SETS.
Enter an Action Set Name, such as CoreHours.
Teradata Alerts User Guide, Release 14.10
53
Chapter 2 Alert Setup
g From the TIMES list, select the Core check box, and clear both the Evening and
Weekend check boxes.
h Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
i
From the ACTIONS list, select the Send to person check box.
j
Click BCC or TO and type [email protected] in the Email box.
k Click Apply.
5 In the Workload Designer portlet, create a period event that triggers the alert email.
a From the For System list, select TEST1.
b Click Create.
c From the General tab, in the Name field, type TEST1_spool.
d Click Save.
e From the ruleset toolbar, click States.
f
Mouse over Planned Events, and click
g Click
.
next to Available Events.
h Select Period Event.
i
In Name, type CoreEnvironment.
j
Select Create New Corresponding Planned Environment to automatically create a
planned environment that this event triggers.
k Select Day of Week, and select all weekdays.
l
Select Start Time, with a 9 am Start Time and 5 pm End Time.
m In the Send Alert row under Notifications, click Start Action and End Action, and
select CoreHours from the drop down list.
n Click OK.
o Click Close.
p Click Save.
6 In the Workload Designer portlet, activate the ruleset.
a Under Working, click the TEST1_alert_email .
b Click Make Active.
c In the Confirm Activation Request dialog box, click Activate.
7 In the email inbox for the account [email protected], check for messages from
[email protected].
54
Teradata Alerts User Guide, Release 14.10
CHAPTER 3
Alerts in Server Management
Server Management
The Server Management portlet allows you to select actions for Server Management
summary alerts.
You can monitor several Server Management instances with Teradata Viewpoint and add
alerts for specific site IDs or all site IDs. You create and select alert action sets from the Alert
Setup portlet.
About Alerts in Server Management
In the Server Management portlet, you can define actions to occur in response to certain
Server Management alerts.
After you add alert action sets in the Alert Setup portlet, they appear in the Server
Management 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 of
the 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.
Teradata Alerts User Guide, Release 14.10
55
Chapter 3 Alerts in Server Management
Alert Properties
These metrics are available for Teradata Server Management alerts. The associated property
names allow you to customize alert actions in the Alert Setup portlet or customize the
message in the Server Management portlet.
Metric
Description
Property Name
Impact
A short impact statement about the problem.
impact
Severity
Severity level of the alert.
severity
Values:
• Unknown
• OK
• Information
• Warning
• Degraded
• Critical
• Fatal
Subsystem
subsystem
Subsystem origin of the alert.
Values:
• Client
• Database
• Network
• Node
• OS
• Power
• ServerMgmt
• Storage
• Other
Synopsis
A short summary of the problem. This includes the
message ID, a short synopsis, and a recommendation.
synopsis
The following metrics are not available in the dialog box, but can be entered in the message
included with the alert by using the property name with the syntax ${alertProperty}. These
properties can also be used to customize alert actions in the Alert Setup portlet.
56
Metric
Description
Property Name
Description
A message describing what occurred, including a
recommendation.
description
Domain
The source where the alert originated. In conjunction
domain
with MessageID, it uniquely identifies the type of alert.
ID
The GUID, a unique global identifier assigned to the
alert.
id
Impact
A short impact statement about the problem.
impact
MessageID
An ID that identifies the rule that processed this alert.
This ID is meant to describe the category of this alert.
messageid
Teradata Alerts User Guide, Release 14.10
Chapter 3 Alerts in Server Management
Metric
Description
Property Name
Scope
Describes the number of alert and component types
involved in the alert scenario. Alert type is defined as a
unique alert Domain/MessageID.
scope
SiteID
The Teradata system that generated this alert.
siteid
Status
The status of the alert.
status
Time
The time and date the alert was detected.
time
Type
The summary or alert type.
type
Adding Site IDs
A site ID represents a Server Management instance and Teradata Viewpoint can monitor
several 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
fails; verify that the settings are correct, and try again.
appears if the operation
Adding and Copying Alerts
You can create alerts for a single site ID or all site IDs and select alert actions from the
configured action sets in the Alert Setup portlet. You can create different alerts to monitor
different conditions for each site ID depending on the purpose of the site ID, such as
production, development, and so on. If you want alerts to monitor the same conditions on
any 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:
• 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.
Teradata Alerts User Guide, Release 14.10
57
Chapter 3 Alerts in Server Management
• 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 the alert
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.
Message can use the following parameters to provide specific details about the alert that
would otherwise not be seen directly with an SNMP trap:
Metric
Description
Property Name
Description
A message describing what occurred, including ${description}
a recommendation.
Domain
The source where the alert originated. In
conjunction with MessageID, it uniquely
identifies the type of alert.
${domain}
ID
The GUID, a unique global identifier assigned
to the alert.
${id}
Impact
A brief description of the alert cause.
${impact}
MessageID
An ID that identifies the rule that processed
this alert. This ID is meant to describe the
category of this alert.
${messageid}
Scope
Describes the number of alert and component
types involved in the alert scenario. Alert type
is defined as a unique alert Domain/
MessageID.
${scope}
Severity
Severity level of the alert group.
${severity}
SiteID
The Teradata system that generated this alert.
${siteid}
Subsystem
The subsystem where the alert originated.
${subsystem}
Status
The status of the alert.
${status}
Synopsis
A brief description of the failure. This can
include the meaning and recommendation.
${synopsis}
Time
The time and date the alert was detected.
${time}
Type
The summary or alert type.
${type}
8 Click Apply.
The icon appears if the operation is successful. The icon
fails; verify that the settings are correct, and try again.
58
appears if the operation
Teradata Alerts User Guide, Release 14.10
Chapter 3 Alerts in Server Management
Disabling Alerts
Disabling an alert makes it temporarily unavailable, while maintaining the configured
settings. 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 From the ALERTS list, select the alert name.
3 Clear the Enabled check box.
4 Click Apply.
The icon appears if the operation is successful. The icon
fails; verify that the settings are correct, and try again.
appears if the operation
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 From the ALERTS list, 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.
Customizing Email Alerts for Server Management Example
Use the Alert Setup and Server Management portlets to send a customized email when
alerts with certain criteria are triggered.
The following is an overview of the process:
1.
2.
3.
4.
5.
In SMWeb, configure the system to forward alerts to the Viewpoint server.
Configure the delivery settings in the Alert Setup portlet.
Create an action set in the Alert Setup portlet.
Define alert rules in the Server Management portlet.
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 or
fatal 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.
Teradata Alerts User Guide, Release 14.10
59
Chapter 3 Alerts in Server Management
b Under Viewpoint Settings, at IP Address, type the IP address of the Viewpoint
server.
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 smtp.example.com.
d Select the Enable check box.
e From the Port list, select Use default port to use the default port 25.
f
Enter a default Server Timeout, in seconds.
g At Reply-to, enter a reply address.
For example, [email protected].
h Leave Advanced blank.
i
At Test Recipient, type [email protected].
j
Click Test to verify that the SMTP server delivers the email to the address you
specified.
k 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 the Action Set Name CustomEmailAlert.
e Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
f
Under ACTIONS, select Send to person.
g At Email, enter [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.
60
Teradata Alerts User Guide, Release 14.10
Chapter 3 Alerts in Server Management
a Under SITE IDS, click TEST1.
next to Alerts.
If you just created TEST1, skip this step. The alert configuration fields are ready for
input.
b Click
c At Alert Name, type 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 CustomEmailAlert.
j
At Message, type Severity is critical or fatal.
k Click Apply.
6 In the email inbox for [email protected], monitor the messages from
[email protected].
Enabling SNMP Traps in Server Management Example
Use the Alert Setup and Server Management portlets to send an SNMP trap notification
when alerts with certain criteria are triggered.
The following is an overview of the process:
1.
2.
3.
4.
5.
In SMWeb, configure the system to forward alerts to the Viewpoint server.
Configure the delivery settings in the Alert Setup portlet.
Create an action set in the Alert Setup portlet.
Define alert rules in the Server Management portlet.
Monitor the notifications that arrive at the SNMP management servers.
Example: Configuring SNMP Traps in Server Management
Suppose you want to send a trap to an SNMP management server when a database alerts
with a warning severity.
For this example, the SNMP management package is running on a system named
prodMgr1. To configure and send an SNMP trap as an alert action, perform the following
steps:
1 In SMWeb, configure the system to forward alerts to the Viewpoint server.
a On the SMWeb Home page, select External Connections.
b Under Viewpoint Settings, at IP Address, type the IP address of the Viewpoint
server.
Teradata Alerts User Guide, Release 14.10
61
Chapter 3 Alerts in Server Management
c Click Save.
2 In the Alert Setup portlet, create an SNMP configuration.
a From the SETUP OPTIONS list, click Delivery Settings.
b From the DELIVERY TYPES list, click SNMP.
c Next to SNMP, click .
d In CONFIGURATION NAME, type snmpConfig.
e Click the Enabled checkbox.
f
In Destination, type prodMgr1 as the hostname for the trap.
g In Community, leave the default value, public.
h Select the Alert message check box.
i
If the Alert description check box is not already selected, select it.
j
Click Apply.
3 In the Alert Setup portlet, create an Action Set.
a From the SETUP OPTIONS list, click Alert Presets.
b From the PRESET OPTIONS list, click Core Hours.
c From the Days lists, select Monday and Sunday.
d From the Time list, select 24 hours.
e From the PRESET OPTIONS list, click Action Sets.
f
Click
next to ACTION SETS.
g In ACTION SET NAME, type snmpTrap.
h From the TIMES check boxes, select Core, Evening, and Weekend.
i
Ensure that the Include in alert log check box is selected under ACTIONS.
This option is selected by default so that you can view alerts for this action set in the
Alert Viewer portlet.
j
From the ACTIONS list, select the SNMP check box.
k From the list of SNMP configurations, select snmpConfig.
l
Click Apply.
4 In the Server Management portlet, configure the alert.
a Click
next to SITEIDS.
b In SiteID, type Gamma1.
c Click Apply.
62
Teradata Alerts User Guide, Release 14.10
Chapter 3 Alerts in Server Management
d From the SITEIDS list, select Gamma1.
e Click
f
next to ALERTS.
In Alert Name, type SM_snmpTrap.
g Click the Enabled checkbox.
h From the Alert Rules list, select All.
i
From the Alert Rules metric list, select: Subsystem, is equal to, and Database.
j
Click
to the right of the metric list.
A second metric list will appear.
k From the second metric list, select: Severity, is greater than or equal to, and
Degraded .
l
Check the Notify again if alert updates check box.
m From the Alert Action list, select snmpTrap
n Accept the default in Do not run twice in...minutes.
o In Message, type the following properties:
SiteID : ${siteid}
${description}
MessageID : ${messageid}
Severity : ${severity}
Note: Include alert properties in the Message field by enclosing the property name in
curly brackets ({}) and preceding the expression with a dollar sign ($) as shown. See
Adding and Copying Alerts for details.
p Click Apply.
5 In the Alert Viewer portlet, review triggered actions.
SNMP Notification Message Example
Note: The description contains the Synopsis and Recommendation.
SiteID : SAMPLEID
Synopsis : TD Manual Database Restart detected PSRType : RootCause
Recommendations : Look for other scheduled activities on the SiteID
and contact the Site Team to remind them to open a Maintenance Window
while providing Service Actions to keep this type of Alert from being
uploaded.
MessageID : TD_RESTART
Severity : Degraded
Teradata Alerts User Guide, Release 14.10
63
Chapter 3 Alerts in Server Management
64
Teradata Alerts User Guide, Release 14.10
CHAPTER 4
Alerts in MSM Setup
MSM Setup
The MSM Setup portlet allows you to define triggers, conditions, and threshold levels for
Teradata MSM and select corresponding alert action sets defined in the Alert Setup portlet.
Alerts are available for use with any of the following:
• Actions
• Event responses
• Scripts for state changes
• Table validation and execution triggers
Adding an Alert Action to an Action Set
An alert action allows you to send an email, perform an SNMP trap, or run a SQL query, a
BTEQ script, or a Windows or Linux executable program. Alert actions are configured in
the Alert Setup portlet and added to action sets.
An action set is a named collection of logical alert actions during a time frame. A group is a
named collection of action sets. You can include action sets in a group to run multiple
action sets in a single event response.
When you add alert actions to action sets in the Alert Setup portlet, the action sets are
available as event responses in the MSM Setup portlet.
1 Go to the Alert Setup portlet to configure the alert service.
2 Configure email settings for alerts.
3 Add SNMP configurations.
4 Add Teradata Login configurations.
5 Add SQL Queries configurations.
6 Add any of the following actions into Action Sets under PRESET OPTIONS:
•
•
•
•
•
•
Include in alert log
Send an email
Notify SNMP system
Run a SQL statement or query
Run a BTEQ script
Run a program
7 Add actions sets into Groups under PRESET OPTIONS.
Teradata Alerts User Guide, Release 14.10
65
Chapter 4 Alerts in MSM Setup
Alert Properties
The following table lists the available properties for Teradata MSM alerts. The associated
property names allow you to customize alert actions in the Alert Setup portlet.
Property
Name
Alert Code
tmsmMessageNbr
Event Message
tmsmMsg
Resource ID
tmsmResourceId
Application ID
tmsmApplicationId
Resource Type
tmsmResourceType
Severity
tmsmCondition
Unit of Work
tmsmUoWId
Ecosystem
tmsmEcosystemId
State
tmsmState
Action Properties
Action property descriptions are listed below.
66
Field
Description
Action Filter
Text string to enter to search for one or more specific actions
Action ID
Unique identifier for an action
Action Type
Type of action to be performed
Application
Application ID is a unique identifier for a Teradata MSM
application
Database
Name of database containing the table
Enabled
When selected, indicates whether the item is enabled
Execute Host
Name of the remote system hosting the execution
Execute Parameters
Additional parameters for the remote execution command
Execute Password
System password for the remote execution
Execute Script
Full path to the remote script to execute
Execute Username
System username for the remote execution
ID
Resource ID
State
State of the process, component, table, or application
Table
Name of the table
TDPID
Teradata Director Program identifier, typically the name of a
Teradata Database
Teradata Alerts User Guide, Release 14.10
Chapter 4 Alerts in MSM Setup
Field
Description
Type
Resource type
When adding an action for executing a script, you can specify execute parameters. Specify
multiple parameters as constant values or variables in [varname] format. Variable
parameters are replaced prior to executing the command. For example, if you type
constant1 [UOW_ID] constant2 and the unit of work identifier from the triggering
event is LOAD20110212, the following command is executed: <Execute Script> constant1
LOAD20110212 constant2. If no unit of work ID exists in the triggering event, the
following command is executed: <Execute Script> constant1 NULL constant2.
The supported variables that can be used as execute parameters and their output
descriptions are listed below.
Execute Parameter
Description
[ALERTCODE]
Numeric code identifying an alert or 0 if none is available
[APP_ID]
Unique identifier for the Teradata MSM application or NULL if none
is available
[DB]
Name of the affected Teradata Database or NULL if none is available
[DML]
DML affecting the table or NULL if none is available
[EVENTDATE]
Date of the event, in yyyy-mm-dd format
[EVENTMSG]
Event message in double quotes
[EVENTTIME]
Time of the event, in hh:mm:ss format
[EVENTTYPE]
Type of event that triggers the execution of an action
[RES_ID]
Resource ID
[RES_TYPE]
Resource type
[SEVERITY]
Severity level of the alert event or 0 if none is available
[TBL]
Name of the affected table or NULL if none is available
[TDP_ID]
Teradata Director Program identifier, typically the name of a Teradata
Database
[UOW_ID]
Unique unit of work identifier or NULL if none is available
[VALUE]
Value specified in the event or NULL if none is available
Adding a Script Action
1 Click Actions to expand the menu.
2 Click Manage Actions.
3 Click Add.
4 Select a Script Action Type from the list.
a Enter an action ID to use when setting up triggers on this action.
Teradata Alerts User Guide, Release 14.10
67
Chapter 4 Alerts in MSM Setup
b [Optional] Select the Enabled check box to allow this action to be triggered.
c [Optional] Enter values for action properties.
5 Click Apply.
Adding a State Change Action
1 Click Actions to expand the menu.
2 Click Manage Actions.
3 Click Add.
4 Select a State Change Action Type from the list.
a Click Add.
b [Optional] Enter a search string in the filter box.
c Click Search.
d For applications, select the check box for each Teradata Database associated with the
application for which you want to add a state change.
e For tables, processes, and components, select one or more items from the Available
box, and click
f
to move them to the Selected box.
Click OK.
5 Select a state from the list for each resource.
6 Click Apply.
Editing an Action
1 Click Actions to expand the menu.
2 Click Manage Actions.
3 [Optional] Select an action type from the list.
4 [Optional] Enter a search string in the filter box.
5 Click Search.
6 Click
to expand the action type list.
7 Do one of the following:
a Select the ENABLED check box to enable the action.
b Clear the ENABLED check box to disable the action.
8 Click
to edit the action.
9 Change values for the action properties and selections.
State change actions can only be added or deleted.
68
Teradata Alerts User Guide, Release 14.10
Chapter 4 Alerts in MSM Setup
10 Do one of the following:
a Select the Enabled check box to allow this action to be triggered.
b Clear the Enabled check box to prevent this action from being triggered.
11 Click Apply.
Deleting an Action
When you delete an action, it is deleted from the Teradata MSM repository.
1 Click Actions to expand the menu.
2 Click Manage Actions.
3 Select an action type from the list.
4 [Optional] Enter a search string in the filter box.
5 Click Search.
6 Click to expand the list of actions under the type.
7 Click
to mark for deletion.
8 Click Apply.
Teradata Alerts User Guide, Release 14.10
69
Chapter 4 Alerts in MSM Setup
70
Teradata Alerts User Guide, Release 14.10
CHAPTER 5
Alerts in Teradata Systems
Alerts in Teradata Systems
The Teradata Systems portlet allows you to define triggers for Teradata Database, Teradata
Aster, and Teradata Hadoop systems and select corresponding alert action sets defined in
the Alert Setup portlet.
Alerts
Alerts monitor the performance of a system and automatically take action when events
occur. 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 Teradata
Systems 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 of
the 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.
You can also choose one of the following alert actions for Teradata Database session alerttypes:
Teradata Alerts User Guide, Release 14.10
71
Chapter 5 Alerts in Teradata Systems
Abort Session
Abort the session for which an alert was detected. This action is only available for
sessions.
Lower Priority
Set the priority of the session for which an alert was detected to the one specified in
the New priority for lower priority action text box, located under Data Collectors
setup for Sessions.
Alert Types
You can set alerts that take place when performance or database space events occur on one
or more systems.
Teradata Database System Alert Types
72
Alert Type Description
Data
Collector
Required
Canary
Queries
Set an alert to occur when the response time for a canary query exceeds
the threshold.
Canary
Queries
Data
Collectors
Set an alert to occur when any errors are encountered by the DCS for
the specified data collectors.
Database
Space
Set an alert to occur when the space used on any resource, such as an
AMP, exceeds the specified percentage.
Database
Space
Events
Set an alert to occur when a Teradata Database restarts.
Alert
Request
Node
Set an alert to occur when the performance on a Teradata Database
reaches the specified threshold at the node level.
System
Statistics
Session
Set an alert to occur when the performance on a Teradata Database
reaches the specified threshold at the session level.
Session
System
Set an alert to occur when the performance on a Teradata Database
reaches the specified threshold.
System
Statistics
System
Health
Set an alert to occur when the system health of a Teradata Database
reaches the specified level.
Table Space Set an alert to occur when one or both of the following thresholds are
exceeded for the DBC.TransientJournal table:
• Space used exceeds the specified size
• Space usage skew percent is greater than the specified percentage
Table Space
Vproc
System
Statistics
Set an alert to occur when the performance on a Teradata Database
reaches the specified threshold at the vproc level.
Teradata Alerts User Guide, Release 14.10
Chapter 5 Alerts in Teradata Systems
Teradata Aster System Alert Types
Alert Type Description
Data
Collector
Required
Data
Collectors
Set an alert to occur when any errors are encountered by the DCS for
the specified data collectors.
Node
Set an alert to occur when the performance on Teradata Aster reaches
the specified threshold at the node level.
Nodes
Process
Set an alert to occur when the performance on Teradata Aster reaches
the specified threshold at the process level.
Processes
System
Set an alert to occur when the performance on Teradata Aster reaches
the specified threshold.
Component
Stats
System
Health
Set an alert to occur when the system health of Teradata Aster reaches
the specified level.
Teradata Hadoop System Alert Types
Alert Type Description
Data
Collector
Required
Data
Collectors
Set an alert to occur when any errors are encountered by the DCS for
the specified data collectors.
HDFS
Set an alert to occur when HDFS metrics on Teradata Hadoop reach the HDFS
specified threshold.
MapReduce Set an alert to occur when the MapReduce metrics on Teradata Hadoop MapReduce
reach the specified threshold.
System
Set an alert to occur when the performance on Teradata Hadoop
reaches the specified threshold.
System Stats
Teradata Database Alert Metrics and Properties
These metrics are available for Teradata Database alerts. The associated property names
allow you to customize alert actions in the Alert Setup portlet or customize the message in
the Teradata Systems portlet.
Metrics for Node and Vproc Alert Types
Metric
Description
Property Name
AMP CPU Skew
(system level)
Comparison of CPU use on the busiest AMP to
the average AMP on the system
ampCpuSkew
AMP CPU Usage
(system level)
Average percent of CPU usage of all online
AMPs in the configuration on the system
aveAmpCpuUsage
Available AWT
Total available AMP worker tasks
availableAWTCount
Teradata Alerts User Guide, Release 14.10
73
Chapter 5 Alerts in Teradata Systems
Metric
Description
Property Name
CIC Usage
Percent of Channel Interface Controller usage for cicUse
this resource
CPU Usage
Percent of CPU usage that is not idle (includes
system CPU and user CPU)
cpuUse
Disk I/O
Number of disk I/Os
diskIO
Disk Out Req Avg
Average number of outstanding disk requests for diskOutReqAvg
this resource
Disk Usage
Percent of disk usage for this resource
diskUse
Host I/O
Number of host I/Os
hostIO
Mem Failures
Segment allocation attempts that failed
memFailures
Message Count
Messages waiting on the vproc
msgCount
Net A Usage
Total BYNET utilization (BYNET receiver usage) netAUse
Net A Usage (system
level)
Total BYNET utilization (average of the online
BYNETs) on the system
systemNetAUse
Node CPU Skew
(system level)
Comparison of CPU use on the busiest node to
the average node on the system
nodeCpuSkew
Node CPU Usage
(system level)
Average percent of CPU usage of all online nodes aveNodeCpuUsage
in the configuration on the system
Node Disk Usage
(system level)
Average percent of disk usage of all online nodes
in the configuration on the system
aveNodeDiskUsage
PE CPU Usage
(system level)
Average percent of CPU usage of all online PEs
in the configuration on the system
avePeCpuUsage
Status
Status of the node, where U means the resource is status
up and D means the resource is down
Swaps
Total number of swap reads and swap writes
swaps
Total Sessions
Number of sessions logged on to the PE
sessLogCount
The following metrics are not available in the dialog box, but can be entered in the message
included with the alert by using the property name with the syntax ${alertProperty}. These
properties can also be used to customize alert actions in the Alert Setup portlet.
74
Metric
Description
Property Name
Id
ID of the process
procId
Node ID
ID of the node
nodeId
Vproc Number
Number of the vproc
vprocNo
Teradata Alerts User Guide, Release 14.10
Chapter 5 Alerts in Teradata Systems
Metrics for Database Space Alert Types
Metric
Description
Property Name
Current Perm %
Percentage of the total permanent disk space the
database is currently using (Current Perm
divided by Max Perm)
spaceUsedPct
Current Perm Max % Current Perm Max * Number of Vprocs / Max
Perm
maxSpaceUsedPct
Current Spool Space
%
Percentage of total temporary spool space the
database is currently using (Current Spool
divided by Max Spool)
currentSpool
Peak Spool Space %
Highest percentage of total temporary spool
space the database has used (Peak Spool divided
by Max Spool)
peakSpool
The following metric is not available in the dialog box, but can be entered in the message
included with the alert by using the property name with the syntax ${alertProperty}. These
properties can also be used to customize alert actions in the Alert Setup portlet.
Metric
Description
Property Name
Database Name
Name of the database
databaseName
Metrics for Session Alert Types
Metric
Description
Property Name
Account
Account from which a query was submitted
userAccount
Active Time
Amount of time the query has been running
activeTime
AMP CPU
Current elapsed CPU time, in seconds, used on
all AMPs by the associated session for executing
requests
ampCPUSec
AMP I/O
Current number of logical Reads and Writes
issued across all AMPs by the associated session
ampIO
Blocked Time
How long the query has been blocked
blockedTime
Connection Time
How long the session has been connected
timeLoggedOn
CPU delta
Total CPU usage time consumed, in seconds,
since the last sample
deltaCPU
CPU Skew
CPU skew during the last sample
cpuSkew
Delta I/O
I/O count since the last sample
deltaIO
Host ID
Host ID or LAN ID associated with the PE that
processed the logon request for the session
hostId
Hot AMP CPU
CPU time of the highest CPU utilized AMP
during the collection interval
hotAmp1CPU
Idle Time
How long the query has been idle
idleTime
Teradata Alerts User Guide, Release 14.10
75
Chapter 5 Alerts in Teradata Systems
Metric
Description
Property Name
Partition
Partition to which the session is connected (SQL, partName
CONSOLE, MONITOR)
Request AMP CPU
Current elapsed CPU time, in seconds, used on
all AMPs by the current request
requestAmpCPU
Request AMP I/O
Current number of logical Reads and Writes
issued across all AMPs by the current request
requestAmpIO
Sessions Per User
Number of sessions logged on under this
username
sessionsForUser
Spool Space
Amount of spool space used across all AMPs by
this request
requestAMPSpool
Utility Session
Session from one of the Teradata utilities,
indicated by True and False
utility
The following metrics are not available in the dialog box, but can be entered in the message
included with the alert by using the property name with the syntax ${alertProperty}. These
properties can also be used to customize alert actions in the Alert Setup portlet.
Metric
Description
Property Name
Session Number
Number of the session
sessionNo
User
User of the session
userName
Blocked Session
Number 1
Session ID of the first blocked query
blk1SessNo
Blocked User Name 1 Name of the user running the first blocked query
blk1Username
Blocked Session
Number 2
blk2SessNo
Session ID of the second blocked query
Blocked User Name 2 Name of the user running the second blocked
query
blk2Username
Blocked Session
Number 3
blk3SessNo
Session ID of the third blocked query
Blocked User Name 3 Name of the user running the third blocked query blk3Username
Metrics for System Alert Types
76
Metric
Description
Property Name
AMP CPU Skew
Comparison of CPU use on the busiest AMP to
the average AMP
ampCpuSkew
AMP CPU Usage
Average percent of CPU usage of all online AMPs aveAmpCpuUsage
in the configuration
Blocked Sessions
Total number of blocked sessions
blockedSessions
Net A Usage
Total BYNET utilization (average of the online
BYNETs) on the system
netAUse
Teradata Alerts User Guide, Release 14.10
Chapter 5 Alerts in Teradata Systems
Metric
Description
Property Name
Node CPU Skew
Comparison of CPU use on the busiest node to
the average node
nodeCpuSkew
Node CPU Usage
Average percent of CPU usage of all online nodes aveNodeCpuUsage
in the configuration
Node Disk Usage
Average percent of disk usage of all online nodes
in the configuration
PE CPU Usage
Average percent of CPU usage of all online PEs in avePeCpuUsage
the configuration
Total Sessions
Total number of logged on sessions
aveNodeDiskUsage
totalSessions
Metrics for System Health Alert Types
Metric
Description
Property Name
Health
Name of the system health state
health
Metrics for Table Space Alert Types
Metric
Description
Property Name
Current Perm
Amount of permanent disk space the
DBC.TransientJournal table is currently using
totalSize
Skew
Percentage of uneven distribution of disk space
used for the DBC.TransientJournal table across
all AMPs
skewPct
Metrics for Canary Queries Alert Types
Metric
Description
Property Name
Node ID
ID of the node
nodeId
Query Name
Name of the query
queryName
Login Timeout
Occurred
Timeout for the login, indicated by True and
False
loginTimeoutOccurred
Response Time
Number of milliseconds it took for the canary
query to return a response
responseTime
Teradata Aster Alert Metrics and Properties
These metrics are available for Teradata Aster alerts. The associated property names allow
you to customize alert actions in the Alert Setup portlet or customize the message in the
Teradata Systems portlet.
Metrics for Node Alert Types
Metric
Description
Property Name
State
State of the node
status
Teradata Alerts User Guide, Release 14.10
77
Chapter 5 Alerts in Teradata Systems
Metric
Description
Property Name
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 and
delegation of queries
• Loader nodes transfer data in and out of
virtual workers
type
CPU
Amount of available processing power used by
the node
cpuUse
Memory
Memory used on the node
memUse
Network In
Rate of network traffic into the node in bytes per
second
netIn
Network Out
Rate of network traffic out of the node in bytes
per second
netOut
Disk In
Rate of disk traffic into the node in bytes per
second
diskWrite
Disk Out
Rate of disk traffic out of the node in bytes per
second
diskRead
% Disk Full
Percent of used disk space on the node. Includes
user data, replica data, and system data
percentFull
Metrics for Process Alert Types
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
Metrics for System Alert Types
78
Metric
Description
Property Name
CPU
Average node CPU use
cpu
Memory
Available amount of memory used by node
memory
Node CPU Skew
Comparison of CPU use on the busiest node to
the average node
nodeCpuSkew
Node I/O Skew
Comparison of I/O use on the busiest node to the nodeIoSkew
average node
Replication Factor
Number of copies of user data
replicationFactor
Active Processes
Number of processes with active queries
activeSessions
Teradata Alerts User Guide, Release 14.10
Chapter 5 Alerts in Teradata Systems
Teradata Hadoop Alert Metrics and Properties
These metrics are available for Teradata Hadoop alerts. The associated property names allow
you to customize alert actions in the Alert Setup portlet or customize the message in the
Teradata Systems portlet.
Metrics for HDFS Alert Types
Metric
Description
Property Name
Blocks Corrupt
Number of blocks whose replicas are all corrupt
corruptBlocks
Blocks Excess
Number of blocks that exceed their target
replication for the file they belong to
excessBlocks
Blocks Missing
Number of blocks with no replicas anywhere in
the cluster
missingBlocks
Blocks Pending
Deletion
Number of blocks waiting for deletion
pendingDeletionBlocks
Blocks Pending
Replication
Number of blocks waiting to be replicated
pendingReplicationBlocks
Blocks Scheduled Number of blocks scheduled for replication
for Replication
scheduledReplicationBlocks
Blocks Under
Replicated
Number of blocks that do not meet their target
replication for the file they belong to
underReplicatedBlocks
Disk Capacity
Used
Number of bytes of disk space currently used by
HDFS
capacityUsed
Disk Usage
Percentage of available disk space used by HDFS hfdsDiskUsage
Files +
Directories
Total number of files and directories in HDFS
filesTotal
Total Load
Number of connections to HDFS
totalLoad
Metrics for MapReduce Alert Types
Metric
Description
Property Name
Jobs Running
Number of jobs currently executing on the
system
jobsRunning
Map Tasks Running
Number of map tasks running
runningMaps
Map Tasks Waiting
Number of map tasks queued to run
waitingMaps
Reduce Tasks
Running
Number of reduce tasks running
runningReduces
Reduce Tasks
Running
Number of reduce tasks queued to run
waitingReduces
Teradata Alerts User Guide, Release 14.10
79
Chapter 5 Alerts in Teradata Systems
Metrics for System Alert Types
Metric
Description
Property Name
CPU Idle
Percentage of CPU time not processing any
commands and the system not having an
outstanding disk I/O request
cpuIdle
CPU Nice
Percentage of CPU time spent executing at the
user level with nice priority
cpuNice
CPU Skew
Comparison of CPU use on the busiest node to
the average node
cpuSkew
CPU System
Percentage of CPU time spent running kernel
code
cpuSystem
CPU Usage
The sum of the CPU user and CPU system usage
percentages.
cpuUse
CPU User
Percentage of CPU time spent running nonkernel code
cpuUser
CPU Wait I/O
Percentage of CPU time spent waiting for I/O
cpuWio
Disk Skew
Comparison of disk space on the most full node
to the average node
diskSkew
Disk Use
Percentage of disk space being used on a system
diskUse
Load average last 15
minutes
Average number of jobs in the job queue over the loadFifteen
last 15 minutes
Load average last 5
minutes
Average number of jobs in the job queue over the loadFive
last 5 minutes
Load average last
minute
Average number of jobs in the job queue over the loadOne
last minute
Memory Usage
Average memory use of the system during a
sample period
memUse
Network In
Rate of incoming network traffic in bytes per
second
bytesIn
Network Out
Rate of outgoing network traffic in bytes per
second
bytesOut
Migrating Alerts
After a Teradata Database system has been configured in Teradata Viewpoint, all of the alerts
except event alerts can be migrated from Teradata Manager to Teradata Viewpoint.
Configured rates cannot be migrated. You must configure data collection rates in Teradata
Viewpoint.
Alerts can only be migrated when there are no alerts in Teradata Viewpoint for a Teradata
Database system; therefore, migrate existing Teradata Manager alerts before adding and
copying alerts.
80
Teradata Alerts User Guide, Release 14.10
Chapter 5 Alerts in Teradata Systems
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 the
migrating database.
6 Select an Authentication Mechanism for the migrating database.
7 [Optional] Under SNMP Config, select the SNMP configuration that you assigned to
any migrated action sets containing an SNMP action.
This is required when the alert actions being migrated contain any SNMP actions. The
SNMP 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 alert
types differ depending on the type of system you choose.
Because you can migrate alerts only when no alerts currently exist in Teradata Viewpoint
for a Teradata Database system, migrate existing Teradata Manager alerts before adding and
copying 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
•
a. Select a scope to apply to the defined rules.
• All applies all of the defined alert rules.
•
•
•
•
Canary
Queries
HDFS
MapReduce
Node
Process
Teradata Alerts User Guide, Release 14.10
Any applies one defined alert rule, depending on which rule first
meets criteria in the definition.
Select
a metric from the list and enter a threshold value.
b.
You can add or remove rules.
•
81
Chapter 5 Alerts in Teradata Systems
Alert Type
Trigger
•
•
c. [Optional] Enter the number of minutes in the Only trigger if alert
rule(s) are met for box.
System
Vproc
The alert triggers if the rule is true for the number of minutes that you
entered.
•
Data
Collectors
a. Select one or more users from the Available box and click
them to the Selected box.
to move
The alert triggers if the metric conditions are encountered for the
selected users.
•
Database
Space
a. Select a metric and enter a threshold value in the box that appears.
The alert triggers if the metric exceeds the value that you enter.
b. [Optional] Click Include or exclude databases to select one or more
databases when triggering the alert.
c. Select Include or Exclude.
d. In the filter box, do any of the following:
• Type a value to filter the list of databases.
• Use the * wildcard character to filter the list of databases.
• Type a wildcard statement and click to move it to the Selected
box.
e. Select one or more databases from the Available box and click to
move them to the Selected box.
Use Ctrl or Shift to select multiple databases.
The alert triggers if the metric conditions are encountered for the included
or excluded databases or wildcard statements.
•
Events
The Database Restart metric is selected.
The alert triggers if the Teradata Database is restarted.
•
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 first
meets 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,
only userName and sessionsForUser metrics are available when
customizing Teradata Alerts alert actions.
•
You can add or remove rules.
c. [Optional] Click Include or exclude users to select one or more users
when triggering the alert.
d. Select Include or Exclude.
e. In the filter box, do any of the following:
• Type a value to filter the list of users.
• Use the * wildcard character to filter the list of users.
82
Teradata Alerts User Guide, Release 14.10
Chapter 5 Alerts in Teradata Systems
Alert Type
Trigger
•
f.
Type a wildcard statement and click
box.
to move it to the Selected
Select one or more users from the Available box and click
them to the Selected box.
to move
Use Ctrl or Shift to select multiple users.
The alert triggers if the metric conditions are encountered for the included
or excluded users or wildcard statements.
•
System
Health
a. Select a health level from the Trigger if system health is this level or
worse list.
b. [Optional] Enter the number of minutes in the Only trigger if alert
rule(s) are met for box.
The alert triggers if the rule is true for the number of minutes that you
entered.
•
Table Space
a. [Optional] Enable and enter a value for one or more of the following
for the 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 for
the table across all AMPs.
The alert triggers if the metric exceeds the value that you entered.
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 alert
action 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 alert
action.
• Lower Priority
This modifies the priority level for the Teradata Database session while
performing the selected alert action. The priority level is configured in the Session
data 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.
Teradata Alerts User Guide, Release 14.10
83
Chapter 5 Alerts in Teradata Systems
The icon appears if the operation is successful. The icon
fails; verify that the settings are correct, and try again.
appears if the operation
Copying Alerts between Systems
You can copy all alerts, except canary query alerts, from one system to another compatible
system.
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.
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 From the ALERTS list, 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.
84
Teradata Alerts User Guide, Release 14.10
CHAPTER 6
Alert Administration in Teradata Database
About Alerts in Teradata Database
Teradata Database can leverage Teradata Alerts for use with your own applications or to
process rules violations in Teradata Workload Management. You can invoke alerts by
inserting rows in the following tables:
Alert Request
The dbcmngr.AlertRequest table can monitor incoming alert requests. The Alert
Request data collector forwards the row contents to the alert service for processing if
the inserted row contains valid data.
Monitor Request
The dbcmngr.MonitorRequest table can monitor progress for any Teradata
Database utility or program. The Alert Request data collector forwards the row
contents to the alert 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 System
Administrator must select Default for Alert Request Collector in the SNMP configuration
under SETUP OPTIONS>Delivery Settings>DELIVERY TYPES>SNMP.
You can view the details of the alert request from the Alert Request data collector in the
Alert Viewer portlet.
Request an Email Alert
In the following example, the SQL statement inserts values into the dbcmngr.AlertRequest
table. 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!');
Monitor a Five-Minute Job
In the following example, a job takes five minutes to complete, but lock conflicts prevent
execution, 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)
Teradata Alerts User Guide, Release 14.10
85
Chapter 6 Alert Administration in Teradata Database
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 does not
finish within ten minutes.
Monitor a Long-Running Job
In the following example, the Alert Request data collector sends updated status information
on long-running jobs. The job uses date and time when inserting into the
dbcmngr.MonitorRequest table. This forces the designated alert action to run. Use the
EventValue or Message fields to indicate current status.
In the following SQL example, [email protected] receives email messages that report on
the progress of a large load job after 150000 rows have loaded. You run the job at regular
intervals. Each time that the job inserts a row, it also inserts the latest row count in 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 descriptions
for the AlertRequest table.
86
Column
Type
Description
Possible Values
ReqDate
DATE
Request date
generated on the
Teradata Database
ReqTime
INTEGER
Request time
generated on the
Teradata Database
JobName
CHAR(60)
Name of the
requesting job
Description
CHAR(120)
Text description of
the event, that is, the
reason for the alert
Event Value
INTEGER
Event value (if
appropriate)
Note: Event Value is null if
the value is unknown or
cannot be represented as a
single numeric value.
ActionCode
CHAR(1)
Type of action being
requested
'E' - Send an email
'L' - Write a log entry
'R' - Run a program
'S' - Send an SNMP trap
Teradata Alerts User Guide, Release 14.10
Chapter 6 Alert Administration in Teradata Database
Column
Type
Description
Possible Values
'T' - Run a BTEQ script
'+' - Run an action set or
group
RepeatPeriod
SMALLINT
Minimum time (in
minutes) between
alerts for this event
0 - Always run the alert.
This value is ignored if the
value of ActionCode is '+'.
Destination
CHAR(120)
Indicates the
destination based on
the ActionCode
'E' - The email address
'R' - The program name to
run
'T' - The BTEQ script to run
'S' - Ignored. Uses the default
SNMP configuration for
Alert Request Collector
'+' - The Action Set or Group
action to run
Message
VARCHAR(600)
Message to send for
this alert
For example, you can send an
email message or numeric
page and callback number as
the Message.
MonitorRequest Table
The following table provides information on the columns, data types, and field descriptions
for the MonitorRequest table.
Column
Type
Description
Possible Values
MonitorId
CHAR(60)
A unique ID for the
job.
Recommended ID values:
Date
StartTime
Host ID
Session ID
ActionDate
DATE
Insert the next row
for this job before the
date specified in
ActionDate.
ActionTime
INTEGER
Insert the next row
for this job before the
time specified in
ActionTime
JobName
CHAR(60)
Name of the
requesting job
EventValue
INTEGER
A value to display in
the Alert Viewer
portlet, or included in
the alert action.
Teradata Alerts User Guide, Release 14.10
For example, if monitoring a
load job, you can use the
number of rows inserted so
far as the EventValue.
87
Chapter 6 Alert Administration in Teradata Database
88
Column
Type
Description
Possible Values
ActionCode
CHAR(1)
Type of action being
requested.
'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 or
group
'0' - The job completed, that
is, no alert ran.
Destination
CHAR(120)
Indicates the
destination based on
the ActionCode.
'E' - The email address
'R' - The program name to
run
'T' - The BTEQ script to run
'S' - Ignored. Uses the default
SNMP configuration for
Alert Request Collector
'+' - The Action Set or Group
action to run
Message
VARCHAR(600)
Message to be sent
for this alert
Teradata Alerts User Guide, Release 14.10
CHAPTER 7
Alert Viewer
Alert Viewer
The Alert Viewer portlet allows users to view alerts defined for the system. The alert
information 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. The
Teradata System Administrator assigns alert severity levels to rank alerts, and can also
include an explanatory message. The severity levels are critical, high, medium, or low. The
alerts displayed in the Alert Viewer portlet are specific to your system.
Alert Example
The Teradata System Administrator can define that a database exceeding a certain amount
of storage usage triggers an alert. After the usage level is exceeded, an alert appears in the
Alert Viewer portlet to inform the portlet user that the threshold was exceeded.
About the Alert Viewer View
The ALERT VIEWER view displays detailed information about what triggered the alert, the
source of the alert, and any relevant messages. You can filter the alerts by severity, time
period, 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 to
change the displayed data in the summary table to only show the alerts of that
severity.
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 the
column headers to group data in ascending or descending order.
Summary Table
Displays summary information about alerts in columns. The current view is
configured in the Columns dialog box. The view is refreshed every 30 seconds. Click
a row in the table to see details.
Teradata Alerts User Guide, Release 14.10
89
Chapter 7 Alert Viewer
Table Actions
Clear Filters removes any content in the filter boxes.
Configure Columns allows you to choose the columns to display and set
thresholds.
Export creates a .csv file containing all available data. If filters are used, only filtered
data is exported.
About Filters and Sorting
Filters allow you to display only rows that match your filter criteria. You can narrow the
search further by filtering on multiple columns. Use greater than or less than symbols when
filtering columns with numeric values. Exact matches may not produce 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 and
applies across all pages of the table. Sort on a column by clicking the column header. A
second click reverses 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, and
secondary sort order is indicated by a double arrow.
The filtering, sorting, and page number settings that you choose for the default or minimized
view are not used when you switch to the maximized view.
Filtering by Severity
You can filter the results to show only alerts with a specific severity level.
90
Teradata Alerts User Guide, Release 14.10
Chapter 7 Alert Viewer
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 1
week.
1 Select a time period from the list.
Filter Symbols
Use wildcard characters or symbols in a filter to expand or limit search criteria. Some
symbols are used for string filtering and others are used for numeric filtering. String filters
are not case sensitive and an asterisk wildcard is applied to the end of the filter string.
Wildcard or
Symbol
?
Description
Use this wildcard character to match alpha or numeric
characters in the position it occupies. Type this wildcard
character at the beginning, middle, or end of your search.
This wildcard character can be used more than once in the
same search.
This wildcard character can be used in conjunction with
any other symbol.
*
>
cat?
cats, catalog
?cat
scat, Scatter
cat?l
catalog
cat???
catalog
p???er
packer, parser, proper
cat, cats, catalog, scatter, wildcat
catalog
cat, cats, catalog
*ews*er
newscaster, newspaper
*%
what is 100%?
=CAT
CAT
=cat?
cats
=Cat*
Cat, Cats, Catalog
=Cat_
Cat_
=Cat\?
Cat?
*\?
what is 100%?
=cat\*
cat*
This symbol can be used in conjunction with *, ?, and \.
cat\?
cat?, Cat?
Use this symbol to match any number that is greater than
the specified value. This symbol is only used to perform
mathematical comparisons.
>60
61, 62, 70, 500, and so forth
Use this symbol at the beginning of your search to match
alpha or numeric characters literally. The search results are
case-sensitive.
This symbol can be used in conjunction with * and ?.
\
Results
Use this wildcard character to match zero, one, or multiple *cat
alpha or numeric characters in the position it occupies.
cat*l
Type this symbol at the beginning, middle, or end of your
search. This wildcard character can be used more than once cat*
in the same search.
This wildcard character can be used in conjunction with
any other symbol.
=
Example
Use this symbol in front of a wildcard character so the
wildcard is interpreted as a regular character and not as a
wildcard.
For columns containing percentages, avoid using % in the
filter. Type only > and the number.
Teradata Alerts User Guide, Release 14.10
91
Chapter 7 Alert Viewer
Wildcard or
Symbol
>=
Description
Example
Results
Use these symbols in conjunction to match values greater
than or equal to the specified number.
>=60
60, 61, 62, 70, 500, and so forth
<60
59, 58, 50, 8, and so forth
<=60
60, 59, 58, 50, 8, and so forth
!cat33
cat32, cat34, and so forth
For columns containing percentages, avoid using % in the
filter. Type only >= and the number.
<
Use this symbol to match any number that is less than the
specified value. This symbol is only used to perform
mathematical comparisons.
For columns containing percentages, avoid using % in the
filter. Type only < and the number.
<=
Use these symbols in conjunction to match values less than
or equal to the specified number.
For columns containing percentages, avoid using % in the
filter. Type only <= and the number.
!
Use this symbol at the beginning of your search to match
alpha or numeric characters that do not contain the alpha
or numeric characters.
This symbol can be used in conjunction with any other
symbol or wildcard character.
Clearing Filters
You can clear the filter box values from the table.
1 Do one of the following:
Option
Description
Clear
individual
filter boxes
Clear all
filter boxes
a. Click
on the filter box.
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 in
the table. The column selection, order, and lock settings that you choose are applied to the
minimized 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.
Mouse over the name to see the complete name.
92
Teradata Alerts User Guide, Release 14.10
Chapter 7 Alert Viewer
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 when
scrolling 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
the column.
in either direction to resize
Exporting Table Data
You can export data to a .csv file for further analysis and formatting. The exported .csv file
contains all available data. If filters are used, only filtered data is exported. The format for the
time, 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 on
the browser settings.
Viewing Alert Details
The ALERT DETAILS view displays details about a specific alert. The details include a
description, message, resulting action, and any alert properties associated with the alert. If
the alert source is Viewpoint or Server Management, 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 for
that alert.
2 Click
Previous/Next to view the details for each alert without returning to the
summary view.
Teradata Alerts User Guide, Release 14.10
93
Chapter 7 Alert Viewer
94
Teradata Alerts User Guide, Release 14.10