Help Replication and Event Publishing

CREATE ALERT CONDITIONS FOR CAPTURE command

Use the CREATE ALERT CONDITIONS FOR CAPTURE command to create alert conditions for the Capture program. Each entry represents a condition that the Replication Alert Monitor program looks for. If the condition is true, the Monitor program sends an alert to the corresponding contact or group, or to the operator console.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-CREATE ALERT CONDITIONS FOR CAPTURE -+--------------------+--MONITOR QUALIFIER--mon-qual-->
                                        '-SCHEMA--cap-schema-'                                

>--NOTIFY--+-CONTACT--contact-name-+---------------------------->
           +-GROUP--group-name-----+   
           '-OPERATOR CONSOLE------'   

       .-,---------------------------------.       
       V                                   |       
>-- ( ---+-STATUS DOWN-------------------+-+-- )---------------><
         +-STATUS LAST COMMIT--time-secs-+         
         +-ERRORS------------------------+         
         +-WARNINGS----------------------+         
         +-CURRENT LATENCY--latency------+         
         +-HISTORIC LATENCY--latency-----+         
         '-MEMORY--memory----------------'         

Parameters

SCHEMA cap-schema
Specifies the Capture schema for the server that you are monitoring. The default is ASN.
MONITOR QUALIFIER mon-qual
Specifies the Monitor qualifier.
NOTIFY
Specifies the contact or group of contacts to notify when the alert condition occurs.
CONTACT contact-name
Specifies the contact to notify.
GROUP group-name
Specifies the group to notify.
OPERATOR CONSOLE
For z/OS Specifies that alert notifications are sent to the z/OS® console. This option is valid only if the monitor server is on a z/OS subsystem.
STATUS DOWN
Specifies whether the Monitor program uses the asnccmd status command to verify that the Capture program is running. The asnccmd status command uses the DB2® Administration Server. If the Capture program is not running, an alert is sent.
STATUS LAST COMMIT time-secs
Specifies that the Monitor program calculates the difference between the values of the CURRENT TIMESTAMP and CURR_COMMIT_TIME columns of the IBMSNAP_RESTART table. This option has more delay than the STATUS DOWN option, but can be useful if you do not run the DB2 Administration Server at the monitored server. If the calculated difference is greater than the number of seconds specified, an alert is sent.
ERRORS
Specifies that the Monitor program checks if any error messages were logged in the IBMSNAP_CAPTRACE table, specifically, any rows that have a value of ERROR for the OPERATION column. If any row is fetched, the DESCRIPTION column is included in the alert.
WARNINGS
Specifies that the Monitor program checks if any warnings were logged in the IBMSNAP_CAPTRACE table, specifically, any rows that have a value of WARNING for the OPERATION column. If any row is fetched, the DESCRIPTION column is included in the alert.
CURRENT LATENCY latency
Specifies that the Monitor program calculates the current latency by using the values of the CURR_COMMIT_TIME and MAX_COMMIT_TIME columns in the IBMSNAP_RESTART table. If the latency is greater than the number of seconds specified, an alert is sent.
HISTORIC LATENCY latency
Specifies that the Monitor program calculates the current latency by using the values of the MONITOR_TIME and SYNCHTIME columns in the IBMSNAP_CAPMON table. If the latency is greater than the number of seconds specified, an alert is sent.
MEMORY memory
Specifies whether the Monitor program selects rows from the IBMSNAP_CAPMON table that were inserted since the last Monitor cycle to verify if the CURRENT_MEMORY column exceeded the specified value.

Usage notes

If you specify the same alert condition twice, the ASNCLP program issues an error.

Example

To create alert conditions for the Capture program that sends an alert to the contact REPLADMIN when a condition occurs:
CREATE ALERT CONDITIONS FOR CAPTURE QUALIFIER MYAPPLY01 MONITOR QUALIFIER MONQUAL 
NOTIFY CONTACT REPLADMIN (STATUS DOWN, ERRORS, WARNINGS, SUBSCRIPTION FAILING, 
SUBSCRIPTION DELAYED 300, SUBSCRIPTIONS INACTIVE, SUBSCRIPTIONS REFRESHED, 
TRANSACTION REJECTED, REWORKED ROWS 2, LATENCY 360)


Send your feedback | Information roadmap | Replication group on My developerWorks

Update icon Last updated: 2011-10-21