Tag: Hybrid

Fixing Hybrid – IaaS with Azure Update Management and SCOM

Azure Update Management (AUM) is a free service that helps to deploy patches on servers running in Azure and On Premises (in your datacenter).  It provides basic capabilities, but enough to control the whole patch process.

AUM and OpsMgr

While evaluating AUM on a Windows Server 2019 hosted on Azure I noticed that either monitoring with SCOM or patching via AUM worked. – The mom agent, which needs to contact AUM and SCOM could only contact one destinations at the same time.

Within the Log Analytics workspace the following error was show:

“VM has reported a failure when processing extension ‘MicrosoftMonitoringAgent’. Error message:” This machine is already connected to another Log Analytics workspace, or managed by System Center Operations Manager. Please set stopOnMultipleConnections to false in public settings or remove this property, so this machine can connect to new workspaces.”

Required steps to fix in brief

To solve this issue for the VM proceed with the following steps.

  1. Gather this information: Workspace ID, Workspace Key, VM Name, Location and Resource Group Name
  2. Connect to Cloud Shell
  3. Run some PowerShell to set the stopOnMultipleConnections flag to false.
  4. Activate AUM or restart the SCOM agent if the management server was already entered.

Note: The Azure portal is using lots of JavaScript, HTML and other web technologies. I suggest using Microsoft’s Edge browser.

 

Steps in detail

Search for Log Analytics and click on Virtual Machines to find the problematic VM:

Locating correct Log Analytics Workspace

Choose Advanced Settings

Select Advanced Settings

On Connected sources, note the Workspace ID and the Primary Key (Workspace Key)

Note values for WorkSpaceID and WorkspaceKey ( Primary ID )

Start the Cloud shell and get virtual machine details as mentioned above.

Start Azure Cloud Shell and get VM details

Use a text editor (e.g. notepad++) and prepare use following code based on the values collected above.

Connect-AzAccount

$PublicSettings = @{"workspaceId" = "c94e5249-e224…";"stopOnMultipleConnections" = $false}
$ProtectedSettings =@{'workspaceKey' = 'FwxRLqbRg9/…'}

Set-AzVMExtension -ResourceGroupName "rsg-wegc-commontest-server" `
 -VMName "vm-WEGCXX0001" `
-Publisher Microsoft.EnterpriseCloud.Monitoring `
-ExtensionType MicrosoftMonitoringAgent  `
-TypeHandlerVersion 1.0 `
-Settings $PublicSettings `
-ProtectedSettings $ProtectedSettings `
-Location "West Europe" `
-Name MicrosoftMonitoringAgent

Copy the code into the clipboard and paste it into the Cloud Shell. Confirm with Return.

Copy the code into the clipboard and paste it into the Cloud Shell. Confirm with Return.

Verify that communication with SCOM and AUM works

Start a RDP session, open the control panel and launch the MoM Agent.

Verify MoM Agent - OperationsManager

Verify MoM Agent - Log Analytics

The configuration on the VM looks healthy now.

Within the SCOM Console the server is shown and as fully monitored
Verify VM in Operations Manager Console

Next steps

To ensure that these steps are performed automatically on server creation it make sense to add those steps to an ARM template.

A good starting point provide this link: http://www.allaboutwindowssl.com/2019/12/enable-update-management-for-azure-vm-arm-template-powershell/ by @KasunSJC

Hybrid Monitoring Solutions during your transition to Cloud

Most enterprises now have either moved to cloud, or are moving towards it. And why not? Running your workloads on cloud services such as Azure frees you up from a lot of maintenance and administrative overheads, and you can use this time to do something better.

Here are some major benefits to moving to cloud:

  1. Less administration tasks – The cloud providers are responsible for managing and upgrading their infrastructure and so the customer does not have to worry about that.
  2. Cloud is flexible – It can adjust to the rapid growth or the fluctuations in business and adopt to that to provide you the optimized resources and hence managing costs.
  3. Cost efficient – Since you don’t have to spend on the big hardware and the maintenance that comes along with it, you can save that initial capital investment. Moreover, on cloud you mostly only pay for what you use and for the time you use it, it saves a lot of cost there as well.
  4. Disaster Recovery – Not every company, especially smaller sized, can invest into a Disaster Recovery strategy. On premise, it’s basically like running two datacenters and so double the cost. Moving to cloud eliminates that since the cloud provider is responsible to provide resiliency on their side to make sure your servers are up and running even if there is any hardware failure.

These are just some of the major benefits transitioning to cloud provides, there are many more. So if you’ve made a decision to move to the cloud – you’re looking at the right direction!

Now, on premise or on cloud – monitoring your infrastructure is equally critical. While the cloud provider will look after the hardware components, monitoring your servers and applications is still your responsibility, and something that you need to invest the time, money and efforts into. There are some great tools out there in the market to let you effectively monitor your infrastructure, like Microsoft’s System Center Operations Manager (SCOM), and Azure Monitor, which is a monitoring solution residing in Azure. So which one should you use to monitor your infrastructure?

Since you are transitioning to cloud (say Azure), you already have an on premise infrastructure. That most likely means you also already have made an investment in a tool like SCOM for monitoring it. So now you’re wondering, “So…does moving to Azure mean I have to decommission my SCOM now and move my monitoring to Azure Monitor?”

The good news is – you don’t have to choose between SCOM and Azure Monitor at all! (click to read more). They work the best together in a hybrid environment and complement each other very well.

SCOM is generally considered better in monitoring on premise workloads and has been used for it since a very long time. SCOM provides deep insights and a very thorough leveled monitoring of the workloads you want to monitor. It is also very easy to monitor your custom applications by authoring your own management packs. In short, it gives you a more detailed look into your infrastructure and alerts you based on it.

Azure Monitor on the other hand suits the best for Azure resources. Since it does not require installation, it is up and running in a matter of minutes. It also does not require you to worry about maintaining it, upgrading it or troubleshooting it. It is highly scalable, which means you can start on-boarding your servers immediately without worrying about the underlying infrastructure sizing capacity. However the biggest highlight of using Azure Monitor is probably its ability to query the data. Once the agent collects the data you can query it and get very granular. It is a very efficient way to make sure you’re only dealing with the data you want, and are only alerted for what you’re concerned with.

SCOM integrates seamlessly with Azure Monitor and can upload all the data it is collecting on premise to Azure Monitor where it can be queried. There are some great advantages of integrating SCOM with Azure Monitor, for example:

  1. You’re now getting more useful data rather than spam. Azure Monitor’s querying capability plays an important role here. You collect the data from Azure resources as well as on premise servers, and only extracting the data you need for alerting meaningful to you.
  2. Azure Monitor provides a single pane of glass for alerts and ways to manage them across your infrastructure, so it reduces the administrative overhead considerably.
  3. With all the data going into Azure Monitor, you can actually shut off a lot of workloads you don’t need from SCOM which means better performance with less resources used!
  4. SCOM monitors what it monitors the best – on premise infrastructure while Azure Monitor Monitors what it monitors the best – Cloud resources.
  5. You can reduce the dependency on only one monitoring solution, and run these two in parallel for resiliency.
  6. You can leverage PowerBI to visualize the data
  7. With release of SCOM 2019, with all its new capabilities and better visibility into cloud resources, this integration has become even better!
  8. It is much more cost-effective considering the returns it provides in value in a long run.

Hope this helps you plan your transition to cloud while maintaining the monitoring it all!

(Featured image credits to Microsoft!)

Cheers

SCOM 2019 vs Azure Monitor: Which one to choose?

Having worked with both SCOM and Azure Monitor, recently I was asked to compare them both and suggest the right choice. First off, I have a disclaimer to make – Azure Monitor is great, but it can not replace SCOM entirely, not just yet.

SCOM 2019 was recently released and it came loaded with some great new features. Read more about it here. What I especially like is the new capabilities of it to monitor Azure resources. It now has insights more than ever before into the cloud. And with the ever rising numbers of cloud migrations or new cloud deployments, Azure Monitor’s popularity and importance keeps getting higher.

However, I believe these two tools have their own “personality” if you will, and work the best with each other. Here’s what I have to say about this in more details:

Defining Your Enterprise Monitoring Strategy: Close the Gaps with SCOM 2019 and Azure Monitor

Cheers!