Azure DocumentDB - Monitoring

Information in this article is related to using CloudMonix for monitoring Azure Document DB collections.

The article covers the following topics:

common use cases where CloudMonix can help with monitoring and automation

what happens in the monitoring cycle

what is needed to connect to and monitor Azure Document DB

what metrics can be tracked, visualized and monitored

what automated actions can be executed by CloudMonix

Why use CloudMonix for Azure Document DB?

Popular usages of CloudMonix include the following examples:

Monitoring Uptime and Availability

Monitoring status, number of requests and errors

Monitoring custom data retrieved from the database using SQL-like queries

Alerting on outages, errors and high resource utilization

Monitoring Cycle

During each monitoring cycle, CloudMonix explicitly creates a tiny test new document in the monitored database, then it updates the document and reads it to track Ready status and measure Response Time.

Configuration

Azure Document DB monitoring can be configured either via Setup Wizard or using the “Add New” button in the dashboard. It’s recommended to use Setup Wizard when configuring permissions for the first time, as this will simplify authorization. Learn more about authorizing with Setup Wizard here.

Metrics

Every diagnostic data point that CloudMonix retrieves from the monitored resource is considered a metric in CloudMonix. Refer to the Metrics article to learn more about metrics in general.

The metrics can be added, removed and customized in the Metrics tab in the resource configuration dialog.

Built-in Metrics

ResourceStatus

Identifies the last state of the monitored resource. This is a critical metric that is captured for most types of resources that CloudMonix tracks. It is used for Uptime reports and should not be removed.

Data Type: string

Possible values: Ready, Down, Unknown

Included in sample profile: yes, trackedas a metric called Status

Included in default alerts: yes,as an alert called ResourceOutage (Error) Status other than Ready sustained for at least 3 min.

Statuses are determined according to the following rules:

Ready - successfully connected to the resource

Down - there was an error when trying to retrieve data from the resource

Unknown - can’t connect to the resource (e.g. because of invalid credentials)

ResponseTime

Tracks time needed for updating and reading a tiny test document.

Data Type: double

Included in sample profile: no

Included in default alerts: no

AzureDocumentDbAccountMetric

Tracks various DocumentDB metrics on the DocumentDb account level.

Data Type: double

Requires specifying Metric Definition, i.e. selecting field that will be tracked for this metric such as Total Requests (Total), Data Size (Last) or Consistency Level (Average).

Included in sample profile: no

Included in default alerts: no

AzureDocumentDbDatabaseMetric

Tracks various DocumentDB metrics on the database level.

Data Type: double

Requires specifying Metric Definition, i.e. selecting field that will be tracked for this metric such as Total Requests (Total), Data Size (Last) or Consistency Level (Average).

Included in sample profile: no

Included in default alerts: no

AzureDocumentDbCollectionMetric

Tracks various DocumentDB metrics on the documents collection level.

Data Type: double

Requires specifying Metric Definition, i.e. selecting field that will be tracked for this metric such as Total Requests (Total), Data Size (Last) or Consistency Level (Average).

Included in sample profile: yes, tracked as metrics called Errors, RequestsPerSecond, RequestUnits

Included in default alerts: no

AzureDocumentDbOperations

Tracks the log of Azure management operations on the monitored resource.

Data Type: object with the following properties:

Name (string): Operation name

Category (string): Event category

Description (string): Event description

Caller (string): Caller

EventName (string): The event name.This value should not be confused with operation name

SubStatus (string): The event sub status. Most of the time, when included, this captures the HTTP status code

ExtendedInfo (string):The values of all properties of the EventData object displayed as Key-Value pairs, where keys are property names

EventTimestamp (DateTime): The occurrence time of event

Included in sample profile: no

Included in default alerts: no

AzureDocumentDbScript

Tracks any value retrieved using custom Document DB SQL-like script. See SQL query and SQL syntax in DocumentDB article to learn more. The query returns data in the JSON format. Query result must not exceed 64 KB when JSON serialized to be properly displayed on the dashboards.

The name of metrics can’t contain spaces, otherwise users won’t be able to define alerts using those metrics because of Document DB limitations.

AzureDocumentDbUtilization

Requires specifying Metric Definition, i.e. selecting field that will be tracked for this metric such as DatabaseUsage or StoredProceduresQuota.

Included in sample profile: yes, tracked as a metric called Size

Included in default alerts: no

Alerts

Users can create alerts based on changes in any value tracked by CloudMonix (including custom metrics). Each resource template includes alerts which are suitable for a given resource. The predefined alerts for Azure Document DB are listed in the Metrics section. Refer to the Alerts article to learn more about alerts in general.

Alerts are available during the Trial period or in Professional and Ultimate plans only.