Skip to content

Guide: Setting Up Alerts

Getting timely, context-rich alerts is the primary reason for monitoring. This guide walks you through setting up alerts using the 9n9s web dashboard - the recommended approach for most users.

Dashboard First: This guide focuses on web interface setup for ease of use. For programmatic alert configuration, see our API Reference or CLI Reference after completing your dashboard setup.

The alerting system has two main components:

  1. Notification Channels: The services you want to receive alerts on (e.g., Email, Slack, SMS).
  2. Alert Rules: The logic that determines when to send an alert to a specific channel based on the monitor and the event.

First, you need to tell 9n9s where to send notifications. You can configure channels at the Organization level.

  1. Navigate to Organization Settings > Notification Channels.
  2. Click “Add Channel” and choose a provider.
  3. Follow the instructions to connect your account.

9n9s supports a wide range of channels, including:

  • Email
  • SMS (via Twilio)
  • Webhooks (for custom integrations)
  • Slack
  • Discord
  • PagerDuty
  • Opsgenie
  • And many more…

You can set up as many channels as you need. For example, you might have one Slack channel for low-priority warnings and a PagerDuty service for critical production alerts.

By default, your project has a simple rule to email you for any monitor failure. You can create more sophisticated rules to control alert routing.

Alert rules are configured at the Project level.

  1. Navigate to your Project Settings > Alert Rules.

  2. Click “Create Rule”.

  3. Define the when condition:

    • Monitor Status: e.g., is Down, is Up (for recovery notices), is Degraded.
    • Monitor Tags: Route alerts based on tags. For example, you can create a rule to only fire for monitors with the production tag.
    • Duration: Only send an alert if a monitor has been down for a certain amount of time (e.g., 5 minutes) to avoid flapping.
  4. Define the then action:

    • Send a notification to: Select one or more of your pre-configured Notification Channels.
    • Deduplication: You can set a time window to prevent re-sending the same alert (e.g., don't re-notify for 1 hour).

Here’s a common example:

  • When…
    • A monitor with the tag database
    • has been Down for 10 minutes
  • Then…
    • Send a notification to the #database-alerts Slack channel.
    • Send a notification to the Primary On-Call PagerDuty service.
  • And…
    • Do not re-notify for 2 hours.

This setup ensures that a transient database issue doesn’t wake someone up, but a sustained outage triggers a high-priority incident.