Skip to main content

Notifications

Announcements

No record found.

Using Azure Monitor with D365 FO On-premises

In this post I would like to share field experience and provide you with a quick overview of Azure Monitor and demonstrate how fast and easily you can build a tool that can help you to monitor your F&O on-premises infrastructure using Azure tools. I will not go into too many details as it is not a step-by-step demo, instead I would like to demonstrate how you can keep your on-premises logs and metrics in one place using Azure Monitor.

Azure Monitor overview

Azure Monitor is a service in the Azure Cloud that helps you increase the performance and the availability of your applications and services by collecting, analyzing and acting on telemetry from your cloud and on-premises environments. Azure Monitor isn’t just for monitoring since azure services can collect data across every layer in the application stack. Compute resources such as virtual machines supporting the application infrastructure require an agent to collect logs and performance data from the guest operating system workloads. Azure Monitor can collect data from VMs that live in Azure, another cloud or On-premises. Data from resources is collected into either metrics or logs. Metrics are numerical values that describe some aspect of a system at a particular point in time. They are lightweight and capable of supporting near real-time scenarios. Logs contain different kinds of data organized into records with different sets of properties for each type. Telemetry such as events and traces are stored as logs in addition to performance data so that it can all be combined for analysis.

7853.pastedimage1652574533454v1.png

Log data collected by Azure Monitor can be analyzed with queries to quickly retrieve, consolidate, and analyze collected data. You can create and test queries using Log Analytics in the Azure portal. You can then either directly analyze the data using different tools or save queries for use with visualizations or alert rules. Azure Monitor uses a version of the Kusto query language that is suitable for simple log queries but also includes advanced functionality such as aggregations, joins, and smart analytics. You can quickly learn the query language using multiple lessons. You can use Azure Dashboards, Workbooks for visualization, Power Bi is also available if you want to make data available to others within or outside of your organization.

You can find Azure monitor documentation here

Demo

Now I would like to show you how easy it is to set up environment monitoring with Azure Monitor. I will create a simple dashboard that uses data and telemetry from D365 FO On-premises environment assuming that virtual machines are connected to the internet (gateways for VM's that are not connected to the internet are also available).

1. Create a new resource group

Resource group is a container that holds related resources for an Azure solution. The resource group can include all the resources for the solution, or only those resources that you want to manage as a group. More about resource groups (Manage resource groups - Azure portal - Azure Resource Manager | Microsoft Docs)

7128.not_2D00_sure.png

2. Create Log Analytics workspace

Azure Monitor stores log data in a Log Analytics workspace, which is an Azure resource and a container where data is collected, aggregated, and serves as an administrative boundary. Data in a workspace is organized into tables, each of which stores different kinds of data and has its own unique set of properties based on the resource generating the data. Most data sources will write to their own tables in a Log Analytics workspace.

4857.pastedimage1652575523765v1.png

6036.Log-analytics.png

Morea about workspaces (Designing your Azure Monitor Logs deployment - Azure Monitor | Microsoft Docs)

3. Install Agents

Virtual machines and other compute resources require an agent to collect monitoring data required to measure the performance and availability of their guest operating system and workloads. There are multiple ways on how to install agents (Install Log Analytics agent on Windows computers - Azure Monitor | Microsoft Docs). I used the setup wizard. You will need agents for every VM that you would like to monitor.  

  • In your Log Analytics workspace, from the Windows Servers page you navigated to earlier, select the appropriate Download Windows Agent version to download depending on the processor architecture of the Windows operating system.

 4201.agent-management_2D00_pre.png

  • Run Setup to install the agent on your computer.
  • On the Welcome page, click Next.
  • On the License Terms page, read the license and then click I Agree.
  • On the Destination Folder page, change or keep the default installation folder and then click Next.
  • On the Agent Setup Options page, choose to connect the agent to Azure Log Analytics and then click Next.
  • On the Azure Log Analytics page, perform the following:
    • Paste the Workspace ID and Workspace Key (Primary Key) that you copied earlier. If the computer should report to a Log Analytics workspace in Azure Government cloud, select Azure US Government from the Azure Cloud drop-down list.
  • If the computer needs to communicate through a proxy server to the Log Analytics service, click Advanced and provide the URL and port number of the proxy server. If your proxy server requires authentication, type the username and password to authenticate with the proxy server and then click Next.

2018.pastedimage1652576368006v5.png

  • Click Next once you have completed providing the necessary configuration settings.
  • On the Ready to Install page, review your choices and then click Install.
  • On the Configuration completed successfully page, click Finish.

4. Validate agent(s) connectivity to Azure Monitor

Once installation is complete you can go to Control panel > Microsoft Monitoring Agent, select Azure log analytics tab.

3362.pastedimage1652576742608v6.png

5807.pastedimage1652576871961v8.png

You can also to Azure portal, select monitor > select Logs, execute the following code:

Heartbeat 
| where Category == "Direct Agent" 
| where TimeGenerated > ago(30m)  

8666.pastedimage1652576938580v9.png

5. Configure Event logs

Go to Agent configuration to configure event logs you would like to collect or monitor. Go to Event Viewer > Microsoft > Dynamics for the full list

0636.Picture2.png

.3568.pastedimage1652577390605v11.png

2555.pastedimage1652577157344v10.png

Let’s say if you want to monitor deployment process and build a visualization for your servicing process you may want to look at orchestrator events like the following to monitor your LCS Deployments:

Microsoft-Dynamics-AX-SetupModuleEvents/Operational; Microsoft-Dynamics-AX-SetupInfrastructureEvents/Operational; Microsoft-Dynamics-AX-LocalAgent/Operational.

6. Configure performance data

3872.Perfcounters.png

More information on how to collect performance data https://docs.microsoft.com/en-us/azure/azure-monitor/agents/data-sources-performance-counters

7. Create and share dashboards

2402.dashboard_2D00_new.png

Go to Logs to organize your Event logs. Azure Monitor Logs is a feature of Azure Monitor that collects and organizes log and performance data from monitored resources. Several features of Azure Monitor store their data in Logs and present this data in a variety of ways to assist you in monitoring the performance and availability of your cloud and hybrid applications and their supporting components. Data is retrieved from a Log Analytics workspace through a log query, which is a read-only request to process data and return results. Log queries are written in Kusto Query Language (KQL). KQL is the same query language that Azure Data Explorer uses.

You can pin the logs directly to a dashboard

6305.pin_2D00_query.png

More information about dashboards: Create and share dashboards of Azure Log Analytics data - Azure Monitor | Microsoft Docs

Logs Azure Monitor Logs - Azure Monitor | Microsoft Docs

You can also use workbooks to create visualizations

https://docs.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-overview

3554.pastedimage1652588666436v2.png

3730.pastedimage1652588806630v3.png

Features

When your D365 FO on-premises virtual machines are not connected to the internet you can use Log Analytics Gateway https://docs.microsoft.com/en-us/azure/azure-monitor/agents/gateway.You can also integrate your azure monitor solution with Event Hub, Logic Apps, configure Power BI to import log data from Azure monitor or integrate with multiple API’s available to read and write metrics and logs to and from Azure Monitor.

More information about logic apps https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-overview

Event hubs https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-about

Happy Monitoring! Please note that D365 FO On-premises deployment is not supported in any public.

Comments

*This post is locked for comments