Azure Cosmos DB (Document DB) monitoring integration

Access to this feature depends on your subscription level. Requires Infrastructure Pro.

New Relic Infrastructure provides an integration for Microsoft Azure's Cosmos DB service that reports your Cosmos DB metrics and inventory data to New Relic products. This document explains how to activate the Cosmos DB integration and describes the data that can be captured.

Features

New Relic Infrastructure gathers both database data and collection billing data from your Azure Cosmos DB service. You can monitor and alert on your Azure Cosmos DB data from New Relic Infrastructure, and you can create custom queries and custom chart dashboards in New Relic Insights.

Requirements

Requirements include:

Activate integration

To enable this integration:

  1. Make sure you have installed the Infrastructure agent before you activate Azure integrations from your Infrastructure account.
  2. Follow standard procedures to activate your Azure service in New Relic Infrastructure.

The Cosmos DB integration requires you to create an additional role and permission to fetch database and collection data:

  1. Go to the Azure Portal and open a shell by selecting the terminal [terminal icon] icon.
  2. Add the following command:

    az role definition create --role-definition '{
      "Name": "NewRelic Integrations",
      "Actions": [
        "*/read",
        "Microsoft.DocumentDB/databaseAccounts/listKeys/action"
      ],
      "NotActions": [],
      "AssignableScopes": [
        "/subscriptions/YOUR_INSERT_SUBSCRIPTION_ID"
      ],
      "Description": "Read Only for NewRelic Integrations",
      "IsCustom": "true"
    }'
  3. From Services > Subscriptions, select the subscription, go to Access control (IAM), and then select plus Add.
  4. In the Role search box, add the name of the newly created role definition (for example, NewRelic Integrations).
  5. In the Select search box, add the name of the New Relic integration application, and select it.
  6. Ensure that the application is added to the Selected members list, then Save.

Configuration and polling

You can change the polling frequency and filter data using configuration options.

Default polling information for the Cosmos DB integration:

  • Polling interval: 5 minutes
  • Resolution: 1 minute

Find and use data

To find your integration data in Infrastructure, go to infrastructure.newrelic.com > Integrations and look for the integration.

In New Relic Insights, data is organized like this:

Data Description
Event type
  • AzureCosmosDbAccountSample: about the Cosmos DB account
  • AzureCosmosDbDatabaseSample: about the database
  • AzureCosmosDbCollectionSample: about the collection
provider value
  • AzureCosmosDbAccount: about the DB Account
  • AzureCosmosDbDatabase: about the database
  • AzureCosmosDbCollection: about the collection

For more on how to find and use data, see Understand and use integration data.

Metric data

Here are the metrics reported by the MySQL integration. For more about how data is structured and reported to New Relic, see Understand and use integration data.

Metric Description
availableStorageBytes

Total available storage capacity in bytes, per Account.

averageRequestsPerSecond

Average number of requests per second, per Account.

consistencyLevelPercent

Percent of requests that meet the SLA, per Collection.

dataSizeBytes

Total data size in bytes, per Account.

documentCount

Total number of documents, per Account.

http2xx

Total count of HTTP 2xx responses.

http3xx

Total count of HTTP 3xx responses.

http400

Total count of HTTP 400 responses.

http401

Total count of HTTP 401 responses.

indexSizeBytes

Total index size in bytes, per Account.

internalServerError

Total count of Internal Server Error codes.

maxRequestUnitsPerSecond

Maximum RUs consumed per second, per Account.

mongoQueryRequestCharge

Total Request Units (RU) consumed on Query operations (MongoDB only).

mongoUpdateRequestCharge

Total RU consumed on Update operations (MongoDB only).

mongoDeleteRequestCharge

Total RU consumed on Delete operations (MongoDB only).

mongoInsertRequestCharge

Total RU consumed on Insert operations (MongoDB only).

mongoCountRequestCharge

Total RU consumed on Count operations (MongoDB only).

mongoOtherRequestCharge

Total RU consumed on Other operations (MongoDB only).

mongoQueryRequestRate

Total number of Query operations, per Account or Collection (MongoDB only).

mongoUpdateRequestRate

Total number of Update operations, per Account or Collection (MongoDB only).

mongoDeleteRequestRate

Total number of Delete operations, per Account or Collection (MongoDB only).

mongoInsertRequestRate

Total number of Insert operations, per Account or Collection (MongoDB only).

mongoCountRequestRate

Total number of Count operations, per Account or Collection (MongoDB only).

mongoOtherRequestRate

Total number of other requests, per Account or Collection (MongoDB only).

mongoQueryFailedRequests

Total number of failed Query operations, per Account or Collection (MongoDB only).

mongoUpdateFailedRequests

Total number of failed Query operations, per Account or Collection (MongoDB only).

mongoDeleteFailedRequests

Total number of failed Delete operations, per Account or Collection (MongoDB only).

mongoInsertFailedRequests

Total number of failed Insert operations, per Account or Collection (MongoDB only).

mongoCountFailedRequests

Total number of failed Count operations, per Account or Collection (MongoDB only).

mongoOtherFailedRequests

Total number of failed other operations, per Account or Collection (MongoDB only).

observedReadLatencyMilliseconds

99th percentile of the average observed latencies for document lookup operations, in milliseconds.

observedWriteLatencyMilliseconds

99th percentile of the average observed latencies for document write operations, in milliseconds.

serviceAvailabilityPercent

Average percentage of successful requests as defined in the SLA, per Collection (or Database).

serviceUnavailable

Total count of Service Unavailable codes.

storageCapacityBytes

Total storage capacity in bytes, per Account.

throttledRequests

Total number of requests failed due to throttling (throughput or storage), per Collection.

totalRequests

Total number of requests, per Account.

totalRequestUnits

Total RUs consumed, per Account.

Inventory data

Inventory data is information about your system's state and configuration. For details on how to find and use inventory data, see Understand and use data.

The Cosmos DB integration reports this inventory data:

Inventory category Data reported
Account

documentEndpoint

databaseAccountOfferType

consistencyPolicy

defaultConsistencyLevel

resourceGroupName

type

regionName

Database

account

name

Collection

account

database

name

For more help

Recommendations for learning more: