This documentation is for WSO2 API Manager 2.6.0. View documentation for the latest release.

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: https://github.com/wso2/docs-apim/issues/1146

...

Table of Content Zone
locationtop

Creating an abnormal response time alert

  1. Start the WSO2 API-M Analytics and WSO2 API-M Servers.
    For more information see, Configuring APIM Analytics.
  2. Sign in to the API Publisher.
    https://localhost:9443/publisher
  3. Click Manage Alert Types.

    The Manage Alert Types page appears.
  4. Click on the setting option that corresponds to the Abnormal Response 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 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 WSO2 API Manager runtime or a slow backend.

  7. Click Save.

Updating an abnormal response time alert

  1. Start the WSO2 API-M Analytics and WSO2 API-M Servers.
    For more information see, Configuring APIM Analytics.
  2. Sign in to the API Publisher.
    https://localhost: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 a abnormal response time alert -
      1. Select the API that corresponds to the existing alerts.
      2. Define the new time period (in milliseconds).
      3. Click Save.
        This will update the existing alert details.
    • To delete a 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-M Analytics and WSO2 API-M Servers.
    For more information see, Configuring APIM Analytics.
  2. Sign in to the API Publisher.
    https://localhost: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-M Analytics and WSO2 API-M Servers.
    For more information see, Configuring APIM Analytics.
  2. Sign in to the API Publisher.
    https://localhost: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.

    Multiexcerpt
    MultiExcerptNameSenderEmailAddress

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

    1. Open the <API-M_ANALYTICS_HOME>/conf/worker/deployment.yaml file. 
    2. Configure the sender email address.
      The sample code is shown below.

      • If you are using Gmail as the SMTP host.

        Code Block
        siddhi:
          extensions:
        ...
            -
              extension:
                name: email
                namespace: sink
                properties:
                  username: [email protected]
                  address: [email protected]
                  password: password 
        ...
      • If you are using an SMTP host other than Gmail.

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

        For more details on the email sender configurations, see the Siddhi IO Email configurations in the offical Siddhi documentation.

        Warning

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

        Note

        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. Go to the <API-M_ANALYTICS_HOME>/resources/apim-analytics/ directory. Copy the APIM_ALERT_EMAIL_NOTIFICATION.siddhi file and paste it in the <API-M_ANALYTICS_HOME>/wso2/worker/deployment/siddhi-files directory.
    4. Restart the WSO2 API-M Analytics and WSO2 API-M Servers.
      For more information see, Configuring APIM Analytics.
  2. Sign in to the API Publisher.
    https://localhost: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-M Analytics and WSO2 API-M Servers.
    For more information see, Configuring APIM Analytics.
  2. Sign in to the API Publisher.
    https://localhost:9443/publisher
  3. Click Manage Alert Types.
  4. Deselect the alert options that you wish to stop receiving emails on.
  5. Click Unsubscribe.

...