Alerts

You can use alerts to be notified on different channels for different events.

List of current channels that are supported:

List of current events that are supported:

  • Success max response time is higher than (value_here) milliseconds

  • Alert when failure occurrences surpass (value_here) percentage of total requests

Permissions

Member role vs API call

List alerts

Add alert

Remove alert

Reader

True

False

False

Editor

True

False

False

Admin

True

True

True

AdminWithBilling

True

True

True

Owner

True

True

True

How do I create Slack Incoming Webhooks ?

Doing that is simple enough, and there’s only 2 pre-requisites:

  • you need to have a channel created in your Slack workspace to push the alerts into (eg #rungutan-failures)

  • you need proper permissions to create an app in your workspace

Here’s the steps:

  1. Create a new Slack app using this URL -> https://api.slack.com/apps/new by generating an app name and selecting the proper workspace

  2. Click on Incoming Webhooks under the Features section and activate it by clicking on the toggle

  3. Click on Add New Webhook to Workspace while in the Incoming Webhooks screen and then pick a channel and hit Allow

  4. Copy the new URL by clicking the Copy button and use it in our platform

That’s it.

List alerts

Web

In order to view the alerts on our platform, all you have to do is browse to the Alerts page.

API call

The API call is:

curl -s \
    -d '{"team_id":"my-team"}' \
    -H "X-Api-Key: my_api_key" \
    -X POST \
    https://app.rungutan.com/v1/api/notifications/list | jq . -r

{
  "Notifications": [
    {
      "notification_id": "d76ddde5-42ea-4f16-b7c2-cef130fe54d8",
      "team_id": "rungutan",
      "notification_channel": "EMAIL",
      "notification_destination": "[email protected]",
      "failure_threshold": "N/A",
      "max_success_response_time": "25 ms"
    },
    {
      "notification_id": "1161cf56-6459-4f15-8b20-4a1a30c9f6b5",
      "team_id": "rungutan",
      "notification_channel": "SLACK",
      "notification_destination": "https://hooks.slack.com/services/some_token",
      "failure_threshold": "22 %",
      "max_success_response_time": "N/A"
    }
  ]
}

CLI

As simple as:

$ rungutan notifications list
{
    "Notifications": [
        {
          "notification_id": "d76ddde5-42ea-4f16-b7c2-cef130fe54d8",
          "team_id": "rungutan",
          "notification_channel": "EMAIL",
          "notification_destination": "[email protected]",
          "failure_threshold": "N/A",
          "max_success_response_time": "25 ms"
        },
        {
          "notification_id": "1161cf56-6459-4f15-8b20-4a1a30c9f6b5",
          "team_id": "rungutan",
          "notification_channel": "SLACK",
          "notification_destination": "https://hooks.slack.com/services/some_token",
          "failure_threshold": "22 %",
          "max_success_response_time": "N/A"
        }
    ]
}

Add alert

Web

In order to add a new alert on our platform, all you have to do is browse to the Alerts page and click on the Add new alert button.

API call

The API call is:

curl -s \
    -d '{"team_id":"my-team", "notification_channel": "SLACK", "notification_webhook": "https://hooks.slack.com/services/some_token", "notification_failure_occurrences_threshold": 30}' \
    -H "X-Api-Key: my_api_key" \
    -X POST \
    https://app.rungutan.com/v1/api/notifications/add | jq . -r

{
  "message": "Successfully added new alert notification"
}

CLI

$ rungutan notifications add --notification_channel SLACK --notification_destination https://hooks.slack.com/services/some_token --notification_failure_occurrences_threshold 30
{
    "message": "Successfully added new alert notification"
}

Remove alerts

Web

In order to remove an alert on our platform, all you have to do is browse to the Alerts page anclick on the Remove alert button for the respective notification.

API call

The API call is:

curl -s \
    -d '{"team_id":"my-team", "notification_id": "1161cf56-6459-4f15-8b20-4a1a30c9f6b5"}' \
    -H "X-Api-Key: my_api_key" \
    -X POST \
    https://app.rungutan.com/v1/api/notifications/remove | jq . -r

{
  "message": "Successfully removed your notification"
}

CLI

Drop it like it’s hot:

$ rungutan notifications remove --notification_id 1161cf56-6459-4f15-8b20-4a1a30c9f6b5
{
    "message": "Successfully removed your notification"
}