Index Changes
ESB Console Home

Alert Configuration Service Details - From Java CAPS 5.1.x to Java CAPS 6.x

Alerts Configuration

  • Out-of-box configuration
    • By default, alerts are not not persisted in the alerts sub-system (in the application server). If an alert is generated and there are no active clients listening (e.g Enterprise Manager), then the alert is subsequently dropped. In this configuration, to ensure that alerts are captured, an active client (i.e. Enterprise Manager) must be running.
  • Configuration using ConfigAgent
    • Alerts Configuration
    • Users who do not have the Java CAPS Enterprise Manager's Configuration Agent, can use the Common Management and Monitoring API's Alert Framework Configuration Service API to configure the Alert Framework. To see how this is done, see ESBConsoleTestAlertFrameworkConfigurationServiceInJava
    • Important note: The supported databases are DB2, Oracle, Pointbase, Sybase, and Derby. You have to start the DB before you can configure persistence. And once you configure persistence and/or journaling, you have to always make sure your DB is started before you start the App Server. Moreover, if you are using any other database than Derby, you have to make sure you set up the data source on the app server before you do any configuration from the EM.
      • For Derby database: /appserver/bin/asadmin start-database
    • You can use the ConfigAgent to configure the alert sub-system to store alerts temporarily in a DB which then are available for delivery to clients later. The various settings are detailed below:
    • There are 2 ways you can access the ConfigAgent web application
      • http://localhost:4848/configagent
      • via Enterprise Manager - right-click on the app server node and select Configure Alert Management
  • Configuration using CAPS Management and Monitoring API kit
    • Details on using the API kit to configure the alerts sub-system as discussed below.

Alerts configuration service - Details on using the API kit to configure the alerts sub-system

Proposed alerts configuration service

The purpose of the proposed service is to allow enterprise manager as well as other management client to manage and control the delivery reliability of alerts from the event management component to the clients. The enterprise manager channel if available will always receive the alerts, all other client required to register in order to receive the alerts. the configuration to manage include enabling/disabling the persistence of alerts in the embeded database ( future enhancement will allow for external database), the size of in-memory and the persisted caches as well as the policy to manage deletion of alerts.

Persisted Alerts removal policy

In current design and implementation the user has control over the following items to define the composite policy.

  1. ALERTS COUNT - The maximum number allowed to be persisted. if this policy is enforced the oldest generated alerts will be removed
  2. ALERTS AGE - The user is allowed to define the maximum time ("age") the alerts is allow to be persisted.
  3. ALERTS LEVEL - The generated alerts have one of the following priority level associated with them (from low to high):
    INFO,WARNING,MINOR,MAJOR,CRITICAL & FATAL. All The alerts that have lower priority up to the Defined level will removed.

The implementation is enforcing the policy based on "first come first served" policy as defined in the following API section.
The policy is a combination of all the policy items defined (an and condition) and is applied even if the result of the executed policy item nullify the execution of the next policy item.

Alerts configuration Service API

    /**
     * Enable alerts persistence in the alerts database. enabling it allow for reliable alerts 
     * delivery in case of delivery channel failure or Application server restart.
     *  
     * @param enableJournaling 
     *                    true - will prevent the system from removing alerts after they are delivered.
     *                           The alert stay in the database until the user remove them  
     *                    false - The system will remove the alert upon acknowledgment from the reliable
     *                            client in case one was setup or upon send the alert to all the non reliable
     *                            client/s.
     * @throws ManagementRemoteException if JMX related exception is thrown or the list of target name is 
     *         null or empty.
     */
     public void enableAlertsPersistence(Boolean enableJournaling) throws ManagementRemoteException;
    
     /**
      * Disable alerts persistence in the alerts database.
      * 
      * @throws ManagementRemoteException if JMX related exception is thrown or the list of target name is 
      *         null or empty.
      */
      public void disableAlertsPersistence() throws ManagementRemoteException;
 
     
     /**
     * @return the last setting of alert persistence enabling operation.
     *         true if enable otherwise false.
    * @throws ManagementRemoteException if JMX related exception.
     */
    public  Boolean isAlertsPersistenceEnabled()throws ManagementRemoteException;
    
    /**
     * @return the last setting of alert journal enabling operation.
     *         true if enable otherwise false.
    * @throws ManagementRemoteException if JMX related exception.
     */
    public Boolean isAlertsJournalEnabled()throws ManagementRemoteException;
 
    /**
     * set the JNDI name of the data source database to be used for persistence.
     * if not provided at least once the persistence will be disabled even 
     * if enableAlertsPersistence was set to true.
     * 
     * @param jndiName - of the data source to be used in conjunction with 
     *   enableAlertsPersistence set to true

     * @throws ManagementRemoteException if JMX related exception is thrown or
     *         jndiName parameter is null or empty.  
     */
    public void setPersistenceDataSourceJndiName(String jndiName) throws ManagementRemoteException;
    
    /**

     * @return the last set JNDI name for the alert persistence data source.
     * @throws ManagementRemoteException
     */
    public String  getPersistenceDataSourceJndiName() throws ManagementRemoteException;

    /**
     * set the database type to be used for persistence.
     * DERBY is the assumed default database. If different database is used this method should
     * be called prior to enabling the persistence.  
     * 

     * @param dbtype - one of the predefined typed defined in {@link com.sun.caps.management.api.alerts.AlertPersistenceDBType}
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public void setPersistenceDataBaseType(AlertPersistenceDBType dbtype) throws ManagementRemoteException;
    
    /**
     * @return The return value represent the last set DB type 
     *             {@link com.sun.caps.management.api.alerts.AlertPersistenceDBType} for each.
     *             
     * @throws ManagementRemoteException if JMX related exception is thrown.     */
    public AlertPersistenceDBType  getPersistenceDataBaseType() throws ManagementRemoteException;
    
    
    /**
     * Set the maximum time a persisted alert will be stored in the alert database before it will be deleted
     * as part of the removal policy 
     * @param timeToLive - maximum time in millisecond.
     * 
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public void setPersistedAlertsMaxAge(Long timeToLive) throws ManagementRemoteException;
    
    /**
     * return the last setting for the allowed persisted alert age.
     * A value of 0 current time which could cause all persisted alerts to be deleted.
     * A negative value this policy element is ignored.   
     * @return  the returned value  representing as time in milliseconds set for each.
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public Long getPersistedAlertsMaxAge() throws ManagementRemoteException;

    /**
     * set the maximum number of  alerts allowed to be persisted  before it will be deleted
     * as part of the removal policy   
     * @param size - Maximum number of alerts.
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public void setPersistedAlertsMaxCount(Long size) throws ManagementRemoteException;
    
    /**
     * return the last setting for the  maximum of  alerts allowed to be persisted.
     * A value of 0 mean no alerts persisted. It behave as if the user 
     *  set enableAlertsPersistence to false
     *   
     * A negative value this policy element is ignored.   
     * @return the returned value represent the maximum number of  alerts allowed to be persisted
     *         on each target.
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public Long  getPersistedAlertsMaxCount() throws ManagementRemoteException;
    
    /**
     *  The priority based alert level that will be part of the removal policy.
     *  the priorities are as follows (from low to high):
     *  INFO,WARNING,MINOR,MAJOR,CRITICAL,FATAL.
     *  all alerts from the provided level and below will be candidates for removal.
     *  
     * @param level - an AlertLevelType representing the level.
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public void setPersistedAlertsLevel(AlertLevelType level) throws ManagementRemoteException;
    
    /**
     * @return  the returned value represent the last setting for the level of alerts 
     *          that allowed to be removed from persistence for each target.
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public AlertLevelType getPersistedAlertsLevel() throws ManagementRemoteException;
   

    /**
     * set the effective policy for the removal of persisted alerts.
     * @param policyList - an array of AlertRemovalPolicyType where the priority
     *                     of the given policy is defined by its position in the list.
     *                     i.e the lower the index that policy will be applied first.
     *                     possible values are:
     *                     ALERTS_AGE,ALERTS_COUNT,ALERTS_LEVEL.
     *                     
     *                     null value or empty array indicate no policy will be enforced.

     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public void setPersistedAlertsRemovelPolicy(AlertRemovalPolicyType[] policyList) throws ManagementRemoteException;
    
    /**
     * @return the return value representing an array the last setting the policy used when persisted alerts
     *         are to be removed. An empty array mean no policy is enforced.
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public String[] getPersistedAlertsRemovalPolicy() throws ManagementRemoteException;

    
    /**
     * enable or disable the ability to use removal policy.
     * @param enableExecuation -  true the current setting is enforced. False the current policy is ignored.  

     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public void enablePersistedAlertsPolicyExecution(Boolean enableExecution) throws ManagementRemoteException;
    

    /**
     * @return the returned value  represent the last setting that enable/disable the persisted alerts 
     *         removal policy   
     * @throws ManagementRemoteException
     */
    public Boolean isPersistedAlertsPolicyExecutionEnabled()throws ManagementRemoteException;
    
    /**
     * set how often the persisted alerts removal policy will be executed.
     * @param excutionInterval - The interval is defined in milliseconds.  

     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public void setPersistedAlertsRemovelPolicyExecInterval(Long excutionInterval) throws ManagementRemoteException;
    
    /**
     * @return the returned value representing The last interval setting of the persisted 
     *         alerts removal policy will be executed.
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public Long getPersistedAlertsRemovelPolicyExecInterval() throws ManagementRemoteException;
    

    /**
     * set the maximum number of alerts that will be cached in memory prior to being
     * delivered to the registered listeners.
     * @param cacheSize - Max. number of alerts
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public void setInMemoryAlertsCacheMaxSize(Integer cacheSize) throws ManagementRemoteException;
    
    /**

     * @return the returned value represent The last setting of the maximum size of in memory alerts cache.
     * @throws ManagementRemoteException if JMX related exception is thrown.
     */
    public Integer getInMemoryAlertsCacheMaxSize() throws ManagementRemoteException;
    
    /**
     * Set the persisted alerts table name.
     * Note: if the same database is used across the whole enterprise. it
     *       must be unique for each domain used.  
     * @param tableName - the table name to be used for the stored alerts
     * @throws ManagementRemoteException
     */
    public void setAlertTableName(String tableName) throws ManagementRemoteException;
    
    
    /**
     * @return The current assign persisted alerts table name.
     * @throws ManagementRemoteException
     */
    public String getAlertTableName() throws ManagementRemoteException;
    /**
     * 
     * @return return the total number of alerts currently persisted. this value is volatile and may change
     * between two sequential calls to this method.  
     * @throws ManagementRemoteException
     */
    public  Integer getPersistedAlertsCount() throws ManagementRemoteException;

    /**
     * the API allow the caller to set all the parameters defined in the other API in this interface.
     * All the setting are applied prior to enabling the persistence.
     * @param enableJournaling
     *                    true - will prevent the system from removing alerts after they are delivered.
     *                           The alert stay in the database until the user remove them  
     *                    false - The system will remove the alert upon acknowledgment from the reliable
     *                            client in case one was setup or upon send the alert to all the non reliable
     *                            client/s.
     * @param jndiName - JNDI name of the data source database to be used for persistence.
     * @param dbtype - one of the predefined typed defined in {@link com.sun.caps.management.api.alerts.AlertPersistenceDBType}
     * @param timeToLive -  maximum time in millisecond.
     * @param maxCount - Maximum number of alerts.
     * @param level -  an AlertLevelType representing the level.
     * @param policyList - an array of AlertRemovalPolicyType where the priority
     *                     of the given policy is defined by its position in the list.
     *                     i.e the lower the index that policy will be applied first.
     *                     possible values are:
     *                     ALERTS_AGE,ALERTS_COUNT,ALERTS_LEVEL.
     * @param enablePolicyExecution - true the current setting is enforced. False the current policy is ignored. 
     * @param interval The interval the policy will be executed (is defined in milliseconds). 
     * @param inMemoryCacheSize - The interval is defined in milliseconds. 

     * @throws ManagementRemoteException if JMX related exception is thrown or the list of target name is 
     *         null or empty.
     */
     public void enableAlertsPersistence(Boolean enableJournaling,String jndiName,
                                         AlertPersistenceDBType dbtype,Long timeToLive,
                                         Long maxCount,AlertLevelType level,
                                         AlertRemovalPolicyType[] policyList,
                                         Boolean enablePolicyExecution,Long interval,
                                         Integer inMemoryCacheSize) throws ManagementRemoteException;


Also see

Alerting Architecture

Alert Notification Service Details

Refactoring the Alerting Service

General Information about Alerting

How do I use the Alert Reception API

How do I use the Alert Sender API

How do I use the Alert Framework Configuration Service API

How do I use the Alert Management API




Number of visits: 49

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-11) was last changed on 16-Nov-09 15:28 PM, -0800 by Gopalan Suresh Raj