Check Logon Timeout with Canary Query Example | Teradata Viewpoint - Example: Checking the Canary Query Logon Timeout - Teradata Viewpoint - Teradata Workload Management

Teradata® Viewpoint User Guide - 24.04

Teradata Viewpoint
Teradata Workload Management
Release Number
April 2024
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 and logs the alert in the Alert Viewer portlet.
  1. In the Alert Setup portlet, configure delivery settings.
    1. From the Setup Options list, select Delivery Settings.
    2. From the Delivery Types list, select Email.
    3. In the SMTP Host box, type 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
    8. Keep the default Anonymous login.
    9. Leave the Advanced box blank.
    10. In the Test Recipient box, type
    11. Select Test to verify the SMTP server delivers the email to
    12. Click Apply.
  2. In the Alert Setup portlet, create an Action Set.
    1. From the Setup Options list, select Alert Presets.
    2. From the Preset Options list, select Action Sets.
    3. Select "" next to Action Sets.
    4. In Action Set Name, type Email dba.
    5. Under Actions, make sure the Include in Alert Viewer check box is selected.
      This option is selected by default so you can view alerts for this action set in the Alert Viewer portlet.
    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
    8. Click Apply.
  3. In the Monitored Systems portlet for Teradata Viewpoint monitoring, configure PROD1.
    1. Next to Systems, select "", then 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, select PROD1.
    2. From the Setup list, select Canary Queries.
    3. Select "" 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, select PROD1.
    2. From the Setup list, select Alerts.
    3. From the Alert Types list, select Canary Queries.
    4. Select "" 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] Select 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, check for messages from

Sample Email Message

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

Sent: Tuesday, August 7, 2012 2:23 PM
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))