Overview

Information in this article is related to using CloudMonix for monitoring Azure Media Services resources.


The article covers the following topics:

  • common use cases where CloudMonix can help with monitoring and automation

  • what is needed to connect to and monitor Azure Media Services

  • what metrics can be tracked, visualized and monitored

  • what automated actions can be executed by CloudMonix


Why use CloudMonix for Azure Media Services?

Popular usages of CloudMonix include the following examples:

  • Tracking and alerting on jobs and tasks errors

  • Monitoring assets and streaming endpoints availability and health

  • Monitoring Azure management operations

Configuration


Azure Media Services monitoring can be configured either via Setup Wizard or by using the “Add New” button in the dashboard. It’s highly recommended to use Setup Wizard when configuring permissions for the first time, as that 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.


CloudMonix retrieves Azure Media Services metrics by directly querying resources using Media Services Client.


CloudMonix provides a default template for monitoring Azure Media Services.


 

LNNPu-vI-3BdlOLvxs5TaImgu95cyO5RqA.png


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, tracked as a metric called Status

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

Statuses are determined according to the following rules:


  • Ready - successfully connected to the resource

  • Down - there was an error when trying to connect to the resource or when attempting retrieve metrics

  • Unknown - can’t connect to the resource (e.g. because of invalid credentials) or can’t retrieve data (no result returned)


ResourceInstanceCount

The current number of Reserved Encoding Units. See this article to learn more about scaling encoding with Azure Media Services.

  • Data Type: int

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

  • Included in default alerts: no



AzureMediaServiceJobs

Tracks information about jobs that were recently running or finished executing.

  • Data Type:  object with the following properties:

  • Name (string): Job name

  • StartTime (DateTime?): Time the job started for active jobs, null otherwise.

  • EndTime (DateTime?): Time the job ended for finished jobs, null otherwise.

  • Duration (double): Duration of job execution for finished jobs, in seconds. -1 for in progress and not started jobs.

  • InputAssetCount (int): Number of Assets that are inputs to the given job.

  • OutputAssetCount (int): Number of Assets that are outputs of the given job.

  • TaskCount (int): Number of Tasks that compose the given job.

  • State (string): The state of the job, aggregate for all Tasks that compose the job. If any Task fails, the State will be Error. Possible values: Queued, Scheduled, Processing, Finished, Error, Cancelled, Cancelling, Error.

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

  • Included in default alerts: yes, in an alert called Failed Jobs detected (Warning): Raises an alert if any jobs with Error state have been detected


AzureMediaServiceStreamingEndpoints

Tracks information about currently active streaming endpoints.

  • Data Type: object with the following properties:

  • Name (string): Endpoint name

  • Hostname (string): Host name of the endpoint

  • Created (DateTime): Endpoint creation date

  • ScaleUnits (int): Number of scale Units of the endpoint

  • State (string): Endpoint state, possible values: Starting, Running, Stopping, Stopped, Scaling, Deleting

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

  • Included in default alerts: no



AzureMediaServiceTaskErrors

Tracks detailed information about failed jobs and tasks.

  • Tracked per Task.

  • Data Type: object with the following properties:

  • JobName (string): Job name

  • TaskName (string): Task name

  • State (string): Task state, possible values: None, Active, Running, Completed.

  • Duration (double): Execution time of the task, in seconds.

  • TaskBody (string): Information about input and output Assets that Task should run against, in XML format.

  • Errors (string): Concatenated error, error code and error name of each exception for the given task.

  • Included in sample profile: yes, tracked as a metric called TaskErrors and TaskErrorsCount

  • Included in default alerts: yes, in an alert called Failed Tasks detected (Warning): Raises an alert if any tasks with errors have been detected


AzureMediaServicesAssets

Tracks information about available assets that were recently created.

  • Data Type: object with the following properties:

  • Name (string): Asset name

  • Created (DateTime): Asset creation date

  • State (string): Asset state, possible values: Starting, Running, Stopping, Stopped, Deleting

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

  • Included in default alerts: no


AzureMediaServicesChannels

Tracks information about available channels that were recently created.

  • Data Type: object with the following properties:

  • Name (string): Channel name

  • Created (DateTime): Channel creation date

  • State (string): Channel state, possible values: Starting, Running, Stopping, Stopped, Deleting

  • Included in sample profile: no

  • Included in default alerts: no


AzureMediaServicesOperations

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

  • Level (string): Event level

  • Status (string): The event status. Possible values include: Started, Succeeded, Failed

  • 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: yes, tracked as a metric called Operations

  • 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 Media Services 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.