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, you can route notifications from an alert rule to any number of channels.

Creating a channel

To create a channel, follow these steps:

  • Select the account icon to bring up the settings menu.
  • Select Navigation Channels. This shows you the list of channels you currently have for your application.
  • Select + Create Channel.

You can also access notification channels when creating alert rules. In the Create Alert Rule pane, selecting Select a channel shows you the channels you currently have to send alerts to. To create a new channel, select New Channel.

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 want to create. Depending on the type you select, additional input fields may appear such as Slack webhook URL or email address.

The following channel types are supported:

Email
Moesif sends email notifications to your email address of choice. Moesif also includes context like a time series chart. This allows you 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 folder.

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 Incoming WebHooks instructions.. Then paste your Slack hook URL in the Slack Webhook URL field.
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 complex incident responses and escalation policies.

To get started, see Moesif Integration Guide with PagerDuty.

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

To authenticate webhook requests as coming from Moesif, we strongly recommended that you add a secret key in a HTTP request header. For security, Moesif only allows webhooks protected by HTTPS.

Creating Notification Webhook Channel

The JSON payload looks like the following:

{
    "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": "2023-07-05T06:16:54.953Z" // UTC time of the current alert
    "history": { // Last X timestamps for this alert rule
      "2023-07-05T06:16:50.953Z" : [{
          "feature": "global"
          "value" :  "100"
      }],
      "2023-07-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 page.

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: