Creating Notification Channels

A channel is a communication method to receive notifications and make it easier to ensure the right people receive the right alerts. Moesif supports the following channel types:

  • Email
  • SMS
  • Slack
  • PagerDuty
  • Webhook

You can create multiple channels, even of the same type. In addition, notifications from an alert rule can be routed to any number of channels.

Creating a channel

To create a channel, go to Alerts & Governance and then select Alert Rules. Your channels are listed in the left panel. To create a new one, click the orange + Channel button.

Creating Notification Channel

Channel Name

Give your channel a friendly name such as Support Team or Backend Alerts. If you create multiple channels, this helps identify the audience.

Channel Type

Select the type of channel you will create. Depending on the type you select, there may be additional fields displayed such as Slack hook or email address.

Email

Email notifications are sent to your email address of choice. Moesif will also include context like a time series chart so you’re able to make a decision quickly on importance without logging into the Moesif web portal.

Email Alerts

Add team@moesif.com to your address book to ensure email notifications don’t land in your spam email box.

SMS

To receive SMS alerts, add your phone number. Moesif does not charge for sending text messages, but do reserve the right to cancel any account that abuses this policy. However, your mobile carrier may charge you for receiving text messages.

Slack

Slack alerts are routed to a specific Slack channel. To do so, create a Slack hook URL by following Slack’s instructions.. You will need to paste your Slack hook for the field Slack Webhook URL.

PagerDuty

You can connect your Moesif account to your PagerDuty account to route alerts to it. This makes it easier to leverage PagerDuty’s platform to create gcomplex incident response and escalation policies.

To get started, view Moesif Integration Guide with PagerDuty.

Webhook

Webhooks enables leveraging Moesif’s alerting infrastructure to trigger automated workflows unlocking a large variety of use cases. This can be used to trigger workflows for consumption-based billing, marketing automation, and more all from customer API usage data in Moesif.

To authenticate requests as coming from Moesif, we recommend adding a secret key in a request header.

The JSON payload looks like so:

{
    "type": "alert"
    "name":  "events_exceeded_threshold"
    "metric": "event count For Each response.status Condition is greater than 100 over the last day"
    "grouping_feature_level1": null // 1st level of "group by" for the alert such as user_id, if any
    "grouping_feature_level2": null // 2nd level of "group by" for the alert such as route, if any
    "metric_values": [{
      "feature": "global", // If this alert had a "grouping", this will have the key name such as a user_id
     // feature value can be
     //  1. "global" if grouping_feature_level1 is empty
     //  2. "The metric value for a key in grouping_feature_level1" if grouping_feature_level2 is empty
     //. 3. "The key name grouping_feature_level1" + "-" + "value if grouping_feature_level2 is set
      "value": 10.0, // Double, the actual metric value at time of alert
      "direction": "spike",  // If dynamic alert, will be set to "spike", "increase", "drop", or "positive_trend"
    }],
    "timestamp": "2020-12-05T06:16:54.953Z" // UTC time of the current alert
    "history": { // Last X timestamps for this alert rule
      "2020-12-05T06:16:50.953Z" : [{
          "feature": "global"
          "value" :  "100"  
       }],
      "2020-12-05T06:16:40.953Z" : [{
          "feature": "global"
          "value" :  "120"
       }]
     }

Notification Throttle

Set a reasonable throttle for this alert. This prevents you from being spammed with a storm of alerts. After the first notification is sent, Moesif will silence additional alerts. You can still see silenced notifications within the Alert History panel.

For example, you can set one channel of type email to always receive alerts on an email channel, but to avoid SMS charges you can set your channels that are SMS type to only receive a maximum of 1 alert per hour.

Moesif has a correlation engine which detects related anomalies or triggers and consolidates them in the same notification. Throttling only impacts separate notifications.

Both alert rules and channels support throttling. An alert will be silenced if either the rule or the channel is actively throttling.

Updated: