- name: TotalRequests
  description: Number of requests made
  type: Metric
  verified: false
  visible: true
  tags:
  - auto-generated
  - agc-10210
  - rag
  properties:
    metricName: TotalRequests
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 3
    windowSize: PT5M
    evaluationFrequency: PT1M
    timeAggregation: Count
    operator: GreaterOrLessThan
    criterionType: DynamicThresholdCriterion
    failingPeriods:
      numberOfEvaluationPeriods: 4
      minFailingPeriodsToAlert: 4
    alertSensitivity: Low
    dimensions:
    - operator: include
      name: statuscode
      values:
      - '429'
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  - name: Monitoring Azure Cosmos DB data reference
    url: https://learn.microsoft.com/azure/cosmos-db/monitor-reference#request-metrics
  - name: Explore Azure Monitor Azure Cosmos DB insights
    url: https://learn.microsoft.com/azure/cosmos-db/insights-overview#insights-overview
  guid: 2a1deb2d-1fc0-499b-a828-04aeece855fe
- name: NormalizedRUConsumption
  description: Max RU consumption percentage per minute
  type: Metric
  verified: false
  visible: true
  tags:
  - auto-generated
  - agc-7686
  - rag
  properties:
    metricName: NormalizedRUConsumption
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 3
    windowSize: PT5M
    evaluationFrequency: PT1M
    timeAggregation: Average
    operator: GreaterThan
    criterionType: StaticThresholdCriterion
    threshold: 70.0
    enabled: true
  references:
  - name: How to monitor normalized RU/s for an Azure Cosmos DB container or an account
    url: https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-normalized-request-units
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  guid: 9bae539a-12ed-46e2-b105-101ce036c9a4
- name: ServiceAvailability
  description: Account requests availability at one hour, day or month granularity
  type: Metric
  verified: true
  visible: true
  tags:
  - auto-generated
  - agc-5578
  - rag
  properties:
    metricName: ServiceAvailability
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 2
    windowSize: PT1H
    evaluationFrequency: PT1M
    timeAggregation: Average
    operator: LessThan
    criterionType: StaticThresholdCriterion
    threshold: 99.9
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  - name: Monitoring Azure Cosmos DB data reference
    url: https://learn.microsoft.com/azure/cosmos-db/monitor-reference#availability-metrics
  guid: ee10b769-b38b-44d1-9fd3-926b8dca4c41
- name: TotalRequestUnits
  description: SQL Request Units consumed
  type: Metric
  verified: false
  visible: true
  tags:
  - auto-generated
  - agc-3381
  - rag
  properties:
    metricName: TotalRequestUnits
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 2
    windowSize: PT5M
    evaluationFrequency: PT1M
    timeAggregation: Total
    operator: GreaterThan
    criterionType: StaticThresholdCriterion
    dimensions:
    - operator: include
      name: statuscode
      values:
      - '429'
    threshold: 100.0
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  - name: Monitoring Azure Cosmos DB data reference
    url: https://learn.microsoft.com/azure/cosmos-db/monitor-reference#request-unit-metrics
  - name: How to monitor throughput or request unit usage of an operation in Azure
      Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor-request-unit-usage
  guid: 14fc7c6b-484f-427f-a1d2-94cded799f88
- name: ServerSideLatency
  description: Server Side Latency
  type: Metric
  verified: false
  visible: true
  tags:
  - auto-generated
  - agc-2201
  - rag
  properties:
    metricName: ServerSideLatency
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 3
    windowSize: PT5M
    evaluationFrequency: PT1M
    timeAggregation: Average
    operator: GreaterThan
    criterionType: StaticThresholdCriterion
    threshold: 100.0
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  - name: Monitoring Azure Cosmos DB data reference
    url: https://learn.microsoft.com/azure/cosmos-db/monitor-reference#latency-metrics
  guid: 28f2e10d-2297-47f9-ac6a-c7a8cc0c8ead
- name: ProvisionedThroughput
  description: Provisioned Throughput
  type: Metric
  verified: false
  visible: true
  tags:
  - auto-generated
  - agc-1906
  - rag
  properties:
    metricName: ProvisionedThroughput
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 3
    windowSize: PT1H
    evaluationFrequency: PT1M
    timeAggregation: Maximum
    operator: GreaterThan
    criterionType: StaticThresholdCriterion
    threshold: 3000.0
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  - name: Monitoring Azure Cosmos DB data reference
    url: https://learn.microsoft.com/azure/cosmos-db/monitor-reference#request-unit-metrics
  guid: f77ce9c2-bb95-47e7-8e5d-75d5c098f489
- name: RegionFailover
  description: Region Failed Over
  type: Metric
  verified: true
  visible: true
  tags:
  - auto-generated
  - agc-1531
  - rag
  properties:
    metricName: RegionFailover
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 2
    windowSize: PT5M
    evaluationFrequency: PT1M
    timeAggregation: Count
    operator: GreaterThan
    criterionType: StaticThresholdCriterion
    threshold: 0.0
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  guid: 9c41c539-b81b-4917-b04a-e67225f78e75
- name: UpdateAccountKeys
  description: Account Keys Updated
  type: Metric
  verified: true
  visible: true
  tags:
  - auto-generated
  - agc-1232
  - rag
  properties:
    metricName: UpdateAccountKeys
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 2
    windowSize: PT5M
    evaluationFrequency: PT5M
    timeAggregation: Count
    operator: GreaterThan
    criterionType: StaticThresholdCriterion
    dimensions:
    - operator: include
      name: keytype
      values:
      - '*'
    threshold: 0.0
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  - name: Monitor your Azure Cosmos DB account for key updates and key regeneration
    url: https://learn.microsoft.com/azure/cosmos-db/monitor-account-key-updates
  guid: d4d7685a-ce55-4709-a847-747d02165cb7
- name: DataUsage
  description: Total data usage reported at 5 minutes granularity
  type: Metric
  verified: true
  visible: true
  tags:
  - auto-generated
  - agc-707
  - rag
  properties:
    metricName: DataUsage
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 3
    windowSize: PT1H
    evaluationFrequency: PT15M
    timeAggregation: Average
    operator: GreaterOrLessThan
    criterionType: DynamicThresholdCriterion
    failingPeriods:
      numberOfEvaluationPeriods: 4
      minFailingPeriodsToAlert: 4
    alertSensitivity: Low
    enabled: true
  guid: 0914c189-0adc-45d6-8704-d2ae73b9b7b6
- name: MongoRequests
  description: Number of Mongo Requests Made
  type: Metric
  verified: true
  visible: true
  tags:
  - auto-generated
  - agc-518
  - rag
  properties:
    metricName: MongoRequests
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 3
    windowSize: PT5M
    evaluationFrequency: PT1M
    timeAggregation: Count
    operator: GreaterOrLessThan
    criterionType: DynamicThresholdCriterion
    failingPeriods:
      numberOfEvaluationPeriods: 4
      minFailingPeriodsToAlert: 4
    alertSensitivity: Low
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  - name: Monitoring Azure Cosmos DB data reference
    url: https://learn.microsoft.com/azure/cosmos-db/monitor-reference#request-metrics
  guid: 3f30e3aa-7e17-4eaf-a437-a420f5a23bf2
- name: RemoveRegion
  description: Region Removed
  type: Metric
  verified: false
  visible: true
  tags:
  - auto-generated
  - agc-448
  - rag
  properties:
    metricName: RemoveRegion
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 3
    windowSize: PT15M
    evaluationFrequency: PT5M
    timeAggregation: Count
    operator: GreaterThanOrEqual
    criterionType: StaticThresholdCriterion
    threshold: 0.0
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  guid: 228e104f-002a-441d-91ec-6140f233c1a4
- name: ReplicationLatency
  description: P99 Replication Latency across source and target regions for geo-enabled
    account
  type: Metric
  verified: true
  visible: true
  tags:
  - auto-generated
  - agc-390
  - rag
  properties:
    metricName: ReplicationLatency
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 3
    windowSize: PT15M
    evaluationFrequency: PT5M
    timeAggregation: Average
    operator: GreaterThan
    criterionType: StaticThresholdCriterion
    threshold: 5000.0
    enabled: true
  guid: cf0655a4-042d-4979-bbc7-5559eaa8f2b9
- name: SqlContainerDelete
  description: Sql Container Deleted
  type: Metric
  verified: false
  visible: true
  tags:
  - auto-generated
  - agc-364
  - rag
  properties:
    metricName: SqlContainerDelete
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 2
    windowSize: PT15M
    evaluationFrequency: PT5M
    timeAggregation: Count
    operator: GreaterThanOrEqual
    criterionType: StaticThresholdCriterion
    threshold: 0.0
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  guid: faf5510e-28b7-42c9-8ad1-de68a5737eaf
- name: OfflineRegion
  description: Region Offlined
  type: Metric
  verified: false
  visible: true
  tags:
  - auto-generated
  - agc-304
  - rag
  properties:
    metricName: OfflineRegion
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 3
    windowSize: PT5M
    evaluationFrequency: PT1M
    timeAggregation: Count
    operator: GreaterThan
    criterionType: StaticThresholdCriterion
    threshold: 0.0
    enabled: true
  guid: 0cb53be3-76b5-44be-9f32-bcc821be34b6
- name: SqlDatabaseDelete
  description: Sql Database Deleted
  type: Metric
  verified: false
  visible: true
  tags:
  - auto-generated
  - agc-297
  - rag
  properties:
    metricName: SqlDatabaseDelete
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 2
    windowSize: PT15M
    evaluationFrequency: PT5M
    timeAggregation: Count
    operator: GreaterThanOrEqual
    criterionType: StaticThresholdCriterion
    threshold: 0.0
    enabled: true
  references:
  - name: Monitor Azure Cosmos DB
    url: https://learn.microsoft.com/azure/cosmos-db/monitor?tabs=azure-diagnostics
  - name: Create alerts for Azure Cosmos DB using Azure Monitor
    url: https://learn.microsoft.com/azure/cosmos-db/create-alerts
  guid: a7958120-a386-46d0-9790-e80bfa72fb22
- name: ThrottledRequests
  description: Throttled requests for Cosmos DB request rate too large (429) exceptions. Most workloads can tolerate 1-5% of throttled requests.
  type: Metric
  verified: true
  visible: false
  tags:
  - rag
  properties:
    metricName: ThrottledRequests
    metricNamespace: Microsoft.DocumentDB/databaseAccounts
    severity: 2
    windowSize: PT5M
    evaluationFrequency: PT1M
    timeAggregation: Count
    operator: GreaterThan
    criterionType: StaticThresholdCriterion
    dimensions:
    - operator: include
      name: statuscode
      values:
      - '429'
    threshold: 50.0
    enabled: false
  references:
  - name: Diagnose and troubleshoot Azure Cosmos DB request rate too large (429) exceptions
    url: https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/troubleshoot-request-rate-too-large?tabs=resource-specific#recommended-solution
  guid: fc8db431-f429-40ee-a51a-de1858198e19
