This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Configuring Alerts

WSO2 Open Banking API Manager Analytics (WSO2_OB_APIM_ANALYTICS) allows you to customize and configure the analytics-based alerts sent to the subscribers using the features listed below.

Before you begin:

Make sure that you have configured Analytics for API Manager. For instructions, see Integrate APIM Analytics.

Edit alerts as business rules

  1. Go to the <WSO2_OB_APIM_ANALYTICS_HOME>/bin directory and run the following command to start the dashboard, if you have not started it already.

    sh dashboard.sh
  2. Go to the Business Rules and Status Dashboard. (https://<WSO2_OB_APIM_ANALYTICS_HOST>:9643/business-rules)
  3. You can view the existing business rules that are applied for the WSO2 Open Banking API Manager. Depending on your privileges, you can view, edit, and delete business rules. 
    For more details on working with business rules, see Managing Business Rules.

Configuring alerts via the Publisher

The users of your APIs can subscribe to analytics-related alerts from the API Publisher and the API Store.  Follow the instructions below to manage alerts via the Publisher:

You can not disable Health Availability related alerts, because they are enabled by default. However, you can enable and disable the email alerts that correspond to the Health Availability alerts.

Creating an abnormal response time alert

  1. Start the WSO2 API Manager Analytics and WSO2 Open Banking API Manager Servers. For more information see, Integrate API Manager Analytics.
  2. Sign in to the API Publisher at 
  3. https://<WSO2_OB_APIM_HOST>:9443/publisher.
  4. Click Manage Alert Types.

    The Manage Alert Types page appears.
  5. Click on the setting option that corresponds to the Abnormal Response Time option.
  6. Select the API for which you need to set up the alerts.
  7. Define the time period (in milliseconds).
    Immediately after the response period of the API exceeds the above defined time period an alert gets triggered, such alerts could be treated as an indication of a slow API Manager runtime or a slow backend.
  8. Click Save.

Updating an abnormal response time alert

  1. Start the WSO2 API Manger Analytics and WSO2 API Manager Servers. For more information see, Integrate API Manager Analytics .
  2. Sign in to the API Publisher at  https://<WSO2_OB_APIM_HOST>:9443/publisher .
  3. Click Manage Alert Types.
  4. Click on the setting option that corresponds to the Abnormal Response Time option.
  5. Update the alert.
    • To edit an abnormal response time alert -
      1. Select the API that corresponds to the existing alerts.
      2. Define a new time period (in milliseconds).
      3. Click Save. This will update the existing alert details.
    • To delete an abnormal response time alert, click the Remove option that corresponds to the respective API. 

Enabling an abnormal backend time alert

  1. Start the WSO2 API Manger Analytics and WSO2 API Manager Servers. For more information see, Integrate API Manager Analytics .
  2. Sign in to the API Publisher at  https://<WSO2_OB_APIM_HOST>:9443/publisher .
  3. Click Manage Alert Types.
  4. Click on the setting option that corresponds to the Abnormal Backend Time option.
  5. Select the API for which you need to set up the alerts.
  6. Define the time period (in milliseconds).
    Immediately after the backend time of the API exceeds the above defined time period an alert gets triggered, such alerts could be treated as an indication of a slow backend. In technical terms, if the backend time of a particular API of a tenant lies outside the predefined value, an alert is sent.
  7. Click Save.

Updating an abnormal backend time alert

  1. Start the WSO2 API Manger Analytics and WSO2 API Manager Servers. For more information see, Integrate API Manager Analytics .
  2. Sign in to the API Publisher at  https://<WSO2_OB_APIM_HOST>:9443/publisher .
  3. Click Manage Alert Types.
  4. Click on the setting option that corresponds to the Abnormal Backend Time option.
  5. Update the alert.
    • To edit an existing abnormal backend time alert -
      1. Select the API that corresponds to the existing alert.
      2. Define the new time period (in milliseconds).
      3. Click Save. This will update the existing alert details. 
    • To  delete an abnormal backend time alert, click the Remove option that corresponds to the respective API.

Subscribing to emails based on Publisher alerts

  1. Configure the sender's details for the email alerts.

    Follow the instructions below to configure an email address with API Manager to send email alerts to subscribers.

    1. Open the <WSO2_OB_APIM_ANALYTICS_HOME>/conf/worker/deployment.yaml file. 
    2. Configure the sender email address. A sample configuration is shown below.

      siddhi:
        extensions:
          -
            extension:
              name: email
              namespace: sink
              properties:
                username: test@test.com
                address: test@test.com
                password: password 
      

      Note that you might have to bypass a security warning to configure this with a private email address.

      If you encounter the 'javax.mail.AuthenticationFailedException: Username and Password not accepted' exception for gmail after deploying APIM_ALERT_EMAIL_NOTIFICATION.siddhi app, open https://www.google.com/settings/security/lesssecureapps being signed in with the username added in the config and Turn on 'Allow less secure apps'

    3. Copy the <WSO2_OB_APIM_ANALYTICS_HOME>/resources/apim-analytics/APIM_ALERT_EMAIL_NOTIFICATION.siddhi file and paste it in the <WSO2_OB_APIM_ANALYTICS_HOME>/wso2/worker/deployment/siddhi-files directory.
    4. Restart the WSO2 API Manager Analytics and WSO2 Open Banking API Manager servers.

  2. Sign in to the API Publisher at  https://<WSO2_OB_APIM_HOST>:9443/publisher .
  3. Click Manage Alert Types.
  4. Select the alert options that you wish to start receiving emails on.
  5. Click Save.

Unsubscribing from emails based on Publisher alerts

  1. Start the WSO2 API Manger Analytics and WSO2 API Manager Servers. For more information see, Integrate API Manager Analytics .
  2. Sign in to the API Publisher at  https://<WSO2_OB_APIM_ANALYTICS_HOME>:9443/publisher .
  3. Click Manage Alert Types.
  4. Deselect the alert options that you wish to stop receiving emails on.
  5. Click Unsubscribe.

Configuring alerts via the Store

The users of the APIs can subscribe to analytics-related alerts from the API Publisher and the API Store.  Follow the instructions below to manage alert types via the Store:

You can not disable Abnormal Resource Access Alerts, Unseen Source IP Access Alerts and Tier Crossing Alerts, because they are enabled by default. However, you can enable and disable the email alerts that correspond to the latter mentioned alerts.

Creating an abnormal request count alert

  1. Start the WSO2 Open Banking API Manager and API Manager Analytics servers.
    For more information see, Integrate API Manager Analytics.
  2. Sign in to the API Store at https://<WSO2_OB_APIM_HOST>:9443/store.
  3. Click Manage Alerts.

    The Manage Alerts page appears.
  4. Click on the setting option that corresponds to the Abnormal Request Count option.
  5. Select the application for which you need to set up the alerts.
  6. Select the API for which you need to set up the alerts.
    Only the APIs that you have subscribed to using the latter mentioned application are displayed.
  7. Define the request count (per minute).

    Immediately after the request count of the API exceeds the above defined time period an alert gets triggered. These alerts could be treated as indications of possible high traffic, suspicious activity, possible malfunction of the client application etc.
  8. Click Save.

Updating an abnormal request count alert

  1. Start the WSO2 Open Banking API Manager and API Manager Analytics servers.
    For more information see, Integrate API Manager Analytics.
  2. Sign in to the API Store at https://<WSO2_OB_APIM_HOST>:9443/store.
  3. Click Manage Alerts.

    The Manage Alerts page appears.
  4. Click on the setting option that corresponds to the Abnormal Request Count option.
  5. Update the alert.
    • To edit an abnormal response count alert -
      1. Select the application that corresponds to the existing alert.
      2. Select the API that corresponds to the existing alert.
      3. Define the new request count (per minute).
      4. Click Save.
        This will update the existing alert details.
    • To delete an abnormal response count alert, click the Remove option that corresponds to the respective API.

Subscribing to emails based on Store alerts

  1. Configure the sender's details for the email alerts.

    Follow the instructions below to configure an email address with WSO2 OB APIM to send email alerts to subscribers.

    1. Open the <WSO2_OB_APIM_ANALYTICS_HOME>/conf/worker/deployment.yaml file. 
    2. Configure the sender email address by adding the following configurations under siddhi extensions. The sample code is shown below.

      siddhi:
        extensions:
          -
            extension:
             name: email
             namespace: sink
             properties:
               username: <sender-email-username>
               address: <sender-email-address>
               password: <sender-email-password>
               mail.smtp.host: <sender-email-host>
               port: 25
               ssl.enable : false
               auth : false
               mail.store.protocol: pop3

      Note that you might have to bypass a security warning to configure this with a private email address.

      If you encounter the javax.mail.AuthenticationFailedException: Username and Password not accepted exception for gmail after deploying APIM_ALERT_EMAIL_NOTIFICATION.siddhi app, open https://www.google.com/settings/security/lesssecureapps being signed in with the username added in the config, and turn on 'Allow less secure apps'

    3. Copy the <WSO2_OB_APIM_ANALYTICS_HOME>/resources/apim-analytics/ APIM_ALERT_EMAIL_NOTIFICATION.siddhi file and paste it in the <WSO2_OB_APIM_ANALYTICS_HOME>/wso2/worker/deployment/siddhi-files directory.

  2. Start the WSO2 Open Banking API Manager and API Manager Analytics servers.
    For more information see, Integrate API Manager Analytics.
  3. Sign in to the API Store at https://<WSO2_OB_APIM_HOST>:9443/store.
  4. Click Manage Alerts.
  5. Select the alert options that you wish to start receiving emails on.
  6. Enter the list of email addresses that should receive alerts, to the Email field. Each email address can be separated with a comma or you can type the email address and press Enter.
  7. Click Save.



Unsubscribing from emails based on Store alerts

  1. Start the WSO2 Open Banking API Manager and API Manager Analytics servers.
    For more information see, Integrate API Manager Analytics.
  2. Sign in to the API Store at https://<WSO2_OB_APIM_HOST>:9443/store.
  3. Click Manage Alerts.
  4. Deselect the alert options that you wish to stop receiving emails on.
  5. Click Unsubscribe.