Skip to content

Introduction

This is the installation guide of the health monitor. In this guide you'll learn how to install and configure the D365FSCM package and how to configure Azure Application Insights.

Installation

Getting a license

To obtain your license, send an email to andy.marijs@delaware.pro and provide the following information:

  1. Customer tenant name
  2. Serial number (this is your tenant id)

You can find this information in D365FSCM, see screenshot below.

tenant-and-serial-number

Installing the deployable package and license

Make sure to get the latest version of the package. Import the solution as shown below.

import-solution-package

After importing the solution, the latest version will be available the LCS Asset library. Download this version and it to your source control. Follow the instructions from Microsoft to do this.

Follow the license installation guide to include the license in the package.

Configuration

Enable telemetry feature in D365FSCM

The health monitor is built on top of the Microsoft 'Monitoring and Telemetry' feature, make sure to enable it in feature management.

enable-telemetry-feature

Create Azure Application Insights instance

You will need an Azure subscription and the required privileges to do this. If you are unsure, contact us or your IT department to assist you. The Application Insights instance will capture the telemetry sent by D365FSCM. Every D365FSCM instance you want to monitor needs a seperate Application Insights instance.

In the Azure portal, search for 'Application Insights' in the search bar and follow the wizard to create the instance.

create-application-insights-instance

Once the deployment is complete, copy the instrumentation key, you'll need it later.

save-instrumentation-key

Repeat this process for every environment you want to monitor.

Connect D365FSCM with the Application Insights instance

In D365FSCM, go the 'Monitoring and Telemetry parameters'. In the 'Environments' tab, add your environments. The 'Environment id' can be found in LCS.

add-environment-in-d365fscm

In the 'Application Insights Registry' tab, link the environments created earlier with the Application Insights instances by using the instrumentation keys from before.

link-environment-with-application-insights-instance

Configure what telemetry should be tracked

In D365FSCM, go the 'Monitoring and Telemetry parameters'. Note that it might take a few minutes for telemetry to show up in Application Insights after it is enabled in D365FSCM.

Standard Microsoft telemetry

In the 'Configure' tab, enable:

  • Custom metrics (Metrics)
  • Form runs (Page views)
  • User sessions (Custom Events)
  • X++ exceptions (Failures)

Health monitor telemetry

In the 'Health monitor' tab you can enable monitoring for the processes you use.

We advise not to activate 'Live metrics' and 'Performance counters' as these send out a lot of data. Azure Application Insights is billed based on the storage you consume. This feature is included for troubleshooting during short periods of time and should always be enabled after a discussion with your IT department and MS partner.

In the 'Health monitor' tab page, you can enable any other telemetry based on the processes you want to monitor.

Monitoring batch jobs

To enable batch telemetry, enable it in the 'Monitoring and Telemetry parameters'. Then you can select which individual batch jobs you want to track by checking 'Enable telemetry' on the batch job. By default, no batch jobs are tracked.

enable-batch-telemetry

Set up daily ingestion cap and alerts

To limit costs, it is advised to set up a daily data ingestion cap and alerts when you hit certain ingestion thresholds. The exact amount will depend on the usage of the environment, but a good starting point is 1 GB per day. You can adjust this later to better fit your usage. We recommend to set the daily cap warning level at 30%.

Go to your Azure Application Insights instance, select Usage and estimated costs, click 'Daily Cap' and fill in the desired values

set-up-daily-cap

When your Application Insights is linked to a Log Analytics workspace, you need to add the cap there as well. You can also add extra alerts in this workspace, under Monitoring > Alerts

daily-cap-log-analytics-workspace

Install Application Insights example dashboard

The example dashboard is provided in a json file, this should be provided with the license file. If not, contact andy.marijs@delaware.pro to get the latest example dashboard. This example dashboard is intended to get you started quickly.

Open the json file and replace the following values with your own:

  • '#subscriptionId#' - The subscription guid
  • '#resourceGroup#' - The name of the resource group
  • '#insightsInstance#' - The name of the application insights instance

Go to your Azure Application Insights instance. Click 'Application dashboard' and then upload the json file

upload-example-dashboard

Object model

Included in the package

These properties are included in every metric:

  • ActivityId
  • ChannelId (The retail channel of the user)
  • DataAreaId (The company the user is working in)
  • InstanceName
  • RoleName

Extra properties for certain telemetry types

Some events have extra properties included, they are listed here.

Batch job

  • Caption
  • Id
  • StartDateTime
  • EndDateTime
  • ExecutedBy
  • Recurrence
  • Status

Document routing agent

  • JobId
  • Status
  • StartProcessingTime
  • EndProcessingTime
  • CreatedDateTime
  • WaitingInMS
  • ProcessingInMS
  • PrinterName
  • CreatedBy

ReqTransPoMarkFirm

  • FirmedOrderCount
  • AutoFirm
  • CallerPurchId
  • MultiThreaded

PriceCalculation

  • Retail
  • ItemId
  • Account
  • ModuleType

PrintDocuments

  • Report
  • InBatch
  • Destination
  • ExecutionMode

Adding your own custom telemetry properties

The health monitor was built with extensibility in mind. It's straightforward to add your own properties in X++ code.

For example: you want to monitor extra properties from the sales order confirmation process.

You can do this by creating:

  • an extension on DLWHMSalesFormLetter_Confirm_Extension class
  • a chain of command on DMRBuildPropertyDict in the new class and and add your own properties.