Skip to main content
Use Azure Automation DSC to configure Log Analytics multi-homing
  1. Posts/

Use Azure Automation DSC to configure Log Analytics multi-homing

·346 words·2 mins
Christoph Petersen
Author
Christoph Petersen

The Microsoft Monitoring Agent is able to send data to more than one workspace at the same time. Unfortunately only a single workspace at a time can be configured through the Azure Portal.

You can either manually access the agents and configure it yourself through the Control Panel or use some kind of automation. The following PowerShell DSC configuration which can be used with Azure Automation DSC and/or PowerShell DSC downloads the appropriate agent, installs it and configures workspaces defined in the document:

The following steps walk through the setup of Azure Automation DSC to setup MMA multi-homing for a fleet of Windows based machines.

Create configuration
#

If you do not already have an Automation Account, go ahead an create one. I suspect you already have one that is connected to your Log Analytics workspace. Within the Automation Account select State Configuration (DSC) > Configurations > Add to open the wizard that lets you import a new configuration.

Azure Automation DSC configurations

In the following screen just select the .ps1 file which contains the DSC configuration and hit Ok .

Import configuration wizard

Next we need to compile the configuration so it can be assigned to nodes. Simply open up the configuration and hit Compile :

Compile configuration

Add node(s)
#

Just like when using a DSC pull server you need to tell the individual nodes that it now needs to get its configuration from Azure Automation DSC. This can be done comfortable through the portal:

Azure Automation DSC nodes

Select your node from the list and hit Connect :

Add node wizard

This opens the registration wizard. This is basically the DSC meta configuration that will be sent to the client: which node configuration should be applied, which refresh frequency configured and how often the configuration should take place. You can also set the configuration mode, if DSC should reboot the node and what should happen after the reboot. You can find more details about the DSC meta configuration in the documentation.

Node registration wizard

Result
#

Once the node is connected the configuration will be applied and the configuration results will be sent to Azure Automation DSC and can be visualized there:

Node compliance

Related

Inventory VMs with PowerShell DSC and Log Analytics

·501 words·3 mins
Photo by Matt Artz on Unsplash In many scenarios there is the requirement to enrich or lookup data with meta information from the infrastructure. In this scenario a file with machine, location and other meta information was placed during deployment on the VM for both Azure and AWS.

Application Insights Connector deprecation

·101 words·1 min
In a time before cross-resource queries were possible the Application Insights Connector would copy data from Application Insights to a Log Analytics workspace. With the emergence of cross-resource queries the duplication of data is not required anymore as queries can be sent to both (or even more) entities at the same time in real time.

Use Change Tracking to monitor file deployment

·524 words·3 mins
Photo by Ilya Pavlov on Unsplash Change Tracking is a versatile feature that allows to monitor changes on a system (both Windows and Linux). Change tracking covers software installation, changes to services, daemons, Registry and the file system. This is available for both cloud based (Azure, AWS, GCP), on-premises and service provider hosted systems (given network connectivity to Azure).