Monday, 13 January 2020

Installing and configuring the MMA agent via PowerShell




Pre-reqs to build out an install script/package
MMA agent executable

Workspace ID

Workspace Primary Key





Download MMA agent
Click on Windows Servers from Connected Sources to download Windows Agent

Click on Linux Servers from Connected Sources to download Linux Agent











Obtain WorkspaceID
From the Azure Portal (https://portal.azure.com)

Click on Log Analytics,

Click on Advanced Settings

My view defaulted to Connected Sources > Windows Servers



Save the workspace ID and workspace key to notepad/OneNote for later













Build out command line for setup file
(optionally to include in Application Deployment package)



Grab pre-reqs above: (saved from above to build the command line)

Exe/msi file

Workspace ID

Workspace key



The setup.exe or MSI command line parameters to pass are:

MMA-specific options Notes
NOAPM=1 Optional parameter. Installs the agent without .NET Application Performance Monitoring.
ADD_OPINSIGHTS_WORKSPACE 1 = Configure the agent to report to a workspace
OPINSIGHTS_WORKSPACE_ID Workspace Id (guid) for the workspace to add
OPINSIGHTS_WORKSPACE_KEY Workspace key used to initially authenticate with the workspace
OPINSIGHTS_WORKSPACE_AZURE_CLOUD_TYPE Specify the cloud environment where the workspace is located0 = Azure commercial cloud (default)1 = Azure Government
OPINSIGHTS_PROXY_URL URI for the proxy to use
OPINSIGHTS_PROXY_USERNAME Username to access an authenticated proxy
OPINSIGHTS_PROXY_PASSWORD Password to access an authenticated proxy
Example:

setup.exe /qn NOAPM=1 ADD_OPINSIGHTS_WORKSPACE=1 OPINSIGHTS_WORKSPACE_AZURE_CLOUD_TYPE=0 OPINSIGHTS_WORKSPACE_ID= OPINSIGHTS_WORKSPACE_KEY= AcceptEndUserLicenseAgreement=1







Other helpful links
Docs site https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-quick-collect-windows-computer

Daniel Orneling Blog https://blog.orneling.se/2017/01/installing-oms-agent-with-powershell/

TechNet gallery https://gallery.technet.microsoft.com/scriptcenter/Install-OMS-Agent-with-2c9c99ab

MMA Agent and SCOM Agent version numbers




This idea sprung from a discussion with Sr. PFE Brian Barrington, and it got me wondering...



FYI - If you're running a SCOM agent, 2016 or above, various Log Analytics solutions may have pre-reqs.



OMS Gateway requires Microsoft Monitoring Agent (agent version - 8.0.10900.0 or later)

Simple English, that means SCOM2016 RTM agent or above





As of 6 Sep 18, MMA agent = 8.0.11103.0

As of 17 Oct 18, MMA agent = 8.0.11136.0





SCOM Agent Version numbers

SCOM2016 RTM 8.0.10918.0
SCOM2016 UR1 8.0.10931.0
SCOM2016 UR2 8.0.10949.0
SCOM2016 UR3 8.0.10970.0
SCOM2016 UR4 8.0.10977.0
SCOM2016 UR5 8.0.10990.0
SCOM1801 8.0.13053.0
SCOM1807 8.0.13067.0



Verify what version is installed
Via SCOM - use Holman's Agent Version Addendum management pack





If you don't have SCOM

From PowerShell

$Agent = get-itemproperty -path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Setup"

$Agent.CurrentVersion















Resources

SCOM Agent Version Addendum pack https://blogs.technet.microsoft.com/kevinholman/2017/02/26/scom-agent-version-addendum-management-pack/

SCOM Agent build numbers https://social.technet.microsoft.com/wiki/contents/articles/34312.system-center-operation-manager-momscom-list-of-build-numbers.aspx

How to Access: Operations Manager Console SCOM 2016

1 How to Access: 1.1 Web Console The Operations Manager Web Console is located here: http://servername/OperationsManager From a browser....