Creating an Alert

Use the Add Alert wizard to create an alert instance for your resource.
Prerequisites

Warning!  Use caution in writing scripts. A poorly designed script can cause a blocking situation, creating a lock-up in your Sybase Control Center server.
Note: Only alerts on Adaptive Server or Replication Server resources can trigger script execution.
  1. In the Perspective Resources view, click the server or other resource and select Resource > Properties in the view’s menu bar.
  2. Select Alerts in the left pane and click Add. The Add Alert Wizard opens. If the selected resource supports child alerts, the wizard opens to the Resource page. If the resource does not support child alerts, the wizard opens to the Type page.
  3. On the Resource page of the wizard, select the object on which you want to set the alert. Expand the folder representing the server or agent to select lower-level child objects.
  4. Click Next. The Type page of the wizard appears.
  5. Select the alert type and click Next.
    For this step and the next one, see the topic on key performance indicators for information on what this alert monitors and how it is triggered. (Each alert is based on a KPI.)
  6. Based on the type of alert you selected, do one of the following:
    • For a state-based alert: Select a severity level for each alert state.
      Note: You can associate only one severity level with each state.
    • For a threshold-based alert: Review and if necessary adjust the range of values that defines each severity.
  7. Click Next.
    The Storm Suppression page of the wizard appears.
  8. Enter the storm suppression period, which suppresses redundant alerts resulting from the same condition (an alert storm) for the specified period of time. (The default is 60 seconds.) Enter this value in seconds, minutes, or hours in Storm Suppression Period and click Next.
  9. (Optional; not available for alerts on Sybase IQ servers) To configure this alert to trigger the execution of a script:
    1. Type Configuration specifies the alert severity level that triggers the script. Select Critical, Warning, or both.
      Critical is more serious than Warning.
    2. Enter or browse to the location of the script.
    3. Enter parameter values in the Execution Parameters box. The string you enter is passed on the command line to the script. You can include a number of predefined substitution parameters, which are replaced by values from the alert. See the example (below) and the substitution parameters topic (linked below) for more information.
    4. Click Next.
    If the selected resource has sibling resources (databases or devices of the same type, for example) that support this alert type, the Duplicates page appears. If the selected resource has no identical siblings, the Subscription page appears.
  10. (Optional) On the Duplicates page, select any resources that should use this alert definition as a template for their own alerts. Click the box at the top of the list to select all the resources listed. Then click Next.
    This step saves time when you need to configure similar alerts for several resources of the same type.
  11. (Optional) On the Subscription page, specify e-mail addresses if you want this alert to issue e-mail notifications when it fires.

    The e-mail addresses default to the address in your user profile, but you can override the defaults.

    For both critical and warning alerts:
    Alert subscription details
    Option Description
    E-mail Message To send an e-mail notification when this alert fires, click the E-mail Message box and enter the e-mail address of one user or list.
    Escalation E-mail To escalate this alert (by sending an e-mail notification to another address when this alert has not been responded to after a specified period of time), click the Escalation E-mail box and enter the e-mail address of one user or list. Note that you cannot enter an escalation address unless you enter an address for primary notification first.
    Time Period Enter the amount of time to wait, following the initial alert notification, before Sybase Control Center sends an e-mail notification to the escalation address.
  12. Click Finish.

Example: An alert-triggered script

This sample script is a Windows .bat file:
@echo off
@echo. >> stest.txt
@echo %date% %time% >> stest.txt
@echo arg0: %0 >> stest.txt
@echo arg1: %1 >> stest.txt
@echo arg2: %2 >> stest.txt
@echo arg3: %3 >> stest.txt
@echo arg4: %4 >> stest.txt
@echo arg5: %5 >> stest.txt
@echo arg6: %6 >> stest.txt
@echo arg7: %7 >> stest.txt
@echo arg8: %8 >> stest.txt
@echo arg9: %9 >> stest.txt
@echo. >> stest.txt

This is a sample execution parameter string for the script above:

Time:%Time% 
Severity:%Severity% 
Resource:%Resource% 
Server:%Top_resource% 
KPI:%KPI% 
State:%Current_state% 
URL:%SCC_URL%

The script’s ouput might look like this:

Tue 12/15/2009 14:54:45.58 
arg0: C:\project\sccmain\script-test.bat 
arg1: Time:"Mon Dec 21 21:30:04 2009" 
arg2: Severity:CRITICAL 
arg3: Resource:"SCC Tester 1" 
arg4: Server:"SCC Tester 1" 
arg5: KPI:kpi_scc_mostate_primary 
arg6: State:ERROR 
arg7: HYPERLINK "http://ik-scc.sybase.com:8282/scc"URL:http://ik-scc.sybase.com:8282/scc 
arg8: 
arg9:
Related concepts
Alerts
Related reference
Replication Data Collections
Key Performance Indicators and Key Performance Areas for Replication


Created February 25, 2010. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com