Example: Checking the Canary Query Logon Timeout - Teradata Viewpoint

Teradata Viewpoint User Guide

Teradata Viewpoint
Release Number
June 2017
English (United States)
Last Update
Product Category
Analytical Ecosystem
Suppose 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 in to PROD1 and then executes a simple SQL statement. If the logon fails, it times out and emails an alert to dba@example.com and logs the alert in the Alert Viewer portlet.
  1. In the Alert Setup portlet, configure delivery settings.
    1. From the Setup Options list, click Delivery Settings.
    2. From the Delivery Types list, click Email.
    3. In the SMTP Host box, type smtp.example.com as the SMTP host address of the outgoing (SMTP) email server.
    4. Select the Enable email check box.
    5. From the Port list, select Use default port to use the default port 25.
    6. Enter a default Server Timeout of 30 seconds.
    7. In the Reply-To box, type doNotReply@example.com.
    8. Keep the default Anonymous login.
    9. Leave the Advanced box blank.
    10. In the Test Recipient box, type dba@example.com.
    11. Click Test to verify that the SMTP server delivers the email to dba@example.com.
    12. Click Apply.
  2. In the Alert Setup portlet, create an Action Set.
    1. From the Setup Options list, click Alert Presets.
    2. From the Preset Options list, click Action Sets.
    3. Click next to Action Sets.
    4. In Action Set Name, type Email dba.
    5. Under Actions, ensure the Include in Alert Viewer check box is selected. This option is selected by default so you can view alerts for this action set in the Alert Viewer portlet.
    6. From the Actions list, select Email recipients.
    7. Select the Email recipients check box, click Bcc or To , and in the Email box, type dba@example.com.
    8. Click Apply.
  3. In the Monitored Systems portlet for Teradata Viewpoint monitoring, configure PROD1.
    1. Click next to Systems and select Add Teradata System.
    2. In SYSTEM NICKNAME, type PROD1.
    3. Select the Enable system check box to activate the PROD1 system for monitoring.
    4. In the TDPID box, type the TDPID of the PROD1 system.
    5. Enter a login name and password.
    6. Click Apply.
  4. In the Monitored Systems portlet, define a canary query to run on the Teradata system.
    1. From the Systems list, click PROD1.
    2. From the Setup list, click Canary Queries.
    3. Click next to Canary Queries.
    4. In Name, type LogonTimeout.
    5. Select the Enable query check box.
    6. In the SQL box, enter SELECT COUNT(*) FROM DBC.DBCInfo;.
    7. In Default Database, type DBC.
    8. From the Login list, select the login credentials you selected for system tasks.
    9. Select Log in each time the query executes.
    10. In the Time out the login attempt after box, type 20. This is a timeout period for the logon.
    11. Leave the other default values unchanged.
    12. Click Apply.
  5. In the Monitored Systems portlet, define a canary query alert rule.
    1. From the Systems list, click PROD1.
    2. From the Setup list, click Alerts.
    3. From the Alert Types list, click Canary Queries.
    4. Click next to Alerts.
    5. In Alert Name, type Canary Query Logon Timeout.
    6. Select the Enable alert check box.
    7. In the Severity list, select Medium.
    8. In the Match list, select All.
    9. From the metric lists, select LogonTimeout, and Login Timeout Occurred.
    10. For Only trigger if alert rule(s) are met for, leave 0 as the default number of minutes.
    11. In the Action list, select Email dba.
    12. For the Do not run twice in box, leave 0 as the default number of minutes.
    13. In the Message box, type Logon Timeout occurred on PROD1.
    14. Click Apply.
  6. In the Alert Viewer portlet, review triggered actions.
    1. [Optional] Click Medium to filter the alerts in the portlet by normal severity.
    2. [Optional] In the SYSTEM NAME filter box, type PROD1 to view alerts for the PROD1 system.
  7. In the email inbox for the account dba@example.com, check for messages from doNotReply@example.com.

Sample Email Message

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

From: doNotReply@example.com
Sent: Tuesday, August 7, 2012 2:23 PM
To: dba@example.com
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))