New Relic infrastructure monitoring provides an integration for Microsoft Azure's Cosmos DB service that reports your Cosmos DB metrics and other data to New Relic. This document explains how to activate the Cosmos DB integration and describes the data that can be captured.
Features
New Relic 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, and you can create custom queries and custom chart dashboards.
Activate integration
To enable this integration follow standard procedures to activate your Azure service in New Relic.
The Cosmos DB integration requires you to create an additional role and permission to fetch database and collection data:
Go to the Azure Portal and open a shell by selecting the terminal icon.
Add the following command:
bash$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"$}'From Services > Subscriptions, select the subscription, go to Access control (IAM), and then select Add.
In the Role search box, add the name of the newly created role definition (for example,
NewRelic Integrations
).In the Select search box, add the name of the New Relic integration application, and select it.
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 or 5 minutes, varies by metric. For resolution information on a specific metric, see Microsoft Azure's documentation about support metrics.
View and query data
To view your integration data, go to one.newrelic.com > All capabilities > Infrastructure > Azure and select the Cosmos DB Integration.
You can query and explore your data using the following event types:
Entity | Event Type | Provider |
---|---|---|
Account |
|
|
Database |
|
|
Collection |
|
|
For more on how to find and use data, see Understand and use integration data.
Metric data
重要
For information on deprecated Cosmos DB events or metrics, see Azure Cosmos DB integration (deprecated). We strongly recommend migrating to the supported events and metrics in this document.
To view metrics reported by the Cosmos DB integration, query the Entities below. Use the metadata associated with each metric to filter and facet the data being reported. For detailed metric information, see the Azure supported metrics documentation.
Account Data
Metric | Description | Metadata |
---|---|---|
| Total number of requests. |
|
| Count of metadata requests. |
|
| Count of Mongo requests made. |
|
| Total number of Mongo request units consumed. |
|
| Total number of request units consumed. |
|
| Throughput provisioned for the database or collection. |
|
| Total available storage, in bytes. |
|
| Total data usage reported, in bytes. |
|
| Total index usage reported, in bytes. |
|
| Total storage quota reported, in bytes. |
|
| Total document count reported. |
|
| P99 replication latency across source and target regions for geo-enabled account, in milliseconds. |
|
| Account requests availability percentage in hour, day, or month granularity. | No specific metadata. |
| Count of Cassandra requests made. |
|
| Total number of request units consumed for Cassandra requests. |
|
| Total number of Cassandra connections that were closed. |
|
DataBase Data
Metric | Description | Metadata |
---|---|---|
| Total number of requests. |
|
| Count of metadata requests. |
|
| Count of Mongo requests made. |
|
| Total number of Mongo request units consumed. |
|
| Total number of request units consumed. |
|
| Throughput provisioned for the database or collection. |
|
| Total available storage, in bytes. |
|
| Total data usage reported, in bytes. |
|
| Total index usage reported, in bytes. |
|
| Total storage quota reported, in bytes. |
|
| Total document count reported. |
|
| P99 replication latency across source and target regions for geo-enabled account, in milliseconds. |
|
| Account requests availability percentage in hour, day, or month granularity. | No specific metadata. |
| Count of Cassandra requests made. |
|
| Total number of request units consumed for Cassandra requests. |
|
| Total number of Cassandra connections that were closed. |
|
Collection Data
Metric | Description | Metadata |
---|---|---|
| Total number of requests. |
|
| Count of metadata requests. |
|
| Count of Mongo requests made. |
|
| Total number of Mongo request units consumed. |
|
| Total number of request units consumed. |
|
| Throughput provisioned for the database or collection. |
|
| Total available storage, in bytes. |
|
| Total data usage reported, in bytes. |
|
| Total index usage reported, in bytes. |
|
| Total storage quota reported, in bytes. |
|
| Total document count reported. |
|
| P99 replication latency across source and target regions for geo-enabled account, in milliseconds. |
|
| Account requests availability percentage in hour, day, or month granularity. | No specific metadata. |
| Count of Cassandra requests made. |
|
| Total number of request units consumed for Cassandra requests. |
|
| Total number of Cassandra connections that were closed. |
|