> For the complete documentation index, see [llms.txt](https://docs.euno.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.euno.ai/sources/data-observability/monte-carlo.md).

# Monte Carlo

Euno's Monte Carlo integration surfaces active data quality alerts directly on impacted tables, mapped dbt models, and column resources, and introduces the originating Monte Carlo monitor as a first-class resource in the Euno data model.

Monte Carlo remains the source of truth for alerts. Euno retrieves alert payloads via the Monte Carlo GraphQL API and computes a set of resource-level indicators for discovery and filtering.

Only **active** alerts are ingested:

* `Investigating`
* `No Status` (newly opened, not yet triaged)

Alerts in terminal states (`Fixed`, `No Action Needed`, `False Positive`, `Expected`, `Resolved`, `Closed`, `Acknowledged`) are not fetched, stored, or displayed.

{% hint style="info" %}
**Alert lookback window**: Euno fetches alerts whose `updatedTime` falls within the last **30 days**. An alert that remains in an active state but has not been updated in Monte Carlo for longer than that window may not appear in Euno until it is updated again.
{% endhint %}

Euno's Monte Carlo integration supports auto-discovery of:

* `montecarlo_account` — top-level account container holding warehouse connection metadata
* `montecarlo_monitor` — one resource per monitor returned by Monte Carlo's `getMonitors` API (including monitors with no active alerts)

In addition, the integration **enriches** existing `table`, `dbt_model`, and `column` resources with active-alert properties. It does not discover or import warehouse hierarchy from Monte Carlo.

## Prerequisites

* A Monte Carlo account with at least one configured warehouse connection.
* Administrator access to Monte Carlo to create an Account Service Key.
* The tables, dbt models, and columns you want to enrich with alerts must already exist in Euno from another source integration (Snowflake, BigQuery, dbt, etc.). Euno resolves alerts to existing resources — it does not create warehouse hierarchy from Monte Carlo.

## Stage 1: Configure Monte Carlo

### Step 1: Create a Monte Carlo Account Service Key

1. Log in to your Monte Carlo account as an administrator.
2. Navigate to **Settings → API**.
3. Create a new **Account Service Key**.
4. Copy the **API Key ID** and **API Key Secret** — you'll need these for Euno configuration.

{% hint style="info" %}
**Account-level token required when SSO is enabled**: If your Monte Carlo account uses SSO, you must provide an **account-level** Account Service Key (not a user-scoped key) for this integration to work. User-scoped tokens issued under SSO will not authenticate successfully against the headless GraphQL API used by the integration.
{% endhint %}

## Stage 2: Configure New Monte Carlo Source in Euno

### Step 1: Access the Sources Page

1. Go to the **Sources** page in Euno.
2. Click on **Add New Source** and select **Monte Carlo** from the list of supported platforms.

### Step 2: General Configuration

Asterisk (\*) means a mandatory field.

| Configuration                    | Description                                                                                                                                                                                                                                         |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name\***                       | Enter a name for your Monte Carlo source (e.g., "Monte Carlo - Data Observability").                                                                                                                                                                |
| **API Key ID\***                 | Account Service Key ID from Step 1. Sent on every request as the `x-mcd-id` header.                                                                                                                                                                 |
| **API Key Secret\***             | Account Service Key secret from Step 1. Sent on every request as the `x-mcd-token` header. Stored securely.                                                                                                                                         |
| **GraphQL API URL**              | (Advanced) Base URL of the Monte Carlo GraphQL API. Leave blank to use `https://api.getmontecarlo.com/graphql`. Override only if your account uses a custom endpoint.                                                                               |
| **Warehouse URI prefix mapping** | (Advanced) Optional JSON mapping of Monte Carlo-reported warehouse URI prefixes or coordinates to the Euno URI prefixes or coordinates used by your warehouse/dbt sources. See [Warehouse URI prefix mapping](#warehouse-uri-prefix-mapping) below. |

### Warehouse URI prefix mapping

If Monte Carlo reports warehouse coordinates differently from the URI prefixes Euno uses for tables (for example, Snowflake locator format vs. org-account format), configure **Warehouse URI prefix mapping** in the source's advanced settings.

Keys are the warehouse URI prefixes or coordinate prefixes Euno derives from Monte Carlo alert payloads. Values are the Euno URI prefixes or coordinate prefixes used by the existing warehouse and dbt resources in your account. Euno applies the longest matching prefix before resolving alerts to tables, columns, dbt models, and dbt columns.

Common examples:

* **Snowflake** — map the Monte Carlo-reported Snowflake account prefix to the Snowflake prefix used by your Snowflake/dbt source. For example, Monte Carlo may report locator format `snowflake.jgb69604.us-west-2.aws` while Euno resources use org-account format `snowflake.zwfkgsy-bdb54493`.
* **BigQuery** — use `bigquery` or a more specific `bigquery.project` / `bigquery.project.dataset` prefix when a project or dataset needs to be remapped.
* **Specific coordinates** — map a longer prefix such as `snowflake.old_account.analytics.public` to `snowflake.new_account.analytics.public` when only a database/schema coordinate differs.

```json
{
  "snowflake.jgb69604.us-west-2.aws": "snowflake.zwfkgsy-bdb54493",
  "snowflake.old_account.analytics.public": "snowflake.new_account.analytics.public"
}
```

For backward compatibility, Euno still accepts legacy keys based on Monte Carlo warehouse metadata (warehouse UUID/name or connection UUID/id), but new configurations should use reported URI prefixes or coordinate prefixes.

### Step 3: Schedule

* Enable the Schedule option.
* Choose:
  1. **Weekly**: Set specific days and times.
  2. **Hourly**: Define the interval in hours (e.g., every 4 hours).

{% hint style="info" %}
**Recommended**: Schedule the Monte Carlo integration to run every 4 hours so active alert state stays close to real-time. Manual runs are also supported.
{% endhint %}

### Step 4: Resource Cleanup

**Immediate Cleanup** is the default and recommended setting for this integration.

* **Immediate Cleanup**: `montecarlo_monitor` resources not observed in the most recent successful crawl are removed. This keeps the monitor inventory aligned with Monte Carlo's `getMonitors` results.

{% hint style="warning" %}
Use **Immediate Cleanup** for Monte Carlo sources. **No Cleanup** can leave stale `montecarlo_monitor` resources after monitors are deleted in Monte Carlo.

`active_montecarlo_alerts` is updated when a monitor's active alerts change, but resolved alerts may leave stale data on impacted resources until those resources are updated again. Prefer **Immediate Cleanup** and re-run the integration after major alert triage in Monte Carlo.
{% endhint %}

### Step 5: Save Configuration

Click the **Test & Save** button to complete the setup. Euno will:

1. Authenticate to the Monte Carlo GraphQL API using the provided API Key ID and Secret.
2. Verify access via the Monte Carlo API (`getUser`).
3. Save the configuration if validation passes.

If the test fails, review the error message and verify your credentials. The most common cause of failure is a user-scoped token in an SSO-enabled account — see the note in Step 1.

## What Euno Discovers

* `montecarlo_account` — The top-level Monte Carlo account container. Holds warehouse connection metadata and the warehouse-to-Euno mapping context used to resolve alerts to the correct resources.
* `montecarlo_monitor` — A Monte Carlo data quality monitor. One resource is created per monitor returned by Monte Carlo's `getMonitors` API. Stores the full monitor payload and its list of active alerts.

In addition, existing **table**, **dbt model**, and **column** resources are enriched with alert properties when they are the impacted asset of one or more active Monte Carlo alerts.

For detailed information about discovered resources and their indexed properties, see [Monte Carlo Integration Discovered Resources](/sources/data-observability/monte-carlo/monte-carlo-integration-discovered-resources.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.euno.ai/sources/data-observability/monte-carlo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
