Skip to content

Notifiers

Jeroen edited this page Oct 25, 2016 · 1 revision

There are several default INotifier implementations available, and you can create your own custom ones as well.

Default Notifiers

All default notifiers have a setting Threshold which can be configured to be any NotificationLevel enum value or name:

  • "Okay" or 10;
  • "Warning = 20" or 20;
  • "Error" or 30;
  • "Critical" or 40;

ConsoleNotifier

This notifier only makes sense if you have a Console, i.e. you're wrapping Nimator in a Console Application. The source code contains a project Nimator.ExampleConsoleApp which is a perfect example of this.

The threshold indicates at which point (inclusive) a tick result is shown on the console.

Configure it like this:

{
  "$type": "Nimator.Settings.ConsoleSettings, Nimator",
  "Threshold": "Okay"
}

SlackNotifier

This notifier will post a Slack message, using the incoming webhook feature. Configure it like this:

{
  "$type": "Nimator.Settings.SlackSettings, Nimator",
  "Threshold":  "Okay",
  "Url": "https://hooks.slack.com/services/YOUR/INTEGATION/url-goes-here",
  "DebounceTimeInSecs": 300
}

Only tick results at or above the Threshold are posted.

If you don't want to be spammed, you can tell this notifier to shut up for e.g. 5 minutes (300 sec) after posting a message.

OpsGenieNotifier

The great OpsGenie online service can handle schedules, escalations, and much more around alerts. If you have a plan that includes API calls you can use this notifier.

Configure it like this:

{
  "$type": "Nimator.Settings.OpsGenieSettings, Nimator",
  "Threshold": "Error",
  "ApiKey": "your-key-here",
  "TeamName": "ops_team",
  "HeartbeatName":  "nimator"
}

The Threshold is at which (and up) an OpsGenie alert is created. You'll also need to provide the incoming webhook api key, and the team to send the alert too.

Optionally you can add a HeartbeatName. Regardless of the Threshold, the heartbeat will be notified on each tick. This is a really cool OpsGenie feature, because now OpsGenie will also create an alert if the heartbeat dies (e.g. your Nimator application crashed).

Custom Notifiers

If you create an INotifier implementation, you can configure it much like the default implementations. Just use the appropriate $type value, and Nimator will delegate tick results to your notifier.

If you've created a cool new Notifier (e.g. for HipChat or some IoT device), be sure to open up a discussion in a GitHub issue to see if we can get it included in the default source!