In Today’s Azure Nugget we discuss data collection in Operations Management Suite (OMS). So what is OMS? Microsoft’s OMS offering helps you gain control over your hybrid cloud environments. OMS allows you to manage and protect Azure or AWS (coming soon), Windows Server or Linux, VMware, or OpenStack with an all-in-one IT management solution. It features Log Analytics, IT Automation, Backup and Recovery, and Security and Compliance. There is a single portal for all your management tasks. You can be up and running in a few minutes and if you are utilizing Operations Manager on-prem you can easily attach your management groups or your entire Operations Manager server. There are a number of solutions to add out-of-the-box as well as a gallery to add more solutions. Some of the more common solutions include; Log search, automation, Azure site recovery, backup, change tracking, malware assessment, and system update assessment.
To get started with OMS today click here. OMS comes with a FREE tier to get you started. The free tier includes; 500MB per day with 7 days retention with Op Insights data, no Backup, first 31 days of each protected instance for Site Recovery, and 500 minutes per month for Automation. You can upgrade to Standard, Datacenter, or purchase separately with Standalone pricing.
OMS can collect data from either your on-prem servers or your servers in the cloud. This can be done by enabling Azure diagnostics on your Azure virtual machines and collecting the data from Azure storage. Another alternative is to use the Microsoft Monitoring Agent which provides even deeper insights. If you are using Operations Manager (2012 R2 or 2012 SP1 only) in your data center and have existing agents already deployed to your servers, OMS can utilize this agent to collect data. If not, you can directly connect servers by downloading the Windows or Linux OMS agent from the Settings pane in the OMS console to install on your servers. Some workloads require Run-As accounts to collect and send data to OMS. Those being SQL, VMM, Lync, and SharePoint. Click here for more info. Note: Support for OMS is available as of Operations Manager 2012 SP1 UR6 and Operations Manager 2012 R2 UR2. Proxy support was added in System Center Operations Manager 2012 SP1 UR7 and System Center Operations Manager 2012 R2 UR3.
Connect Operations Manager to OMS
Once you have performed the initial configuration of of OMS you can move to connect it to your on-prem instance of Operations Manager. As I have an existing Operations Manager instance running in my data center I can connect it to OMS using the SCOM connector.
1. Open the SCOM console and click on the Administration workspace.
2. Expand Operations Management Suite and click on Connection.
3. Click to Configure the Operations Management Suite. You will be asked to authenticate and select the previously configured OMS workspace.
4. After registration is complete, select Add a Computer/Group. You can search by Windows Computer and add instances to be managed.
5. Looking back in the OMS console you should see that your OM management group is connected and how many servers you are managing.
Install OMS agent for Directly Connected Servers Using Azure PowerShell (ARM)
Keep in mind that Op Insights (OMS) workspaces are not exposed in the Preview Portal (v2) as of yet. For servers that were deployed using Azure Resource Manager (ARM mode), you will need to use Azure PowerShell to install the agent so that Op Insights can see the VM in the portal and perform agent-based data collections. Note: If you are using the agent to collect log data, do not index the logs collected through Azure diagnostics or you could end up being charged twice.
1. Connect to your Azure subscription
Add-AzureAccount
2. Switch to Azure Resource Manager mode.
Switch-AzureMode -Name AzureResourceManager
3. Set variables for OMS workspace ID and Primary Key. You can obtain the ID and Key from the OMS portal in the Settings pane or use PowerShell. Enter parameters for resource group name and the OMS workspace.
$workspace = Get-AzureOperationalInsightsWorkspace -ResourceGroupName 'resource_group' -Name 'OMS_workspace' $workspaceId = $workspace.CustomerId.Guid
$Key = Get-AzureOperationalInsightsWorkspaceSharedKeys -ResourceGroupName 'resource_group' -Name 'OMS_workspace' $workspaceKey = $Key.PrimarySharedKey
4. Define the variables for the resource group name and resource that you want to install the extension on.
$resourceGroup = "resource_group" $resourceName = "TestVM1"
5. Get the VM and its location.
$vm = Get-AzureVM -ResourceGroupName $resourceGroup -Name $resourceName $location = $vm.Location
6. Install the extension (Microsoft Monitoring Agent) on the VM.
Set-AzureVMExtension -ResourceGroupName $resourceGroup -VMName $resourceName -Name 'MicrosoftMonitoringAgent' -Publisher 'Microsoft.EnterpriseCloud.Monitoring' -ExtensionType 'MicrosoftMonitoringAgent' -TypeHandlerVersion '1.0' -Location $location -SettingString "{'workspaceId': '$workspaceId'}" -ProtectedSettingString "{'workspaceKey': '$workspaceKey' }"
7. Installation succeeded.
8. You can get the details of the extension using this command or you can see them under the VM/Settings/Extensions from within the Preview Portal.
Get-AzureVMExtension -ResourceGroupName $resourceGroup -VMName $resourceName -Name 'MicrosoftMonitoringAgent'
9. Now back in the OMS portal in Settings, I can see that I have one server directly connected.
You can now see from within the OMS portal that I am monitoring 5 servers. Take note of all the data that you have at your fingertips within one pane of glass. Microsoft has done a great job with this tool to allow you to aggregate all of your important management data in one place. Check out the SQL Assessment solution, pretty cool. Stay tuned as we will dive into a few more of these exciting solutions, like Automation and ASR, in a future post.