Job monitors (GraphQL)

Related queries and mutations in Monitors. Each has its own section.

Queries

evaluateJobSelection (query)

evaluateJobSelection is a query in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Evaluate a job monitor selection against one integration, one page at a time. dbt table filters are not applied, because they match each node failure's table when it alerts.

Arguments

ArgumentTypeDescription
integrationTypeJobMonitorIntegrationType!
integrationUuidUUID!
levelJobSelectionLevel!
assetSelectionJobAssetSelectionInput!Rules that select jobs of the integration. Takes the full definition, like the mutation's assetSelection.
jobMcons[String!]!Jobs picked one by one, by MCON. Takes the full list, like the mutation's jobMcons.
monitorUuidUUIDThe job monitor being edited. Checks the caller's access to it and that it covers this integration. assetSelection joiner keys left out of the request keep the monitor's stored values.
projectUuidUUIDAt the JOB level of a dbt connection, list only this project's jobs.
domainRestrictions[UUID!]The monitor's domains. Only jobs in them are listed.
searchStringMatch rows whose name contains this text. Only narrows the listed rows, not selectedCount or unselectedCount.
includeUnselectedBooleanList rows with no selected job too. Only changes the listed rows, not selectedCount or unselectedCount. Default: false.
limitIntAt most 100. Default: 100.
offsetIntDefault: 0.

Returns

JobSelectionPageOutput!

Example

query EvaluateJobSelection($integrationType: JobMonitorIntegrationType!, $integrationUuid: UUID!, $level: JobSelectionLevel!, $assetSelection: JobAssetSelectionInput!, $jobMcons: [String!]!) {
  evaluateJobSelection(integrationType: $integrationType, integrationUuid: $integrationUuid, level: $level, assetSelection: $assetSelection, jobMcons: $jobMcons) {
    totalRows
    selectedCount
    unselectedCount
  }
}

Types used only by evaluateJobSelection

JobSelectionLevel

Enum type.

ValueDescription
PROJECT
JOB
JobSelectionPageOutput

Object type. One page of the job tree, plus totals at the level.

FieldTypeDescription
rows[JobSelectionRowOutput!]!
totalRowsIntListed rows at this level, for paging. Follows search and includeUnselected.
selectedCountIntSelected jobs at this level. Ignores search and includeUnselected.
unselectedCountIntUnselected jobs at this level. Ignores search and includeUnselected.
JobSelectionRowOutput

Object type. A job, or a dbt project, in the job monitor picker's tree.

FieldTypeDescription
idString!The job's or the project's uuid.
nameString!
mconStringThe job's mcon. Null for a project.
globalIdStringA V3 job's logical id. Rows placed from one logical job share it.
selectedBoolean!Whether the selection covers the job, or any job in the project.
countInt!Selected jobs in the row.
countUnselectedInt!Unselected jobs in the row.

Related types

JobAssetSelectionInput, JobMonitorIntegrationType, UUID

getJobAlertConditions (query)

getJobAlertConditions is a query in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

List the alert conditions of each integration type a job monitor can cover. Integration types with no conditions are left out.

Returns

[JobAlertConditionGroup!]!

Example

query GetJobAlertConditions {
  getJobAlertConditions {
    integrationType
  }
}

Types used only by getJobAlertConditions

JobAlertCondition

Object type. One kind of job event a job monitor can alert on.

FieldTypeDescription
keyString!The value to pass in a job monitor's alert conditions.
displayNameString!
params[JobAlertConditionParam!]!The condition's settings. Empty when it takes none.
JobAlertConditionGroup

Object type. The alert conditions a job monitor on one integration type can use.

FieldTypeDescription
integrationTypeJobMonitorIntegrationType!
conditions[JobAlertCondition!]!
JobAlertConditionParam

Object type. A setting the user can give an alert condition.

FieldTypeDescription
nameString!
typeString!The value's type, such as int or str.
requiredBoolean!

Related types

JobMonitorIntegrationType

getJobMonitor (query)

getJobMonitor is a query in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get a job monitor

Arguments

ArgumentTypeDescription
monitorUuidUUID!

Returns

JobMonitor!

Example

query GetJobMonitor($monitorUuid: UUID!) {
  getJobMonitor(monitorUuid: $monitorUuid) {
    uuid
    name
    description
    notes
    priority
    integrationType
    integrationUuid
    jobMcons
    audiences
    failureAudiences
    dataQualityDimension
    isPaused
    isDraft
    isTemplateManaged
    autoTriage
    namespace
    createdTime
    updatedTime
  }
}

Related types

JobMonitor, UUID

getJobMonitorIntegrations (query)

getJobMonitorIntegrations is a query in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

List the integrations in the account a job monitor can cover, sorted by label. Integration types job monitors don't support are left out.

Returns

[JobMonitorIntegration!]!

Example

query GetJobMonitorIntegrations {
  getJobMonitorIntegrations {
    integrationType
    integrationUuid
    label
    warehouseUuid
  }
}

Types used only by getJobMonitorIntegrations

JobMonitorIntegration

Object type. An integration a job monitor can cover.

FieldTypeDescription
integrationTypeJobMonitorIntegrationType!
integrationUuidUUID!
labelString!The integration's name. A dbt connection with no name uses its warehouse's.
warehouseUuidUUIDThe warehouse a dbt connection's tables live in. Null for ETL integrations.

Related types

JobMonitorIntegrationType, UUID

getJobMonitorMigration (query)

getJobMonitorMigration is a query in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get what the account's migration to job monitors created and changed. Null when the account is not migrated, or the migration was rolled back.

Returns

JobMonitorMigration

Example

query GetJobMonitorMigration {
  getJobMonitorMigration {
    migratedAt
    createdMonitorCount
    hiddenMonitorCount
    deletedMonitorCount
    removedLegacySurfaces
  }
}

Types used only by getJobMonitorMigration

DroppedDbtCondition

Object type. A dbt alert condition that legacy rules named but the project had turned off.

No job monitor covers it.

FieldTypeDescription
integrationJobMonitorMigrationIntegration!
projectUuidUUID!
projectNameString!Empty when the project was deleted since.
conditionString!The alert condition's key.
conditionLabelString!
audiences[JobMonitorMigrationAudience!]!The audiences of the rules that named the condition.
JobMonitorMigration

Object type. The account's job alerting migration to job monitors, as the caller can see it.

FieldTypeDescription
migratedAtDateTime!
createdMonitorCountInt!Every monitor the migration created, including hidden and deleted ones.
monitors[MigratedJobMonitor!]!Created monitors the caller can open, other than residual ones.
residualMonitors[ResidualJobMonitor!]!Created monitors of jobs that alerted nobody, which the caller can open.
hiddenMonitorCountInt!Created monitors that still exist and are outside the caller's domains.
deletedMonitorCountInt!Created monitors deleted since.
droppedDbtConditions[DroppedDbtCondition!]!
notices[JobMonitorMigrationNotice!]!
removedLegacySurfaces[LegacyJobAlertingSurface!]!The legacy job alerting screens the account used, which it no longer has.
JobMonitorMigrationAudience

Object type. An audience.

On a created monitor it has its label at migration. Elsewhere it has its current label.

FieldTypeDescription
uuidUUID!
labelString!
JobMonitorMigrationIntegration

Object type. An integration the migration touched.

FieldTypeDescription
uuidUUID!
integrationTypeJobMonitorIntegrationTypeNull when the integration was deleted since.
labelStringNull when the integration was deleted since.
JobMonitorMigrationNotice

Object type. Something the migration could not carry over.

FieldTypeDescription
kindMigrationNoticeKind!
integrationJobMonitorMigrationIntegration
audiences[JobMonitorMigrationAudience!]!
JobMonitorMigrationSourceRule

Object type. A legacy job notification rule a monitor was created from.

FieldTypeDescription
uuidUUID!
audienceJobMonitorMigrationAudienceThe audience the rule belonged to. Null when the rule has no audience or was deleted.
deletedBoolean!The rule was deleted after the migration. Its audience is then unknown.
LegacyJobAlertingSurface

Enum type. A legacy job alerting screen the account used, which migrated accounts no longer show.

ValueDescription
AUDIENCE_JOB_NOTIFICATIONS
INTEGRATION_JOB_ALERT_TOGGLES
DBT_PROJECT_ALERT_TYPES
MigratedJobMonitor

Object type. A job monitor the migration created, with the audiences and rules it came from.

FieldTypeDescription
uuidUUID!
nameString!The monitor's current name.
descriptionString!The monitor's current title.
integrationJobMonitorMigrationIntegration!
audiences[JobMonitorMigrationAudience!]!The audiences the monitor was created with.
sourceRules[JobMonitorMigrationSourceRule!]!The legacy rules whose alerts the monitor took over.
MigrationNoticeKind

Enum type. Something the migration could not carry over, which changes what the customer gets.

ValueDescription
CUSTOM_MESSAGE_DROPPED
CUSTOM_MESSAGE_BROADENED
CUSTOM_MESSAGE_COMBINED
ENUMERATED_TABLE_FILTER
ENUMERATED_TABLE_EXCLUSION
ResidualJobMonitor

Object type. A job monitor of the jobs that alerted nobody before the migration.

It had no audience at migration.

FieldTypeDescription
uuidUUID!
nameString!The monitor's current name.
descriptionString!The monitor's current title.
integrationJobMonitorMigrationIntegration!
jobCountInt!Jobs in the monitor's scope.
failedJobCount90dInt!Of those jobs, how many failed in the 90 days before the migration was proposed.
audiences[JobMonitorMigrationAudience!]!The monitor's current audiences, including ones set after the migration.

Related types

DateTime, JobMonitorIntegrationType, UUID

Mutations

createOrUpdateJobMonitor (mutation)

createOrUpdateJobMonitor is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Create or update a job monitor

Arguments

ArgumentTypeDescription
alertConditions[JobMonitorAlertConditionInput!]!The job events to alert on. At least one is required. getJobAlertConditions lists the conditions of each integration type.
alertGroupingAlertGroupingInputPer-monitor alert grouping configuration. Omit or pass null for legacy per-type grouping; a non-null value enables monitor-based alert grouping. The createOrUpdate* mutations are full-state: omitting this field on an update clears any existing configuration (same as samplingConfig).
assetSelectionJobAssetSelectionInput!Rules that select jobs of the integration. Project and table filters apply to dbt monitors only. Takes the full set of rules; an empty selection clears them.
audienceConditions[AudienceConditionInput!]Narrows individual audiences to the triage priorities that reach them. Always a full replace: omitting the argument (or passing null) makes every audience unconditional, the same as passing an empty list; a non-empty list replaces the conditions wholesale. Every audience named here must also appear in this mutation's audience list (audiences, or labels on the mutations that spell it that way), which stays the monitor's full audience set — a condition narrows when one of them is notified, it does not add one.
audiences[String!]The audiences to notify.
autoTriageBooleanPer-monitor automated-triage override. true forces triage on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit.
dataQualityDimensionStringData quality dimension of the monitor.
descriptionString!Description of the monitor.
domainRestrictions[UUID!]The domains to assign the monitor to. Empty clears them.
dryRunBooleanValidate the monitor without saving it. Default: false.
failureAudiences[String!]The audiences to notify when the monitor fails. Defaults to audiences.
integrationTypeJobMonitorIntegrationType!
integrationUuidUUID!The integration to cover: an ETL container, or a dbt connection.
isDraftBooleanSave as a draft monitor. Default: false.
jobMcons[String!]!Jobs to pick one by one, by MCON, each a job of the integration. Takes the full list; an empty list clears it.
notesStringAdditional context for the monitor.
priorityStringThe default priority for the monitor's alerts.
tags[TagKeyValuePairInput!]Monitor tags. Omitted or empty clears them.
uuidUUIDUUID of the job monitor to update. Omit to create one.

Returns

CreateOrUpdateJobMonitor

Example

mutation CreateOrUpdateJobMonitor($alertConditions: [JobMonitorAlertConditionInput!]!, $assetSelection: JobAssetSelectionInput!, $description: String!, $integrationType: JobMonitorIntegrationType!, $integrationUuid: UUID!, $jobMcons: [String!]!) {
  createOrUpdateJobMonitor(alertConditions: $alertConditions, assetSelection: $assetSelection, description: $description, integrationType: $integrationType, integrationUuid: $integrationUuid, jobMcons: $jobMcons) {
    yaml
    persistBlockedBy
    spendGuardrailMessage
  }
}

Types used only by createOrUpdateJobMonitor

CreateOrUpdateJobMonitor

Object type. Create or update a job monitor. The account must be using job monitors, except for a dry run. The integration cannot change after the monitor is created. assetSelection and jobMcons each take the full definition: an empty selection or list clears it. On update, assetSelection joiner keys left out of the input keep the stored values.

FieldTypeDescription
jobMonitorJobMonitorThe saved monitor. Null on a dry run.
yamlStringThe monitor as monitors-as-code YAML. It names the integration and jobs instead of using their ids, so it can be applied to another account.
persistBlockedByStringSet on dry runs only. Says why saving this monitor would not give the result the preview shows. A permission path, such as monitors/management/metric/edit, means the caller lacks it and the save would be refused. The caller can still save the monitor as a draft if it has the monitor type's draft permission. SPEND_GUARDRAIL means a spend guardrail is reached, so the save would create this new monitor as a draft instead of live. spendGuardrailMessage names the guardrail. When both apply, the permission path is returned. Null when the save would go through as previewed, and on requests that are not dry runs.
spendGuardrailMessageStringSet when a reached spend guardrail makes the save create this new monitor as a draft instead of live: on a dry run, when the save would do so, and on the save itself, when it did. A sentence for the user that names the guardrail (the account's or a domain's), its amount and when it resets, and says that an Account Owner can raise it. On a dry run whose persistBlockedBy is a permission path, the save is refused instead, so read that first. Null otherwise, including for a monitor saved as a draft on request, and for updates to an existing monitor.
JobMonitorAlertConditionInput

Input object type.

FieldTypeDescription
conditionString

Related types

AlertGroupingInput, AudienceConditionInput, JobAssetSelectionInput, JobMonitor, JobMonitorIntegrationType, TagKeyValuePairInput, UUID

deleteJobMonitor (mutation)

deleteJobMonitor is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Delete a job monitor

Arguments

ArgumentTypeDescription
monitorUuidUUID!UUID of the job monitor.

Returns

DeleteJobMonitor

Example

mutation DeleteJobMonitor($monitorUuid: UUID!) {
  deleteJobMonitor(monitorUuid: $monitorUuid) {
    success
  }
}

Types used only by deleteJobMonitor

DeleteJobMonitor

Object type. Delete a job monitor. Deleting one that is already deleted does nothing.

FieldTypeDescription
successBoolean!False when the monitor was already deleted.

Related types

UUID

migrateAccountJobAlerting (mutation)

migrateAccountJobAlerting is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Dry-run or migrate one account's job alerting. Monte Carlo staff only.

Arguments

ArgumentTypeDescription
accountUuidUUID!Account to migrate.
dryRunBoolean!Store a proposal without migrating the account.
proposalUuidUUIDThe reviewed proposal to apply. It must be the account's newest. Required on a real run. Ignored on a dry run.

Returns

MigrateAccountJobAlerting

Example

mutation MigrateAccountJobAlerting($accountUuid: UUID!, $dryRun: Boolean!) {
  migrateAccountJobAlerting(accountUuid: $accountUuid, dryRun: $dryRun) {
    outcome
    proposalUuid
    isBlocked
    monitorCount
    blockReasons
    createdMonitorUuids
    keptMonitorUuids
  }
}

Types used only by migrateAccountJobAlerting

JobAlertingMigrationOutcome

Enum type. What a job alerting migration run did. PROPOSED: a dry run stored a proposal. APPLIED: the account was migrated. Every other value is a refusal that migrated nothing.

ValueDescription
PROPOSED
APPLIED
ALREADY_MIGRATED
NO_PROPOSAL
NOT_LATEST
ALREADY_APPLIED
BLOCKED
STALE
KEPT_MONITORS_PRESENT
MigrateAccountJobAlerting

Object type. Dry-run or migrate one account's job alerting to job monitors. A dry run stores a proposal and changes nothing else. Returns a reference to the proposal, not the proposal itself. Monte Carlo staff only.

FieldTypeDescription
outcomeJobAlertingMigrationOutcome!
proposalUuidUUIDThe proposal stored or applied. Null when there was none.
isBlockedBoolean!Whether the proposal is blocked from applying.
monitorCountInt!How many monitors the proposal creates.
blockReasons[String!]!For a blocked proposal, each block reason and each failed assertion.
createdMonitorUuids[UUID!]!For APPLIED, the job monitors created.
keptMonitorUuids[UUID!]!For PROPOSED and KEPT_MONITORS_PRESENT, the monitors an earlier rollback kept. A real run refuses until they are resolved.

Related types

UUID

rollbackAccountJobAlertingMigration (mutation)

rollbackAccountJobAlertingMigration is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Roll back one account's job alerting migration. Monte Carlo staff only.

Arguments

ArgumentTypeDescription
accountUuidUUID!Account to roll back.

Returns

RollbackAccountJobAlertingMigration

Example

mutation RollbackAccountJobAlertingMigration($accountUuid: UUID!) {
  rollbackAccountJobAlertingMigration(accountUuid: $accountUuid) {
    outcome
    proposalUuid
    deletedMonitorUuids
    keptMonitorUuids
    alreadyDeletedMonitorUuids
  }
}

Types used only by rollbackAccountJobAlertingMigration

JobAlertingRollbackOutcome

Enum type. What a job alerting migration rollback did. NOT_APPLIED: there was nothing to roll back.

ValueDescription
ROLLED_BACK
NOT_APPLIED
RollbackAccountJobAlertingMigration

Object type. Roll back one account's job alerting migration. Legacy job alerting resumes. Monitors the customer edited since the migration are kept and reported. Monte Carlo staff only.

FieldTypeDescription
outcomeJobAlertingRollbackOutcome!
proposalUuidUUIDThe applied proposal rolled back. Null when there was none.
deletedMonitorUuids[UUID!]!The job monitors deleted.
keptMonitorUuids[UUID!]!Monitors kept because the customer edited them.
alreadyDeletedMonitorUuids[UUID!]!Monitors someone deleted before the rollback.

Related types

UUID

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.