Skip to content

Commit

Permalink
Docs for alerts on project errors (#5529)
Browse files Browse the repository at this point in the history
* Docs for alerts on project errors

* Cleanup and some minor edits

Updated the overview, added a few cross-reference links to the docs, and made some minor cleanup

---------

Co-authored-by: Andrew Tsao <[email protected]>
  • Loading branch information
begelundmuller and AndrewRTsao authored Sep 3, 2024
1 parent 4471afd commit a70282b
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions docs/docs/deploy/project-errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
title: Managing Project Errors
description: Explore and configure alerts for project errors
sidebar_label: Managing Project Errors
sidebar_position: 25
---

## Overview

Rill projects can go into an error state for many reasons, such as a malformed YAML file, missing credentials for a connector, or a breaking change in a data type.
Regardless of the error, Rill Cloud takes various steps to surface, manage, and contain errors:

- **Visibility:** Admins will always be able to view the project status at the individual resource level within Rill Cloud using the `Status` tab or by using the [rill project status](/reference/cli/project/status.md) CLI command.
- **Isolation:** Rill Cloud will handle errors at the individual resource level. For example, if a dashboard falls into an error state or fails to reconcile, all other dashboards should remain available.
- **Fallback:** Rill Cloud will attempt to fall back to the most recent valid state when possible. For example, if the underlying model for a dashboard fails to build, the dashboard will keep serving from the most recent valid state.

## Receive alerts for project errors

To help you quickly identify and fix errors, you can configure a Rill alert that will trigger when one or more resources in your project enter an error state. The alert must be configured using a YAML file committed to your Rill project repository (configuration through the UI is not yet possible).

:::tip Want to learn more about alerts?

Besides alerting on project errors, it is possible to configure generic alerts in your dashboards based on specific thresholds or conditions being met. For more details, check our our [alerts documentation](/explore/alerts/alerts.md)!

:::

### Configure an email alert

To configure an email alert for project errors, add a file named `project_errors.yaml` to your Rill project with the contents below. Remember to update the `recipients` field to your desired alert recipients.

```yaml
type: alert

# Check the alert every 10 minutes.
refresh:
cron: "*/10 * * * *"

# Query for all resources with a reconcile error.
# The alert will trigger when the query result is not empty.
data:
resource_status:
where_error: true

# Send notifications by email
notify:
email:
recipients: [[email protected]]
```
:::info Don't forget to commit your changes!
After making these changes, you should commit and [push these changes](/deploy/existing-project/github-101.md#pushing-changes) to your git repository.
:::
### Configure a Slack alert
To configure a Slack alert for project errors, first follow the Slack configuration steps described on [Configuring Slack integration](../explore/alerts/slack.md). Next, add a file named `project_errors.yaml` to your Rill project with the contents below. Remember to update the `channels` field to your desired destination channel.

```yaml
type: alert
# Check the alert every 10 minutes.
refresh:
cron: "*/10 * * * *"
# Query for all resources with a reconcile error.
# The alert will trigger when the query result is not empty.
data:
resource_status:
where_error: true
# Send notifications in Slack.
# Follow these steps to configure a Slack token: https://docs.rilldata.com/explore/alerts/slack.
notify:
slack:
channels: [rill-alerts]
```

:::info Don't forget to commit your changes!

After making these changes, you should commit and [push these changes](/deploy/existing-project/github-101.md#pushing-changes) to your git repository.

:::

0 comments on commit a70282b

Please sign in to comment.