---
title: "Create Monitor"
method: POST
path: "/v1/monitors"
tags: ["Monitors"]
---

# Create Monitor

`POST /v1/monitors`

Create a new monitor on a given absolute path like "{database}.{schema}.{table}.{column}"

## Request body

- MonitorEgg
  - `type` 'ROW_COUNT' | 'COLUMN_COUNT' | 'CARDINALITY' | 'UNIQUENESS' | 'NULLNESS' | 'PERCENT_ZERO' | 'PERCENT_NEGATIVE' | 'MIN' | 'MAX' | 'MEAN' | 'STDDEV' | 'FRESHNESS' | 'CUSTOM' | 'PUSH' | 'SUM' | 'DURATION' | 'GENERIC_OBJECT'
  - `cronTab` string
  - `config` MonitorConfig, nullable
    - `customSql` string, nullable
    - `customMetricUnitType` 'INT' | 'FLOAT' | 'PERCENT' | 'SECOND' | 'BYTE' | 'MILLISECOND', nullable — Overrides the display type in the metaplane UI. Default to float if not specified. Only applies to custom sql monitors
    - `incrementalClause` PublicIncrementalClause, nullable
      - `columnName` string
      - `duration` TimeDuration
        - `days` integer
        - `hours` integer
        - `minutes` integer
    - `customWhereClause` string, nullable
    - `alertRule` union — Optional alert rule configuration. Defaults to ANOMALY
      - object
        - `type` 'ANOMALY' | 'MANUAL'
        - `numFailuresBeforeAlert` integer, nullable — Number of time a monitor can fail before an incident is created
        - `sensitivity` number, double — Control the bounds of the model. The default value is 3.0. 0.3 high is the highest sensitivity correlating with smallest bounds. 6.0 Is lowest sensitivity corresponding with the largest bounds.
        - `monitorTypeOverride` 'ROW_COUNT' | 'COLUMN_COUNT' | 'CARDINALITY' | 'UNIQUENESS' | 'NULLNESS' | 'PERCENT_ZERO' | 'PERCENT_NEGATIVE' | 'MIN' | 'MAX' | 'MEAN' | 'STDDEV' | 'FRESHNESS' | 'CUSTOM' | 'PUSH' | 'SUM' | 'DURATION' | 'GENERIC_OBJECT'
        - `modelClassType` 'STATIONARY' | 'NONE'
        - `modelBoundsOverride` 'UPPER_ONLY' | 'LOWER_ONLY', nullable — Flags to completely override part of the model bounds
        - `minLowerBoundSize` number, double, nullable — Controls the minimum size for the lower bound of the models predictive range
        - `minUpperBoundSize` number, double, nullable — Controls the minimum size for the upper bound of the models predictive range
      - object
        - `type` 'ANOMALY' | 'MANUAL'
        - `numFailuresBeforeAlert` integer, nullable — Number of time a monitor can fail before an incident is created
        - `thresholds` PublicManualThreshold[]
          - `operatorType` 'GREATER_THAN' | 'GREATER_THAN_EQUALS' | 'LESS_THAN' | 'LESS_THAN_EQUALS' | 'EQUAL' | 'NOT_EQUAL'
          - `value` number, double
    - `groupByColumns` string[], nullable — List of columns to group query by
    - `timeZone` string, nullable — Timezone identifier like: America/New_York
  - `connectionId` string, uuid
  - `entityType` 'TABLE' | 'COLUMN' | 'DATABASE' | 'SCHEMA'
  - `absolutePathString` string
  - `name` string, nullable
  - `description` string, nullable

## Response `200`

Success

- PublicMonitor
  - `id` string, uuid
  - `type` 'ROW_COUNT' | 'COLUMN_COUNT' | 'CARDINALITY' | 'UNIQUENESS' | 'NULLNESS' | 'PERCENT_ZERO' | 'PERCENT_NEGATIVE' | 'MIN' | 'MAX' | 'MEAN' | 'STDDEV' | 'FRESHNESS' | 'CUSTOM' | 'PUSH' | 'SUM' | 'DURATION' | 'GENERIC_OBJECT'
  - `genericObjectSubtype` string
  - `valueType` 'METRIC' | 'SOURCE_TO_TARGET'
  - `cronTab` string
  - `name` string, nullable
  - `description` string, nullable
  - `isEnabled` boolean
  - `config` MonitorConfig, nullable
    - `customSql` string, nullable
    - `customMetricUnitType` 'INT' | 'FLOAT' | 'PERCENT' | 'SECOND' | 'BYTE' | 'MILLISECOND', nullable — Overrides the display type in the metaplane UI. Default to float if not specified. Only applies to custom sql monitors
    - `incrementalClause` PublicIncrementalClause, nullable
      - `columnName` string
      - `duration` TimeDuration
        - `days` integer
        - `hours` integer
        - `minutes` integer
    - `customWhereClause` string, nullable
    - `alertRule` union — Optional alert rule configuration. Defaults to ANOMALY
      - object
        - `type` 'ANOMALY' | 'MANUAL'
        - `numFailuresBeforeAlert` integer, nullable — Number of time a monitor can fail before an incident is created
        - `sensitivity` number, double — Control the bounds of the model. The default value is 3.0. 0.3 high is the highest sensitivity correlating with smallest bounds. 6.0 Is lowest sensitivity corresponding with the largest bounds.
        - `monitorTypeOverride` 'ROW_COUNT' | 'COLUMN_COUNT' | 'CARDINALITY' | 'UNIQUENESS' | 'NULLNESS' | 'PERCENT_ZERO' | 'PERCENT_NEGATIVE' | 'MIN' | 'MAX' | 'MEAN' | 'STDDEV' | 'FRESHNESS' | 'CUSTOM' | 'PUSH' | 'SUM' | 'DURATION' | 'GENERIC_OBJECT'
        - `modelClassType` 'STATIONARY' | 'NONE'
        - `modelBoundsOverride` 'UPPER_ONLY' | 'LOWER_ONLY', nullable — Flags to completely override part of the model bounds
        - `minLowerBoundSize` number, double, nullable — Controls the minimum size for the lower bound of the models predictive range
        - `minUpperBoundSize` number, double, nullable — Controls the minimum size for the upper bound of the models predictive range
      - object
        - `type` 'ANOMALY' | 'MANUAL'
        - `numFailuresBeforeAlert` integer, nullable — Number of time a monitor can fail before an incident is created
        - `thresholds` PublicManualThreshold[]
          - `operatorType` 'GREATER_THAN' | 'GREATER_THAN_EQUALS' | 'LESS_THAN' | 'LESS_THAN_EQUALS' | 'EQUAL' | 'NOT_EQUAL'
          - `value` number, double
    - `groupByColumns` string[], nullable — List of columns to group query by
    - `timeZone` string, nullable — Timezone identifier like: America/New_York
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `absolutePath` string
  - `entityType` string
  - `connectionId` string, uuid
  - `monitorTags` string[]
  - `monitorGroups` MonitorGrouping[], nullable — List of all groups that have seen at least one datapoint for this monitor
    - `groupings` LabelNameValue[]
      - `name` string
      - `value` string

---

[API](https://skmtc.dev/metaplane/apis/metaplane-api.md) · [All operations](https://skmtc.dev/metaplane/apis/metaplane-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/metaplane/metaplane-api/revisions/97bbb4440547/schema)
