Teradata Alerts User Guide

Teradata Alerts
User Guide
Release 15.00
B035-2210-034K
May 2014
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 Marketing Studio, Aster, BYNET,
Claraview, DecisionCast, Gridscale, MyCommerce, SQL-MapReduce, Teradata Decision Experts, "Teradata Labs" logo, Teradata
ServiceConnect, Teradata Source Experts, 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.
Apple, Mac, and OS X all are registered trademarks of Apple Inc.
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 Dell 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.
Quantum and the Quantum logo are trademarks of Quantum Corporation, registered in the U.S.A. and other countries.
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 - 2014 by Teradata. All Rights Reserved.
Table of Contents
Preface.............................................................................................................................................................7
Revision History................................................................................................................................................... 7
Related Documentation.......................................................................................................................................7
Product Safety Information.................................................................................................................................7
Chapter 1:
Overview........................................................................................................................................................9
Introduction to Teradata Alerts.......................................................................................................................... 9
Alerts Integration.......................................................................................................................................... 9
Alert Configuration Workflow..................................................................................................................10
Chapter 2:
Alert Setup.................................................................................................................................................13
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..................................................................................... 19
Configuring User Program Settings...................................................................................................20
Disabling Alert Configurations.......................................................................................................... 20
Deleting Alert Configurations............................................................................................................21
Alert Presets................................................................................................................................................. 22
About Core Hours................................................................................................................................22
Setting Core Hours...............................................................................................................................22
Adding and Editing Action Sets......................................................................................................... 23
Adding and Editing Groups................................................................................................................25
Teradata Alerts User Guide, Release 15.00
3
Table of Contents
Example: Different Alert Actions for Weekday and Weekend Hours..............................25
Example: Managing Email Alert Recipients........................................................................26
Deleting Action Sets or Groups...........................................................................................................26
Alert Exceptions............................................................................................................................................26
Configuring Alert Exceptions..............................................................................................................26
Alert Properties.............................................................................................................................................27
Program Argument to Display All Properties...................................................................................27
SNMP Overview........................................................................................................................................... 28
Teradata Alerts SNMP MIB File..........................................................................................................28
SNMP Configurations.......................................................................................................................... 29
Teradata Viewpoint SNMP Alerts....................................................................................................... 29
Server Management SNMP Alerts...................................................................................................... 29
Alert Request Data Collector Alerts................................................................................................... 30
Workload Designer SNMP Alerts....................................................................................................... 30
Chapter 3:
Alert Configuration Examples................................................................................................. 33
Alert Configuration Examples........................................................................................................................... 33
Customizing Email Alerts Example........................................................................................................... 33
Alert Property Syntax........................................................................................................................... 33
Example: Custom Email Alerts............................................................................................................34
SNMP Trap Example....................................................................................................................................36
Example: SNMP Trap........................................................................................................................... 36
BTEQ Script.................................................................................................................................................. 39
Example: BTEQ Script.......................................................................................................................... 39
SQL Queries Example.................................................................................................................................. 41
Example: SQL Queries..........................................................................................................................42
Run a Program Example..............................................................................................................................44
Example: Run User Program............................................................................................................... 45
Adding Alert Properties as Arguments to the Run a Program Example.............................................. 47
Example: Adding Alert Properties to a Program.............................................................................. 47
Check Logon Timeout with Canary Query Example.............................................................................. 50
Example: Canary Query Logon Timeout........................................................................................... 50
Unity Ecosystem Manager Alert Example................................................................................................ 53
Example: Ecosystem Manager Alert................................................................................................... 53
Workload Designer Alert Example............................................................................................................ 55
Example: Workload Designer Alert.................................................................................................... 55
4
Teradata Alerts User Guide, Release 15.00
Table of Contents
Chapter 4:
Alerts in Server Management............................................................................................................ 59
Server Management.......................................................................................................................................................59
About Alerts in Server Management....................................................................................................................59
Alert Properties.......................................................................................................................................................60
Adding Site IDs....................................................................................................................................................... 61
Adding and Copying Alerts...................................................................................................................................61
Disabling Alerts...................................................................................................................................................... 63
Deleting Alerts........................................................................................................................................................ 63
Customizing Email Alerts for Server Management Example........................................................................... 63
Example: Creating an Email Message for Critical Server Management Alerts.......................................64
Enabling SNMP Traps in Server Management Example...................................................................................66
Example: Configuring SNMP Traps in Server Management.....................................................................66
Chapter 5:
Alerts in Ecosystem Configuration............................................................................................... 69
Ecosystem Configuration..............................................................................................................................................69
Adding an Alert Action to an Action Set............................................................................................................ 69
Actions..................................................................................................................................................................... 70
Managing Actions............................................................................................................................................70
Adding a Script Action..................................................................................................................... 70
Script Properties................................................................................................................................ 71
Execute Parameters........................................................................................................................... 71
Editing a Script Action..................................................................................................................... 72
Adding a Custom Message Action..................................................................................................72
Custom Message Properties.............................................................................................................72
Editing a Custom Message Action.................................................................................................. 73
Removing an Action......................................................................................................................... 73
Chapter 6:
Alerts in Monitored Systems.............................................................................................................. 75
Alerts in Monitored Systems........................................................................................................................................ 75
Alerts........................................................................................................................................................................ 75
Alert Types...............................................................................................................................................................76
Teradata Database System Alert Types.........................................................................................................76
Teradata Aster System Alert Types................................................................................................................77
Teradata Alerts User Guide, Release 15.00
5
Table of Contents
Teradata Hadoop System Alert Types.................................................................................................77
Teradata Database Alert Metrics and Properties..................................................................................... 77
Metrics for Node and Vproc Alert Types........................................................................................... 77
Metrics for Database Space Alert Types.............................................................................................79
Metrics for Session Alert Types........................................................................................................... 79
Metrics for System Alert Types............................................................................................................80
Metrics for System Health Alert Types...............................................................................................81
Metrics for Table Space Alert Types....................................................................................................81
Metrics for Canary Queries Alert Types............................................................................................ 81
Teradata Aster Alert Metrics and Properties............................................................................................ 81
Metrics for Node Alert Types.............................................................................................................. 82
Metrics for Process Alert Types...........................................................................................................82
Metrics for System Alert Types............................................................................................................82
Teradata Hadoop Alert Metrics and Properties....................................................................................... 83
Metrics for HDFS Alert Types............................................................................................................. 83
Metrics for YARN Alert Types (HDP 2.1)......................................................................................... 83
Metrics for MapReduce Alert Types (HDP 1.1 and 1.3).................................................................. 84
Metrics for System Alert Types............................................................................................................84
Migrating Alerts............................................................................................................................................85
Adding and Copying Alerts........................................................................................................................ 85
Copying Alerts between Systems................................................................................................................88
Deleting Alerts.............................................................................................................................................. 88
Chapter 7:
Alert Administration in Teradata Database.............................................................. 89
About Alerts in Teradata Database................................................................................................................... 89
AlertRequest Table....................................................................................................................................... 90
MonitorRequest Table..................................................................................................................................91
Chapter 8:
Alert Viewer...............................................................................................................................................93
Alert Viewer..........................................................................................................................................................93
About Alerts.................................................................................................................................................. 93
About the Alert Viewer View ......................................................................................................................93
About Hiding Alerts.....................................................................................................................................94
Hiding Alerts..........................................................................................................................................95
Displaying Hidden Alerts.....................................................................................................................95
Unhiding Alerts..................................................................................................................................... 96
Viewing Alert Details................................................................................................................................... 97
6
Teradata Alerts User Guide, Release 15.00
Preface
Revision History
Date
Release
Description
May 2014
15.00
•
•
Added Unity Ecosystem Manager Alert example to
Chapter 3
Added chapter 5, Alerts in Ecosystem Configuration
Related Documentation
Access the Teradata Information Products web site to view or download additional
documentation related to this product.
1. Go to www.info.teradata.com.
2. Under the Downloadable Publications subcategory, click General Search.
3. Search on the title or publication product ID.
Title
Publication ID
Teradata Viewpoint User Guide, B035-2206
B035-2206
Describes the Teradata Viewpoint portal, portlets, and system administration
features.
Teradata Viewpoint Configuration and Upgrade Guide, B035-2207
B035-2207
Describes how to configure and upgrade a Teradata Viewpoint server.
Teradata Alerts Installation, Configuration, and Upgrade Guide, B035-2211
B035-2211
Describes how to configure Teradata Alerts on a Teradata Viewpoint server.
Teradata Server Management Web Services User Guide
B035-5350
Describes the SMWeb client and procedures for servicing Teradata hardware.
Unity Ecosystem Manager User Guide, B035-3201
B035-3201
Describes how to use Unity Ecosystem Manager portlets.
Product Safety Information
This document may contain information addressing product safety practices related to data
or property damage, identified by the word Notice. A notice indicates a situation which, if
Teradata Alerts User Guide, Release 15.00
7
Preface
not avoided, could result in damage to property, such as equipment or data, but not related to
personal injury.
Example
Notice: Improper use of the Reconfiguration utility can result in data loss.
8
Teradata Alerts User Guide, Release 15.00
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
Monitored Systems, Workload Designer, and Ecosystem Configuration portlets.
For example, you can:
• Configure the Monitored 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 Ecosystem Configuration portlet to run a BTEQ script when a Heartbeat
event occurs for a defined application server.
• 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 15.00
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.
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:
10
Teradata Alerts User Guide, Release 15.00
Chapter 1 Overview
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
Monitored Systems portlet in the Admin menu
Teradata Workload
Management
Workload Designer portlet
Unity Ecosystem Manager
Ecosystem Configuration 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 15.00
11
Chapter 1 Overview
12
Teradata Alerts User Guide, Release 15.00
CHAPTER 2
Alert Setup
Alert Setup
The Alert Setup portlet enables you to configure delivery settings and actions that are
triggered when the alert service generates an alert. After alert actions have been set up, you
can define the conditions that will cause alerts to be triggered. After setting alert actions in
the Alert Setup portlet, you can use the following portlets to define alert conditions:
Portlet
Interaction
Monitored Systems
Add alerts to a system and set rules to trigger
alerts
Ecosystem Configuration
Configure rules to trigger alerts
Workload Designer
Configure rulesets to trigger an alert when an
exception to the workload occurs
Server Management
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.
Teradata Alerts User Guide, Release 15.00
13
Chapter 2 Alert Setup
3 From the Teradata Login list, do one of the following:
• To add a login configuration, click .
• To copy a login configuration, click next to the login configuration you want to
copy.
• 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 associated Password to be used for BTEQ and SQL
actions.
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 parameters or credentials associated with the selected
logon mechanism.
8 For SQL, under JDBC Authentication Options, select the Logmech Name from the list.
Logon mechanism 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 hostname of the Viewpoint server.
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.
14
Teradata Alerts User Guide, Release 15.00
Chapter 2 Alert Setup
1 From the Setup Options list, click Delivery Settings.
2 From the Delivery Types list, click Alert Viewer.
3 Under Delete Alert Viewer Data, do any of the following:
• Select After to set the retention period.
Enter an integer number in the box and select a time period from the list.
• Select Over to set the file-size restriction.
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 (Optional Java mail) 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.
Teradata Alerts User Guide, Release 15.00
15
Chapter 2 Alert Setup
11 To verify your email delivery settings, enter a valid email address for Test Recipient and
click Test.
The icon
fails.
appears if the operation is successful. The icon
appears if the operation
If the operation is successful, the alert service sends an email message to the test recipient
address.
12 Click Apply.
Postrequisite:
After the email configuration is completed, create an action set.
Related Topics
Adding and Editing Action Sets, on page 23
Adding SNMP Configurations
You can configure the alert service to deliver alert notifications to third-party management
applications using SNMP. After 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 next to SNMP.
• To copy an SNMP configuration, click next to the SNMP configuration you want to
copy.
• To edit an SNMP configuration, click the SNMP configuration name.
4 Enter 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 (the conditions that triggered an alert) followed by the
message.
16
Teradata Alerts User Guide, Release 15.00
Chapter 2 Alert Setup
• Select Alert message to include the message in the SNMP Trap details. For
Monitored Systems alerts, this message is composed when defining the alert rules.
• Select Alert Conditions 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 Ecosystem Manager.
Provider
MIB Location
OID
Alert
Service
/opt/teradata/cam/alert/
config/teradataCamMib.txt on
iso.org.dod.internet.private
.enterprises.teradata.tdproducts.tdcam
Ecosystem
Manager
/opt/teradata/emserver/conf/
Teradata-TMSM-MIB1.txt
iso.org.dod.internet.private
.enterprises.teradata.tdproducts.tmsm.dualActive
the Teradata Viewpoint server
b Click Test to verify the SNMP configuration on the specified destination host or
hosts.
The appears if the operation is successful. The
verify that the settings are correct, and try again.
appears if the operation fails;
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:
After the SNMP configuration is completed, create an action set.
Related Topics
Adding and Editing Action Sets, on page 23
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.
Teradata Alerts User Guide, Release 15.00
17
Chapter 2 Alert Setup
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 After check box to be notified, and indicate the time period. You
configure notifications under Setup Options>Alert Exceptions.
• Select the Terminate After 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.
Postrequisite:
Once the SQL query configuration is done, you must create an action set.
Related Topics
Configuring Alert Exceptions, on page 26
Adding and Editing Action Sets, on page 23
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.
After you configure the BTEQ script settings, 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 After 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
Adding and Editing Action Sets, on page 23
18
Teradata Alerts User Guide, Release 15.00
Chapter 2 Alert Setup
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.
.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
\15.00\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 Alerts User Guide, Release 15.00
SETUP
InstallFolder\Teradata\Client
OPTIONS>Delivery
\15.00\Teradata Notification
Settings>AUTHENTICATI
Service\sql
ON>Teradata Login
19
Chapter 2 Alert Setup
Interface
Program
LOGON ...
Syntax Support
Where to Enter Login
Credentials
Script File Location
Teradata
Manager
DMTEQ
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.
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 After 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
Adding and Editing Action Sets, on page 23
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.
20
Teradata Alerts User Guide, Release 15.00
Chapter 2 Alert Setup
If the Include in Alert Viewer 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, SQL
Query
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.
BTEQ Script,
Program
a. From the Notification Service list, click Windows or Linux, depending
on the operating system the Teradata Notification Service is 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.
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 Setup Options list, click Delivery Settings.
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, SQL query,
Teradata Login
a. From the Delivery Types list, click SNMP or SQL Queries.
b. Click
next to the configuration name, and OK to confirm the
deletion.
Teradata Alerts User Guide, Release 15.00
21
Chapter 2 Alert Setup
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 the Core Hours for core days.
Weekend Hours
The ending time of the ending core day to the beginning time of the beginning
core day.
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 From the Setup Options list, click Alert Presets.
2 From the Preset Options list, click Core Hours.
3 In the Core Hours Details pane, select the beginning and ending core Days from the two
lists.
4 In the Time field, 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.
The hours listed under Evening Hours and Weekend Hours adjust automatically
according to the hours you selected for the core hours.
22
Teradata Alerts User Guide, Release 15.00
Chapter 2 Alert Setup
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 Settings 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.
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
Alert
Viewer
Logs the alert details so you can view alerts for this action set in the Alert Viewer
portlet.
Email
recipients
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 addresses.
The Email recipients 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.
Teradata Alerts User Guide, Release 15.00
23
Chapter 2 Alert Setup
Action
Description
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 Monitored 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.
For Get from alert option, the TDPID must be defined in the Alert Setup
and Monitored 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.
• 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\15.00\Teradata Notification Service
\sql. It is located on the Linux server at: /opt/teradata/
client/cam/tdnotification/sql.
Run a
program
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.
24
Teradata Alerts User Guide, Release 15.00
Chapter 2 Alert Setup
Action
Description
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\15.00\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:
• Click next to Groups to add a group.
• Click next to the group you want to copy.
• Click a 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
Teradata Alerts User Guide, Release 15.00
25
Chapter 2 Alert Setup
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
next to the action set or group configuration you want to delete.
A confirmation message appears.
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.
26
Teradata Alerts User Guide, Release 15.00
Chapter 2 Alert Setup
• [Optional] Select the Alert Viewer 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:
Message
message
Note: When using the Message property as a Run
a Program argument, enclose the property token
in quotes: "${message}".
Note: If an alert contains a source-specific property having the same name as a common
property (for example, severity) Teradata Alerts resolves it to the source-specific property by
default. You can access the common property by preceding the property name with cam:.
For example: cam:severity
Program Argument to Display All Properties
The Run a Program arguments field supports a special ${***} token representing all
properties associated with the alert. This includes the common properties for all alert types,
regardless of the alert source, as well as any application domain-specific properties, such as
Teradata Database and Teradata Server Management alerts.
Each property is assigned an individual command line argument of the form name=value.
For example, suppose you define program arguments (on the Action Set screen) like this:
myAlertTest ${***}. If your program is subsequently executed for a Viewpoint database
space alert, it receives arguments similar to this:
Teradata Alerts User Guide, Release 15.00
27
Chapter 2 Alert Setup
argv[1]: myAlertTest
argv[2]: cam:alertId=123
argv[3]: cam:alertName=dbspace80
argv[4]: cam:alertType=databaseSpace
argv[5]: cam:source=Viewpoint
argv[6]: cam:timestamp=2013-09-05T12:00:00.000-04:00
argv[7]: cam:severity=MEDIUM
argv[8]: cam:systemName=devhost
argv[9]: cam:tdpid=devhost
argv[10]: cam:description=(${maxSpaceUsedPct} > 80.0)
argv[11]: cam:message=Teradata alert for hr_db
argv[12]: databaseName=hr_db
argv[13]: spaceUsedPct=74.512
argv[14]: maxSpaceUsedPct=80.678
argv[15]: currentSpool=0.0
argv[16]: peakSpool=596.0
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 requested the alert or
generated the event that triggered the alert. These include:
• Teradata Viewpoint
• Server Management
• Teradata Alerts
Ecosystem Manager alerts use the Ecosystem Manager MIB,
which is not discussed here.
28
subcomponent
String
Unused.
timestamp
String
A timestamp, formatted as: 2013-05-04T10:06:21.227-08:00.
severity
String
Low, Medium, High, or Critical.
Teradata Alerts User Guide, Release 15.00
Chapter 2 Alert Setup
Field
Type
Values
systemName
String
The system that generated the alert. This varies by the
source of the alert.
details
String
The alert message or conditions that indicate the reason for
the alert.
If both the alert message and the alert conditions are
selected, details contains both the conditions, then the
message, separated by a comma.
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.
Teradata Viewpoint SNMP Alerts
Teradata Viewpoint alerts are defined in the Monitored 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 and/or description:
• message = Message
• conditions = 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.
Teradata Alerts SNMP Fields
Value
alertName
AlertName
source
Server Management
systemName
The site ID being configured
Teradata Alerts User Guide, Release 15.00
29
Chapter 2 Alert Setup
Teradata Alerts SNMP Fields
Value
severity
Severity is automatically mapped based on alert severity:
• Low = Unknown, OK, information
• Medium = Warning
• High = Degraded
• Critical = Critical, fatal
details
The message and/or description:
• message = Message
• conditions = 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 and/or description, as configured in the default
SNMP delivery settings:
• message = AlertRequest.message
• conditions = AlertRequest.description
Note: For AlertRequests, the description column of the dbcmngr
table is used for the Alert Conditions option of the SNMP delivery
settings.
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.
30
Teradata Alerts User Guide, Release 15.00
Chapter 2 Alert Setup
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 and/or description, as
configured in the default SNMP
delivery settings:
• message = AlertRequest.message
• conditions =
AlertRequest.description
TDWM Specific Contents
TDWM: HostID=hostId,
SesNum=sessionNumber,
ReqNum=requestNumber
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
Teradata Alerts User Guide, Release 15.00
31
Chapter 2 Alert Setup
32
Teradata Alerts User Guide, Release 15.00
CHAPTER 3
Alert Configuration Examples
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 Monitored Systems portlet.
Configure data collectors to monitor the configured Teradata Database system in the
Monitored Systems portlet.
5. Define alert rules in the Monitored Systems portlet.
6. Review the alert messages that arrive in the email inbox.
1.
2.
3.
4.
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.
Teradata Alerts User Guide, Release 15.00
33
Chapter 3 Alert Configuration Examples
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.
e Ensure that the Include in Alert Viewer 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 Email recipients.
g Click Bcc or To and type [email protected] in the Email box.
h Click Apply.
3 In the Monitored Systems portlet for Teradata Viewpoint monitoring, configure TEST1.
34
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
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 Monitored 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 Monitored 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 Threshold 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 list, select CustomEmailAlert.
k Leave the value unchanged in the Do not run twice in ... minutes box.
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
Teradata Alerts User Guide, Release 15.00
35
Chapter 3 Alert Configuration Examples
above for the databaseName. See Teradata Database Alert Metrics and 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
Monitored Systems portlet.
4. Configure data collectors to monitor the configured Teradata Database system in the
Monitored Systems portlet.
5. Define alert rules in the Monitored 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.
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.
36
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
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 conditions 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 Viewer 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 Monitored 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 Monitored Systems portlet, configure the data collectors.
Teradata Alerts User Guide, Release 15.00
37
Chapter 3 Alert Configuration Examples
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 Monitored 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 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 databaseName and spaceUsedPct. See Teradata Database Alert
Metrics and 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 conditions and Alert message options
enabled, the trap Details field contains the alert rule conditions 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%.
6 In the Alert Viewer portlet, review triggered actions.
38
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
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
Monitored Systems portlet.
6. Configure data collectors to monitor the configured Teradata Database system in the
Monitored Systems portlet.
7. Define alert rules in the Monitored 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\15.00\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 login settings are correct.
Teradata Alerts User Guide, Release 15.00
39
Chapter 3 Alert Configuration Examples
i
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.
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 Viewer 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 your Windows server.
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\15.00\Teradata Notification
Service\sql.
k From the TDPID list, select TEST1.
l
Click Apply.
5 In the Monitored 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 Monitored Systems portlet, configure the data collectors.
a From the Systems list, click TEST1.
b From the Setup list, click Data Collectors.
40
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
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 Monitored 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 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.
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
Monitored Systems portlet.
Configure data collectors to monitor the configured Teradata Database system in the
Monitored Systems portlet.
Define alert rules in the Monitored Systems portlet.
Enable the alert to be generated.
Review the SQL output.
Teradata Alerts User Guide, Release 15.00
41
Chapter 3 Alert Configuration Examples
9. 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})
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 Teradata Database Alert Metrics and 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.
42
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
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.
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 Viewer 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 Monitored 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 Monitored Systems portlet, configure the data collectors.
a From the Systems list, click TEST1.
Teradata Alerts User Guide, Release 15.00
43
Chapter 3 Alert Configuration Examples
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 Monitored 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.
f
Select the Enabled check box.
g From the Severity list, select High.
h From the Match list, select All.
i
From the lists, select Sessions Per User and is greater than.
j
In the empty field next to the lists, enter the threshold number 10.
k From the Action list, select runSessionCount.
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:
44
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
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
Monitored Systems portlet.
5. Configure data collectors to monitor the configured Teradata Database system in the
Monitored Systems portlet.
6. Define alert rules in the Monitored 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%.
1 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.
2 Copy the batch file echoUsage.bat to the Windows server at InstallFolder
\Teradata\Client\15.00\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 Weekend check box, and clear the Core and
Evening check boxes.
h Ensure that the Include in Alert Viewer 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.
Teradata Alerts User Guide, Release 15.00
45
Chapter 3 Alert Configuration Examples
i
From the Actions list, select Run a program.
j
From the Location list, select your Windows server.
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\15.00\Teradata Notification
Service\usrcmd\echoUsage.bat.
l
Leave the Arguments box blank.
m Click Apply.
4 In the Monitored 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 Monitored 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 Monitored 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 Enable Alert check box.
g In the Severity list, select Medium.
h From the Threshold list, select Current Perm.
i
46
In the box to the right of the greater-than symbol (>), type 80.
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
j
In the Action list, select echoUsageReport.
k Leave the value unchanged in the Do not run twice in ... minutes box.
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
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
Monitored Systems portlet.
5. Configure data collectors to monitor the configured Teradata Database system in the
Monitored Systems portlet.
6. Define alert rules in the Monitored 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%.
Teradata Alerts User Guide, Release 15.00
47
Chapter 3 Alert Configuration Examples
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 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 echoUsageSpaceUsedPct.
g From the Times check boxes, select Weekend, and clear the Core and Evening check
boxes.
h Ensure that the Include in Alert Viewer 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 your Linux server.
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 Monitored 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.
48
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
e Enter a login name and password.
f
Click Apply.
5 In the Monitored 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 Monitored 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 Enable alert check box.
g From the Severity list, select Medium.
h From the Alert Rules list, select Current Perm.
i
In the box to the right of the greater-than symbol (>), type 80.
j
Click Include or exclude databases and include all databases.
k From the Action list, select echoUsageSpaceUsedPct.
l
Leave the value unchanged in the Do not run twice in minutes box.
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.
Teradata Alerts User Guide, Release 15.00
49
Chapter 3 Alert Configuration Examples
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
Monitored Systems portlet.
4. Define a canary query in the Monitored Systems portlet to run on the Teradata system.
5. Define alert rules in the Monitored 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.
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.
50
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
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 Viewer 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 Email recipients.
g Click Bcc or To and type [email protected] in the Email box.
h Click Apply.
3 In the Monitored 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 Monitored 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.
d In Name, type LogonTimeout.
e Select the Enable query 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.
Teradata Alerts User Guide, Release 15.00
51
Chapter 3 Alert Configuration Examples
5 In the Monitored 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 Enable alert check box.
g In the Severity list, select Medium.
h In the Match list, select All.
i
From the metric lists, select LogonTimeout, and Login Timeout Occurred.
j
For Only trigger if alert rule(s) are met for, leave 0 as the default number of minutes.
k In the Action list, select Email dba.
l
For the Do not run twice in box, leave 0 as the default number of minutes.
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.
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))
52
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
Unity Ecosystem Manager Alert Example
This example explores how to define an event-response action in the Ecosystem
Configuration portlet to send an alert.
The following is an overview of the process:
1. Configure email delivery options in the Alert Setup portlet.
2. Create an action set in the Alert Setup portlet.
3. Create an action rule and assign an action set to it in the Ecosystem Configuration
portlet.
4. Review alerts in the Alert Viewer or Ecosystem Explorer portlet.
5. Review alert messages that arrive in the email inbox.
Example: Ecosystem Manager Alert
In this example, we send an email alert with warning severity to [email protected] and the
Alert Viewer portlet when the time elapsed since the last heartbeat exceeds two seconds
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.
g Keep the default Anonymous login.
h Type [email protected] in the Reply-To box.
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.
Teradata Alerts User Guide, Release 15.00
53
Chapter 3 Alert Configuration Examples
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 Viewer 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 Email recipients.
j
Click Bcc or To and type [email protected] in the Email box.
k Click Apply.
3 In the Ecosystem Configuration portlet, assign action rules to servers.
a Click Servers, and then click Manage Servers.
b Click the name of the server, multi_gamma1.
c Click the Action Rules tab.
d Click
next to FOR METRIC HEARTBEAT.
e Enter 2 after If the time elapsed since the last heartbeat exceeds and select Warning
for the alert to be sent with Warning severity.
f
Click OK.
g Click
next to the new rule you created.
h Select the box next to the action set multi_gamma1_heartbeat321, and then click
.
The selected action appears on the right side.
i
Click OK.
j
Click Apply for the changes to take effect.
4 In the Alert Viewer or Ecosystem Explorer portlet, review the triggered alert.
5 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, May 6, 2014 1:49 PM
Subject: [Alert] EM Resource Alert (Source: Ecosystem Manager, Type:
Resource)
Event: COMPONENTS
54
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
Occurred for resource: TDPID[COMPONENTS] Resource Id[multi_gamma1]
Resource Type[Heartbeat] Unit of Work: NA
Message: test EMAIL FROM CAM
Description: EM Resource [COMPONENTS multi_gamma1 ALERT]
Event Timestamp: 2011-02-29T13:48:49.154-08:00
EM Unit of Work Identifier=NA
EM Event Type=ALERT
EM Resource Identifier=multi_gamma1
EM TDPID=COMPONENTS
Severity Level=Warning
EM Alert Code=321
EM Resource Type=Heartbeat
EM 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
Monitored Systems portlet.
2. Configure data collectors to monitor the configured Teradata Database system in the
Monitored 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 Monitored 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.
Teradata Alerts User Guide, Release 15.00
55
Chapter 3 Alert Configuration Examples
d Enter the TDPID of the TEST1 system.
e [Optional] Enter the site ID assigned by Teradata Customer Services.
f
Enter a login name and password.
g Click Apply.
2 In the Monitored 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 email 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 Keep the default Anonymous login.
h Type [email protected] in the Reply-To box.
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.
56
Teradata Alerts User Guide, Release 15.00
Chapter 3 Alert Configuration Examples
d From the Preset Options list, click Action Sets.
e Click
f
next to Action Sets.
Enter an Action Set Name, such as CoreHours.
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 Viewer 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 Email recipients 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
.
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 Configure 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.
Teradata Alerts User Guide, Release 15.00
57
Chapter 3 Alert Configuration Examples
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].
58
Teradata Alerts User Guide, Release 15.00
CHAPTER 4
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 15.00
59
Chapter 4 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
CMIC Version
The version of the CMIC that forwarded the alert.
cmicversion
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
System
The system name from the Summary Alert, if
applicable.
systemname
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.
60
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.
Teradata Alerts User Guide, Release 15.00
Chapter 4 Alerts in Server Management
Metric
Description
Property Name
ID
The GUID, a unique global identifier assigned to the
alert.
id
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
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 SiteIDs.
2 Enter a name up to 15 characters.
3 Click Apply.
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:
Teradata Alerts User Guide, Release 15.00
61
Chapter 4 Alerts in Server Management
a Select the scope of the alert rule using the Match list.
• All requires all criteria match to trigger the alert.
• Any requires any one criterion match to trigger the alert.
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
CMIC Version The version of the CMIC that forwarded the
alert.
62
${cmicversion}
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}
Teradata Alerts User Guide, Release 15.00
Chapter 4 Alerts in Server Management
Metric
Description
Property Name
System
The system name from the Summary Alert, if
applicable.
${systemname}
Time
The time and date the alert was detected.
${time}
Type
The summary or alert type.
${type}
8 Click Apply.
The appears if the operation is successful. The
that the settings are correct, and try again.
appears if the operation fails; verify
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 appears if the operation is successful. The
that the settings are correct, and try again.
appears if the operation fails; verify
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:
Teradata Alerts User Guide, Release 15.00
63
Chapter 4 Alerts in Server Management
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.
b If prompted, log in.
c Under Viewpoint Settings, at IP Address, type the IP address of the Viewpoint server.
d [Optional] Select the Enable Advanced Configuration check box to filter the alerts
that are sent to the Teradata Alerts system based on System Names.
See the Teradata Server Management Web Services Configuration Guide (B035-5351)
for more information.
e Click Save.
2 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 At SMTP Host, enter smtp.example.com.
d Select the Enable email 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 From the Setup Options list, click Alert Presets.
64
Teradata Alerts User Guide, Release 15.00
Chapter 4 Alerts in Server Management
b From the Preset Options list, click Action Sets.
c Click
next to Action Sets.
d Enter the Action Set Name CustomEmailAlert.
e Ensure that the Include in Alert Viewer 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 Email recipients.
g At Email, enter [email protected].
h Click Apply.
4 In the Server Management portlet, configure TEST1.
a Click
next to SiteIDs.
b At Site ID, enter TEST1.
c Click Apply.
5 In the Server Management portlet, define the alert rules for TEST1.
a Under SiteIDs, 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 Click the Enabled checkbox.
e For Match, keep the default of All.
f
From the first list, select Severity.
g From the second list, select is greater than or equal to.
h From the third list, select Critical.
i
Leave the Notify again if alert updates check box selected.
j
Under Alert Action, select CustomEmailAlert.
k In the Message field, type Severity is critical or fatal.
l
Click Apply.
6 In the email inbox for [email protected], monitor the messages from
[email protected].
Teradata Alerts User Guide, Release 15.00
65
Chapter 4 Alerts in Server Management
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 Teradata 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 If prompted, log in.
c Under Viewpoint Settings, at IP Address, type the IP address of the Viewpoint server.
d [Optional] Select the Enable Advanced Configuration check box to filter the alerts
that are sent to the Teradata Alerts system based on System Names.
See the Teradata Server Management Web Services Configuration Guide (B035-5351)
for more information.
e 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 Enable SNMP 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
66
If the Alert Conditions check box is not already selected, select it.
Teradata Alerts User Guide, Release 15.00
Chapter 4 Alerts in Server Management
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 For Time, 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 Viewer 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.
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.
Teradata Alerts User Guide, Release 15.00
67
Chapter 4 Alerts in Server Management
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
68
Teradata Alerts User Guide, Release 15.00
CHAPTER 5
Alerts in Ecosystem Configuration
Ecosystem Configuration
For components monitored by Unity Ecosystem Manager, use the Ecosystem Configuration
portlet to define triggers, conditions, and threshold levels 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 Ecosystem Configuration 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 Viewer
Send an email
Notify SNMP system
Run a SQL statement or query
Run a BTEQ script
Teradata Alerts User Guide, Release 15.00
69
Chapter 5 Alerts in Ecosystem Configuration
• Run a program
7 Add actions sets into Groups under PRESET OPTIONS.
Actions
An action is a user-defined operation triggered when a metric threshold is met. Actions are
messages or scripts. You can add actions to single or bulk alerts. Create actions before setting
up alerts for components.
Managing Actions
Ecosystem Manager allows you to set up the following types of actions:
• Execute scripts
• Send a custom message
A script is a program contained in a file that performs a specific operation. You can set up an
alert that executes a script when a threshold is met. You can monitor script execution in the
Job view in the Ecosystem Explorer portlet. You can download the output of the action.
You can define a custom message to customize the subject and contents of an email sent as a
Teradata Alert (Email Type).
After you create an action, you can add the action to an alert in any of the components. You
can bulk-assign actions to multiple components.
Adding a Script Action
1 Click Actions, and then click Manage Actions.
2 Click
.
3 From the Action Type list, select Execute Script.
4 In Action Name, enter a unique string to identify the action.
5 Select Enabled to allow the action to run.
6 Select Make action execution visible in Explorer Job View to monitor actions in
Ecosystem Explorer.
7 Select Make action output downloadable to allow action results to be included in a log
you can download.
8 Enter the Execute Host.
9 Enter the Execute Username.
10 Enter the Execute Password.
11 Enter the full path to the remote script in Execute Script.
12 Enter parameters for the remote execution command in Execute Parameters.
13 Click Apply.
70
Teradata Alerts User Guide, Release 15.00
Chapter 5 Alerts in Ecosystem Configuration
Script Properties
Field
Description
Action Name
Unique identifier for the action
Teradata Alerts Action
List of users set to receive messages
Enabled
Selection to allow the action to run
Make action execution visible in the Jobs view in Selection to allow you to monitor actions in the
Ecosystem Explorer
Ecosytem Explorer portlet
Make action output downloadable
Selection to allow you to download a log of the
actions
Execute Host
Remote system host
Execute Username
System username for the remote host
Execute Password
System password for the remote host
Execute Script
Full path to the remote script to execute
Execute Parameters
Parameters for the remote execution command.
Specify multiple parameters as constant values or
variables in [varname] format.
For example, enter constant1 [UOW_ID]
constant 2. If the unit of work identifier from the
triggering load event is LOAD20140521, the
following command is executed: <Execute
Script>constant1LOAD20140521constant
2. If no unit of work ID exists in the triggering
event, the following command is executed:
<Execute
Script>constant1NULLconstant2.
Execute Parameters
Parameter
Description
[ALERTCODE]
Numeric code identifying an alert or 0 if none is
available
[APP_ID]
Unique identifier for the Ecosystem Manager
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
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
Teradata Alerts User Guide, Release 15.00
71
Chapter 5 Alerts in Ecosystem Configuration
Parameter
Description
[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 or NULL if
none is available
[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
Editing a Script Action
1 Click Actions, and then click Manage Actions.
2 Click the name of the action you want to edit.
3 Modify the fields.
4 Click Apply.
Adding a Custom Message Action
1 Click Actions, and then click Manage Actions.
2 Click
.
3 From the Action Type list, select Custom Message.
4 Select Enabled to allow the messages to send.
5 Enter an Action Name.
6 Select the Teradata Alerts Action.
7 Enter the Subject for the message.
8 Select the keyword tokens for the message.
9 Click Apply.
Custom Message Properties
72
Field
Description
Enabled
Selection to allow the message to send
Action Name
Display name for the message
Teradata Alerts Action
Recipient list. The list contains email information
set up by a Viewpoint or Teradata Administrator.
Teradata Alerts User Guide, Release 15.00
Chapter 5 Alerts in Ecosystem Configuration
Field
Description
Subject
Subject or keyword token
Body
Keyword token. The token is replaced with the
contents of the alert when the recipient receives
the message. You can add more than one.
Editing a Custom Message Action
1 Click Actions, and then click Manage Actions.
2 Click the name of the custom message.
3 Modify the fields.
4 Click Apply.
Removing an Action
These steps remove the action completely. If you want to temporarily stop the action, clear
the Enabled field in the Edit Action view.
1 Click Actions, and then click Manage Actions.
2 Select the box next to each action you want to remove.
3 Click
to remove your selection.
4 Click OK.
Teradata Alerts User Guide, Release 15.00
73
Chapter 5 Alerts in Ecosystem Configuration
74
Teradata Alerts User Guide, Release 15.00
CHAPTER 6
Alerts in Monitored Systems
Alerts in Monitored Systems
The Monitored 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 Monitored
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 15.00
75
Chapter 6 Alerts in Monitored 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
76
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 15.00
Chapter 6 Alerts in Monitored 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
(HDP 1.1
reach the specified threshold.
and 1.3)
System
Set an alert to occur when the performance on Teradata Hadoop
reaches the specified threshold.
System Stats
YARN
(HDP 2.1)
Set an alert to occur when the YARN metrics on Teradata Hadoop reach YARN
the specified threshold.
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 Monitored 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
Teradata Alerts User Guide, Release 15.00
77
Chapter 6 Alerts in Monitored Systems
Metric
Description
Property Name
AMP CPU Usage
(system level)
Average percent of CPU usage of all online AMPs aveAmpCpuUsage
in the configuration on the system
Available AWT
Total available AMP worker tasks
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
this resource
diskOutReqAvg
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
PE CPU Usage
(system level)
Average percent of CPU usage of all online PEs in avePeCpuUsage
the configuration on the system
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 in to the PE
sessLogCount
availableAWTCount
aveNodeDiskUsage
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.
78
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 15.00
Chapter 6 Alerts in Monitored 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 login request for the session
hostId
Hot AMP CPU
CPU time of the highest CPU utilized AMP
during the collection interval
hotAmp1CPU
Teradata Alerts User Guide, Release 15.00
79
Chapter 6 Alerts in Monitored Systems
Metric
Description
Property Name
Idle Time
How long the query has been idle
idleTime
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 in 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
80
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
Teradata Alerts User Guide, Release 15.00
Chapter 6 Alerts in Monitored Systems
Metric
Description
Property Name
Net A Usage
Total BYNET utilization (average of the online
BYNETs) on the system
netAUse
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 in 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
Monitored Systems portlet.
Teradata Alerts User Guide, Release 15.00
81
Chapter 6 Alerts in Monitored Systems
Metrics for Node Alert Types
Metric
Description
Property Name
State
State of the node
status
Type
Values for node types as follows:
• Worker nodes hold the data and process the
queries
• Queen nodes manage the process, including
the performance of the other nodes and
delegation of queries
• Loader nodes transfer data in and out of
virtual workers
type
CPU
Amount of available processing power used by the cpuUse
node
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
82
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
Teradata Alerts User Guide, Release 15.00
Chapter 6 Alerts in Monitored Systems
Metric
Description
Property Name
Replication Factor
Number of copies of user data
replicationFactor
Active Processes
Number of processes with active queries
activeSessions
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
Monitored 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 YARN Alert Types (HDP 2.1)
Metric
Description
Property Name
Applications Running Number of YARN applications currently
executing
appsRunning
Cluster Memory
Allocated
clusterMemUsed
Percent of the available memory allocated across
all NodeManager instances
Containers Allocated Number of YARN containers currently allocated
Teradata Alerts User Guide, Release 15.00
allocatedContainers
83
Chapter 6 Alerts in Monitored Systems
Metrics for MapReduce Alert Types (HDP 1.1 and 1.3)
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 Waiting Number of reduce tasks queued to run
waitingReduces
Metrics for System Alert Types
84
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 fullest 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
last 15 minutes
loadFifteen
Load average last 5
minutes
Average number of jobs in the job queue over the
last 5 minutes
loadFive
Load average last
minute
Average number of jobs in the job queue over the
last minute
loadOne
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
Teradata Alerts User Guide, Release 15.00
Chapter 6 Alerts in Monitored Systems
Metric
Description
Property Name
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.
1 From the Teradata Viewpoint portal page, click
.
2 Open the Monitored Systems portlet.
3 From the Systems list, click the name of the system you want to update.
4 From the Setup list, click Alerts.
5 From the Alert Types list, click an alert type.
6 Under Alerts, click Migrate Alerts.
7 Enter the log in information for an account that has permission to read data from the
migrating database.
8 Select an Authentication Mechanism for the migrating database.
9 [Optional] For 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.
10 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.
Teradata Alerts User Guide, Release 15.00
85
Chapter 6 Alerts in Monitored Systems
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 an Alert Name.
6 [Optional] Select the Enabled check box to enable the alert.
7 Under Alert Rules, do the following:
Alert Type
Trigger
•
Canary
Queries
HDFS
MapReduce
Node
Process
System
Vproc
a. Select a scope to apply to the defined rules.
• All requires all criteria match to trigger the alert.
• Any requires any one criterion match to trigger the alert.
b. Select a metric from the list and enter a threshold value.
Data
Collectors
Select one or more users from the Available box and click
to the Selected box.
•
•
•
•
•
•
•
You can add or remove rules.
[Optional]
Enter the number of minutes in the Only trigger if alert
c.
rule(s) are met for box.
The alert triggers if the rule is true for the number of minutes that you
entered.
to move them
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.
[Optional]
Click Include or exclude databases to select one or more
b.
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.
86
Teradata Alerts User Guide, Release 15.00
Chapter 6 Alerts in Monitored Systems
Alert Type
Trigger
•
a. Select a scope to apply to the defined rules.
• All requires all criteria match to trigger the alert.
• Any requires any one criterion match to trigger the alert.
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.
Session
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.
• Type a wildcard statement and click to move it to the Selected
box.
f. Select one or more users from the Available box and click to move
them to the Selected box.
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
[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:
Teradata Alerts User Guide, Release 15.00
87
Chapter 6 Alerts in Monitored Systems
• 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.
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.
88
Teradata Alerts User Guide, Release 15.00
CHAPTER 7
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 15.00
89
Chapter 7 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.
90
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
Teradata Alerts User Guide, Release 15.00
Chapter 7 Alert Administration in Teradata Database
Column
Type
Description
Possible Values
'S' - Send an SNMP trap
'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
Teradata Alerts User Guide, Release 15.00
91
Chapter 7 Alert Administration in Teradata Database
92
Column
Type
Description
Possible Values
EventValue
INTEGER
A value to display in
the Alert Viewer
portlet, or included in
the alert action.
For example, if monitoring a
load job, you can use the
number of rows inserted so
far as the EventValue.
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 15.00
CHAPTER 8
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 timestamp,
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. Click on the
column headers to sort data in ascending or descending order.
Teradata Alerts User Guide, Release 15.00
93
Chapter 8 Alert Viewer
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.
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.
Hide Alerts enables you to select and hide alerts so that they are no longer displayed
in the summary list. Hidden alerts can be viewed and then displayed again in the
summary list.
About Hiding Alerts
By default, the Alert Viewer portlet displays all alerts that have been generated. You may
want to hide some alerts so that they no longer appear in the summary list. For example, you
might want to hide all alerts generated for database space conditions, or alerts associated
with conditions that were subsequently resolved.
You can hide alerts so that they are no longer displayed in the Alerts Viewer summary list.
You can also display hidden alerts, and then unhide them. When you display hidden alerts,
the alert rows appear with a line through them, and their associated severity indicators
appear as unfilled squares. If you click the alert to view its details, the severity indicator next
to the alert name also indicates the hidden state of the alert.
The default portlet setting for Alert Viewer is not to display hidden alerts, but you can
change this default behavior using the portlet preference settings.
94
Teradata Alerts User Guide, Release 15.00
Chapter 8 Alert Viewer
Hiding Alerts
You can select and hide alerts from the Alert Viewer summary or from the details view of an
alert.
• If you want to hide only one alert:
Option
Description
From the Alert
Viewer summary
view
a. Click in the row of the alert you want to hide.
b. Select Hide Alert.
The alert is no longer displayed in the summary view.
From the Alert
Viewer summary
view
a. Click in the table header to open the table actions menu.
b. Select Hide Alerts....
c. Click the check box in the row of the alert you want to hide.
d. Click Hide.
The alert is no longer displayed in the summary view.
From the details
view for an alert
a. Click next to the alert name.
b. Select Hide Alert.
The colored severity indicator square appears unfilled to indicate that the
alert is hidden. When you return to the summary view, the alert is no
longer displayed.
• If you want to hide one or more alerts:
a From the Alert Viewer summary view, click
actions menu.
in the table header to open the table
b Select Hide Alerts....
c Click the check boxes in the rows of the alerts you want to hide.
d Click Hide.
The alerts are no longer displayed in the summary view.
Displaying Hidden Alerts
You can designate that hidden alerts be displayed. Hidden alerts are displayed with a line
through them, and their associated severity indicators appear as unfilled squares.
You can also designate whether your setting is saved and used as the default setting when
new instances of the Alert Viewer portlet are added.
1 Click
in the portlet frame and select Settings.
2 Click the Display hidden alerts check box.
3 [Optional] To designate that your choice remains as the default view when new instances
of the Alert Viewer portlet are added, click Save as Default and then Close.
4 Click OK.
Teradata Alerts User Guide, Release 15.00
95
Chapter 8 Alert Viewer
Unhiding Alerts
Prerequisite: You must display alerts that were previously hidden before you can unhide
them.
See:
Displaying Hidden Alerts, on page 95
You can select and unhide an alert from the Alert Viewer summary or from the details view
of an alert. When you unhide an alert, it is displayed again in the Alert Viewer summary, and
the severity indicator associated with it is displayed as a filled square.
• If you want to unhide only one alert:
Option
Description
From the Alert
Viewer summary
view
a. Click in the row of the alert you want to unhide.
b. Select Unhide Alert.
The alert is displayed in its normal active state again in the Alert Viewer
summary, and the severity indicator associated with it is displayed as a filled
square.
From the Alert
Viewer summary
view
a. Click in the table header to open the table actions menu.
b. Select Hide Alerts....
c. Clear the check box in the row of the alert you want to unhide.
d. Click Hide.
The alert is displayed in its normal active state again in the Alert Viewer
summary, and the severity indicator associated with it is displayed as a filled
square.
From the details
view for an alert
a. Click next to the alert name.
b. Select Unhide Alert.
The alert is displayed in its normal active state again in the Alert Viewer
summary, and the severity indicator associated with it is displayed as a filled
square.
• If you want to unhide one or more alerts:
a From the Alert Viewer summary view, click
actions menu.
in the table header to open the table
b Select Hide Alerts....
c Click the check boxes in the rows of the alerts you want to unhide.
d Click Hide.
The alerts are displayed in their normal active states again in the Alert Viewer
summary, and their severity indicators are displayed as filled squares.
96
Teradata Alerts User Guide, Release 15.00
Chapter 8 Alert Viewer
Viewing Alert Details
The alert details view displays details about a specific alert. It includes the following sections.
• General: Indicates the alert type, severity, source, timestamp, resulting action, and alert
criteria.
• Properties: Lists the alert properties and their associated values.
• Messages: Displays any messages issued.
1 In the alert summary view, click anywhere in a row to display the alert details view for
that alert.
Previous/Next to view the details for each alert without returning to the
summary view.
2 Click
Teradata Alerts User Guide, Release 15.00
97
Chapter 8 Alert Viewer
98
Teradata Alerts User Guide, Release 15.00