Monte Carlo

App · 24 actions

Work with Monte Carlo's data observability: triage alerts and incidents, look up tables, lineage and tags, and create, run and snooze monitors.

Actions

ActionWhat it does
Add alert commentLeave a comment on an alert, which shows in its timeline.
Create SQL monitorCreate a custom SQL monitor that runs a query on a warehouse and raises an alert when its result crosses a threshold.
Delete alert commentDelete a comment from an alert.
Delete monitorDelete a monitor.
Get alertGet an alert's details: its title, type, status, severity, owner, tables and link.
Get current userGet the Monte Carlo user the API key belongs to, with their role and account.
Get tableGet a table's details: its warehouse, type, description, whether it is monitored and when it was last read and written.
Get table lineageGet the tables, views, reports and jobs that read from a table or that it reads from.
List alert commentsList the comments people have left on an alert.
List alertsList the alerts raised in a period (the last 7 days unless you choose), with their status, severity, priority, owner and tables.
List domainsList your account's domains, the groups of tables that teams own.
List monitorsList the monitors in your account, with their kind, schedule, tables and how many incidents they raised in the last week.
List table tagsList the tags (key and value pairs) on a table.
List tablesList the tables and views Monte Carlo knows about, with their MCON, warehouse and when they were last read and written.
List usersList the people in your Monte Carlo account with their names and email addresses.
List warehousesList the warehouses, lakes and databases Monte Carlo monitors that you can see.
Remove table tagTake a tag off a table.
Run monitorRun a monitor now, outside its schedule.
Set alert ownerMake someone in your Monte Carlo account the owner of an alert.
Set alert severityMark an alert as an incident with a severity, change its severity, or turn it back into an ordinary alert.
Set table tagTag a table with a key and value, or change the value of a tag it has.
Snooze SQL monitorStop a custom SQL monitor raising alerts for a while, or until its result changes.
Unsnooze SQL monitorLet a snoozed custom SQL monitor raise alerts again.
Update alertSet an alert's status, such as acknowledged or fixed, or rename it.

Add alert comment

Leave a comment on an alert, which shows in its timeline.

Inputs

Alert IDalert_idtextRequired
The alert's ID, as List alerts or an alert trigger returns it (id).
CommentcommenttextRequired
What to say.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "createdTime": "example",
    "data": "example",
    "eventType": "example",
    "uuid": "example"
  }
}

Create SQL monitor

Create a custom SQL monitor that runs a query on a warehouse and raises an alert when its result crosses a threshold.

Inputs

NamenametextRequired
The monitor's name, as Monte Carlo shows it.
WarehousewarehousetextRequired
The warehouse to run the query on.
SQLsqltextRequired
The query to run, in your warehouse's SQL.
Compareresult_typetext
What the query's result is compared with the threshold as.One of: ROW_COUNT (Number of rows the query returns), SINGLE_NUMERIC (The single number the query returns). Default: ROW_COUNT.
Alert when the result isoperatortextRequired
Raise an alert when the result is this compared with the threshold.One of: GT (Greater than), GTE (Greater than or equal to), LT (Less than), LTE (Less than or equal to), EQ (Equal to), NEQ (Not equal to).
ThresholdthresholdnumberRequired
The value to compare the result with, such as 0.
Runsscheduletext
When the monitor runs.One of: FIXED (On a schedule), MANUAL (Only when run by hand or by a step). Default: FIXED.
Every (minutes)interval_minutesnumber
On a schedule: how many minutes between runs. 60 if left empty.At least 1.
First runstart_timedate and time
On a schedule: when the first run is. Leave empty to start now.
Priorityprioritytext
The priority its alerts get.One of: P1 (P1 (highest)), P2, P3, P4, P5 (P5 (lowest)).
Domaindomaintext
The domain the monitor belongs to, if your account asks for one.
Notesnotestext
Notes for whoever looks at its alerts.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "createdTime": "example",
    "customSql": "example",
    "description": "example",
    "isDraft": true,
    "isPaused": true,
    "isSnoozed": true,
    "labels": [
      "example"
    ],
    "nextExecutionTime": "example",
    "notes": "example",
    "priority": "example",
    "ruleType": "example",
    "scheduleConfig": {
      "intervalMinutes": 1,
      "scheduleType": "example",
      "startTime": "example",
      "timezone": "example"
    },
    "snoozeUntilTime": "example",
    "updatedTime": "example",
    "uuid": "example",
    "warehouseUuid": "example"
  }
}

Delete alert comment

Delete a comment from an alert.

Inputs

Comment IDcomment_idtextRequired
The comment's ID, as Add alert comment or List alert comments returns it (uuid).

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "success": true
  }
}

Delete monitor

Delete a monitor. Its past alerts stay.

Inputs

MonitormonitortextRequired
The monitor to use.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "success": true
  }
}

Get alert

Get an alert's details: its title, type, status, severity, owner, tables and link. An alert merged into another names that one in mergedIntoAlertId.

Inputs

Alert IDalert_idtextRequired
The alert's ID, as List alerts or an alert trigger returns it (id).

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "commentCount": 1,
    "createdTime": "example",
    "domains": [
      {
        "name": "example",
        "uuid": "example"
      }
    ],
    "id": "example",
    "lastCommentText": "example",
    "mergedIntoAlertId": "example",
    "monitorTags": [
      {
        "name": "example",
        "value": "example"
      }
    ],
    "monitorUuids": [
      "example"
    ],
    "owner": {
      "email": "example",
      "fullName": "example"
    },
    "priority": "example",
    "severity": "example",
    "sloStatus": "example",
    "status": "example",
    "tables": [
      {
        "isKeyAsset": true,
        "mcon": "example",
        "tableId": "example"
      }
    ],
    "title": "example",
    "type": "example",
    "updatedTime": "example",
    "url": "example"
  }
}

Get current user

Get the Monte Carlo user the API key belongs to, with their role and account.

Inputs

None.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "account": {
      "name": "example",
      "uuid": "example"
    },
    "displayName": "example",
    "email": "example",
    "firstName": "example",
    "id": "example",
    "lastName": "example",
    "role": "example"
  }
}

Get table

Get a table's details: its warehouse, type, description, whether it is monitored and when it was last read and written.

Inputs

Table MCONtabletextRequired
The table's MCON, Monte Carlo's name for it, as List tables returns it (mcon).

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "dataset": "example",
    "description": "example",
    "discoveredTime": "example",
    "friendlyName": "example",
    "fullTableId": "example",
    "importanceScore": 1,
    "isImportant": true,
    "isMonitored": true,
    "isMuted": true,
    "lastActivity": "example",
    "lastObserved": "example",
    "lastRead": "example",
    "lastWrite": "example",
    "mcon": "example",
    "path": "example",
    "projectName": "example",
    "tableId": "example",
    "tableType": "example",
    "warehouse": {
      "name": "example",
      "uuid": "example"
    }
  }
}

Get table lineage

Get the tables, views, reports and jobs that read from a table or that it reads from.

Inputs

Table MCONtabletextRequired
The table's MCON, Monte Carlo's name for it, as List tables returns it (mcon).
DirectiondirectiontextRequired
Which way to follow the lineage.One of: downstream (Downstream (what reads from it)), upstream (Upstream (what it reads from)).
Hopshopsnumber
How many steps away to follow it, 1 for direct connections only.From 1 to 10.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "baseNode": {
      "displayName": "example",
      "isMonitored": true,
      "lastActivity": "example",
      "mcon": "example",
      "objectType": "example"
    },
    "connectedNodes": [
      {
        "displayName": "example",
        "isMonitored": true,
        "lastActivity": "example",
        "mcon": "example",
        "objectType": "example"
      }
    ],
    "flattenedEdges": [
      {
        "directlyConnectedMcons": [
          "example"
        ],
        "mcon": "example"
      }
    ]
  }
}

List alert comments

List the comments people have left on an alert.

Inputs

Alert IDalert_idtextRequired
The alert's ID, as List alerts or an alert trigger returns it (id).
Limitlimitnumber
How many comments to return, up to 100.From 1 to 100.
Cursorcursortext
To read the next page, the next_cursor value a previous list step returned.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "createdTime": "example",
        "data": "example",
        "eventType": "example",
        "uuid": "example"
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}

List alerts

List the alerts raised in a period (the last 7 days unless you choose), with their status, severity, priority, owner and tables.

Inputs

Fromafterdate and time
The start of the period. Monte Carlo searches at most two months at a time.
Untilbeforedate and time
The end of the period. Leave empty for now.
Period coverstime_fieldtext
Whether the period is when alerts were created or when they last changed.One of: created (When it was created), updated (When it was last updated). Default: created.
Statusesstatuseslist
Only alerts with these statuses.One or more of: ACKNOWLEDGED, WORK_IN_PROGRESS (Work in progress), FIXED, EXPECTED, NO_ACTION_NEEDED (No action needed), FALSE_POSITIVE (False positive).
Severitiesseveritieslist
Only incidents with these severities.One or more of: SEV_1 (SEV-1 (most severe)), SEV_2 (SEV-2), SEV_3 (SEV-3), SEV_4 (SEV-4 (least severe)).
Prioritiesprioritieslist
Only alerts with these priorities.One or more of: P1 (P1 (highest)), P2, P3, P4, P5 (P5 (lowest)).
Alert typestypeslist
Only alerts of these kinds.One or more of: ANOMALIES (Freshness and volume), METRIC_ANOMALIES (Metric), CUSTOM_RULE_ANOMALIES (Custom SQL and validation), SCHEMA_CHANGES (Schema change), JSON_SCHEMA_CHANGES (JSON schema change), DELETED_TABLES (Deleted table), METRIC_COMPARISON_ANOMALIES (Comparison), PERFORMANCE_ANOMALIES (Query performance), DBT_ERRORS (dbt error), ETL_ERRORS (ETL job error), and 5 more.
Ownersownerslist
Only alerts these people own.
Domainsdomainslist
Only alerts in these domains.
Table MCONstableslist
Only alerts on these tables, by MCON.
Resolvedresolvedtrue/false
On: only alerts whose events are all back to normal. Off: only alerts still active. Leave empty for both.
Limitlimitnumber
How many alerts to return, up to 100.From 1 to 100.
Cursorcursortext
To read the next page, the next_cursor value a previous list step returned.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "commentCount": 1,
        "createdTime": "example",
        "domains": [
          {
            "name": "example",
            "uuid": "example"
          }
        ],
        "id": "example",
        "lastCommentText": "example",
        "monitorTags": [
          {
            "name": "example",
            "value": "example"
          }
        ],
        "monitorUuids": [
          "example"
        ],
        "owner": {
          "email": "example",
          "fullName": "example"
        },
        "priority": "example",
        "severity": "example",
        "sloStatus": "example",
        "status": "example",
        "tables": [
          {
            "isKeyAsset": true,
            "mcon": "example",
            "tableId": "example"
          }
        ],
        "title": "example",
        "type": "example",
        "updatedTime": "example",
        "url": "example"
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}

List domains

List your account's domains, the groups of tables that teams own.

Inputs

None.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "assignments": [
          "example"
        ],
        "createdByEmail": "example",
        "description": "example",
        "name": "example",
        "tags": [
          {
            "name": "example",
            "value": "example"
          }
        ],
        "uuid": "example"
      }
    ]
  }
}

List monitors

List the monitors in your account, with their kind, schedule, tables and how many incidents they raised in the last week.

Inputs

Searchsearchtext
Only monitors whose name, description or tables match this.
Monitor typesmonitor_typeslist
Only monitors of these kinds.One or more of: TABLE, STATS (Metric), CUSTOM_SQL (Custom SQL), VALIDATION, FRESHNESS, VOLUME, SCHEMA, JSON_SCHEMA (JSON schema), METRIC_COMPARISON (Comparison), QUERY_PERF (Query performance), and 7 more.
Statusesstatuseslist
Only monitors in these states.One or more of: ENABLED, DISABLED (Disabled (paused)), SNOOZED, ERROR, TRAINING, INSUFFICIENT_DATA (Insufficient data), DRAFT.
Domainsdomainslist
Only monitors in these domains.
Created aftercreated_afterdate and time
Only monitors created at or after this time.
Limitlimitnumber
How many monitors to return, up to 500.From 1 to 500.
Offsetoffsetnumber
How many monitors to skip, to read the next page.At least 0.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "createdTime": "example",
        "creatorId": "example",
        "description": "example",
        "domainUuids": [
          "example"
        ],
        "entityMcons": [
          "example"
        ],
        "isDraft": true,
        "isPaused": true,
        "isSnoozeable": true,
        "labels": [
          "example"
        ],
        "lastUpdateTime": "example",
        "monitorType": "example",
        "name": "example",
        "nextExecutionTime": "example",
        "prevExecutionTime": "example",
        "priority": "example",
        "sevenDaysIncidentCount": 1,
        "tags": [
          {
            "name": "example",
            "value": "example"
          }
        ],
        "uuid": "example"
      }
    ]
  }
}

List table tags

List the tags (key and value pairs) on a table.

Inputs

Table MCONtabletextRequired
The table's MCON, Monte Carlo's name for it, as List tables returns it (mcon).

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "id": "example",
        "mconId": "example",
        "propertyName": "example",
        "propertySourceType": "example",
        "propertyValue": "example"
      }
    ]
  }
}

List tables

List the tables and views Monte Carlo knows about, with their MCON, warehouse and when they were last read and written.

Inputs

Searchsearchtext
Only tables whose name, schema or database contain this.
Warehousewarehousetext
Only tables in this warehouse.
Domaindomaintext
Only tables in this domain.
Monitored onlymonitored_onlytrue/false
Only tables Monte Carlo monitors.
Limitlimitnumber
How many tables to return, up to 100.From 1 to 100.
Cursorcursortext
To read the next page, the next_cursor value a previous list step returned.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "dataset": "example",
        "description": "example",
        "discoveredTime": "example",
        "friendlyName": "example",
        "fullTableId": "example",
        "importanceScore": 1,
        "isImportant": true,
        "isMonitored": true,
        "isMuted": true,
        "lastActivity": "example",
        "lastObserved": "example",
        "lastRead": "example",
        "lastWrite": "example",
        "mcon": "example",
        "path": "example",
        "projectName": "example",
        "tableId": "example",
        "tableType": "example",
        "warehouse": {
          "name": "example",
          "uuid": "example"
        }
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}

List users

List the people in your Monte Carlo account with their names and email addresses.

Inputs

Searchsearchtext
Only people whose first name, last name or email address match this.
Limitlimitnumber
How many people to return, up to 100.From 1 to 100.
Cursorcursortext
To read the next page, the next_cursor value a previous list step returned.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "email": "example",
        "firstName": "example",
        "id": "example",
        "lastName": "example"
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}

List warehouses

List the warehouses, lakes and databases Monte Carlo monitors that you can see.

Inputs

Domainsdomainslist
Only warehouses in these domains.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "connectionType": "example",
        "createdOn": "example",
        "customMonitorCount": 1,
        "name": "example",
        "supportsCustomSqlRules": true,
        "totalMonitorCount": 1,
        "uuid": "example"
      }
    ]
  }
}

Remove table tag

Take a tag off a table.

Inputs

Table MCONtabletextRequired
The table's MCON, Monte Carlo's name for it, as List tables returns it (mcon).
Tag keytag_keytextRequired
The tag's key, such as owner.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "success": true
  }
}

Run monitor

Run a monitor now, outside its schedule.

Inputs

MonitormonitortextRequired
The monitor to use.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "manualMonitorExecutionUuid": "example",
    "success": true
  }
}

Set alert owner

Make someone in your Monte Carlo account the owner of an alert.

Inputs

Alert IDalert_idtextRequired
The alert's ID, as List alerts or an alert trigger returns it (id).
OwnerownertextRequired
The person to own the alert, by their email address.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "commentCount": 1,
    "createdTime": "example",
    "domains": [
      {
        "name": "example",
        "uuid": "example"
      }
    ],
    "id": "example",
    "lastCommentText": "example",
    "monitorTags": [
      {
        "name": "example",
        "value": "example"
      }
    ],
    "monitorUuids": [
      "example"
    ],
    "owner": {
      "email": "example",
      "fullName": "example"
    },
    "priority": "example",
    "severity": "example",
    "sloStatus": "example",
    "status": "example",
    "tables": [
      {
        "isKeyAsset": true,
        "mcon": "example",
        "tableId": "example"
      }
    ],
    "title": "example",
    "type": "example",
    "updatedTime": "example",
    "url": "example"
  }
}

Set alert severity

Mark an alert as an incident with a severity, change its severity, or turn it back into an ordinary alert.

Inputs

Alert IDalert_idtextRequired
The alert's ID, as List alerts or an alert trigger returns it (id).
SeverityseveritytextRequired
The incident's severity, or Not an incident to clear it.One of: SEV_1 (SEV-1 (most severe)), SEV_2 (SEV-2), SEV_3 (SEV-3), SEV_4 (SEV-4 (least severe)), NO_SEVERITY (Not an incident (clear the severity)).

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "commentCount": 1,
    "createdTime": "example",
    "domains": [
      {
        "name": "example",
        "uuid": "example"
      }
    ],
    "id": "example",
    "lastCommentText": "example",
    "monitorTags": [
      {
        "name": "example",
        "value": "example"
      }
    ],
    "monitorUuids": [
      "example"
    ],
    "owner": {
      "email": "example",
      "fullName": "example"
    },
    "priority": "example",
    "severity": "example",
    "sloStatus": "example",
    "status": "example",
    "tables": [
      {
        "isKeyAsset": true,
        "mcon": "example",
        "tableId": "example"
      }
    ],
    "title": "example",
    "type": "example",
    "updatedTime": "example",
    "url": "example"
  }
}

Set table tag

Tag a table with a key and value, or change the value of a tag it has.

Inputs

Table MCONtabletextRequired
The table's MCON, Monte Carlo's name for it, as List tables returns it (mcon).
Tag keytag_keytextRequired
The tag's key, such as owner.
Tag valuetag_valuetext
The tag's value, such as data-platform. Leave empty for a tag with no value.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "id": "example",
    "mconId": "example",
    "propertyName": "example",
    "propertySourceType": "example",
    "propertyValue": "example"
  }
}

Snooze SQL monitor

Stop a custom SQL monitor raising alerts for a while, or until its result changes. It keeps running meanwhile.

Inputs

MonitormonitortextRequired
The custom SQL monitor to use.
Minutesminutesnumber
How many minutes to snooze it for.At least 1.
Until the result changesuntil_changedtrue/false
Snooze it until the result it breached on changes or recovers, instead of for a number of minutes.
Reasonreasontext
Why, recorded as a comment on the monitor.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "createdTime": "example",
    "customSql": "example",
    "description": "example",
    "isDraft": true,
    "isPaused": true,
    "isSnoozed": true,
    "labels": [
      "example"
    ],
    "nextExecutionTime": "example",
    "notes": "example",
    "priority": "example",
    "ruleType": "example",
    "scheduleConfig": {
      "intervalMinutes": 1,
      "scheduleType": "example",
      "startTime": "example",
      "timezone": "example"
    },
    "snoozeUntilTime": "example",
    "updatedTime": "example",
    "uuid": "example",
    "warehouseUuid": "example"
  }
}

Unsnooze SQL monitor

Let a snoozed custom SQL monitor raise alerts again.

Inputs

MonitormonitortextRequired
The custom SQL monitor to use.
Reasonreasontext
Why, recorded as a comment on the monitor.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "createdTime": "example",
    "customSql": "example",
    "description": "example",
    "isDraft": true,
    "isPaused": true,
    "isSnoozed": true,
    "labels": [
      "example"
    ],
    "nextExecutionTime": "example",
    "notes": "example",
    "priority": "example",
    "ruleType": "example",
    "scheduleConfig": {
      "intervalMinutes": 1,
      "scheduleType": "example",
      "startTime": "example",
      "timezone": "example"
    },
    "snoozeUntilTime": "example",
    "updatedTime": "example",
    "uuid": "example",
    "warehouseUuid": "example"
  }
}

Update alert

Set an alert's status, such as acknowledged or fixed, or rename it. Anything left empty stays as it is.

Inputs

Alert IDalert_idtextRequired
The alert's ID, as List alerts or an alert trigger returns it (id).
Statusstatustext
The alert's new status.One of: NO_STATUS (No status), ACKNOWLEDGED, WORK_IN_PROGRESS (Work in progress), FIXED, EXPECTED, NO_ACTION_NEEDED (No action needed), FALSE_POSITIVE (False positive).
Titlenametext
A new title for the alert.

Outputs

dataobject
The response from Monte Carlo.
Example output
{
  "data": {
    "commentCount": 1,
    "createdTime": "example",
    "domains": [
      {
        "name": "example",
        "uuid": "example"
      }
    ],
    "id": "example",
    "lastCommentText": "example",
    "monitorTags": [
      {
        "name": "example",
        "value": "example"
      }
    ],
    "monitorUuids": [
      "example"
    ],
    "owner": {
      "email": "example",
      "fullName": "example"
    },
    "priority": "example",
    "severity": "example",
    "sloStatus": "example",
    "status": "example",
    "tables": [
      {
        "isKeyAsset": true,
        "mcon": "example",
        "tableId": "example"
      }
    ],
    "title": "example",
    "type": "example",
    "updatedTime": "example",
    "url": "example"
  }
}

On this page