SOLVED

Adding OMS agent to VM via ARM Template and using proxy settings

%3CLINGO-SUB%20id%3D%22lingo-sub-181612%22%20slang%3D%22en-US%22%3EAdding%20OMS%20agent%20to%20VM%20via%20ARM%20Template%20and%20using%20proxy%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-181612%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20trying%20to%20deploy%20the%20OMS%20agent%20on%20windows%20server%2C%20using%20an%20ARM%20Template%20and%20setting%20the%20proxy%20settings%20in%20the%20template%20as%20well.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20can%20install%20the%20agent%20as%20extension%20using%20the%20following%20resource%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22type%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22Microsoft.Compute%2FvirtualMachines%2Fextensions%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22name%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%5Bconcat(parameters('vmName')%2C'%2F'%2C'MMAAgent')%5D%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22apiVersion%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%222015-05-01-preview%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22location%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%5BresourceGroup().location%5D%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22properties%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22publisher%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22Microsoft.EnterpriseCloud.Monitoring%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22type%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22MicrosoftMonitoringAgent%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22typeHandlerVersion%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%221.0%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22autoUpgradeMinorVersion%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3Etrue%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22settings%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22workspaceId%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%5Breference(resourceId(parameters('OMSResourceGroupName')%2C'Microsoft.OperationalInsights%2Fworkspaces%2F'%2C%20parameters('workspaceName'))%2C%20'2015-03-20').customerId%5D%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22protectedSettings%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22workspaceKey%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%5BlistKeys(resourceId(parameters('OMSResourceGroupName')%2C'Microsoft.OperationalInsights%2Fworkspaces%2F'%2C%20parameters('workspaceName'))%2C%20'2015-03-20').primarySharedKey%5D%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20is%20it%20possible%20to%20add%20the%20proxy%20settings%20to%20the%20template%20%3F%20i%20want%20to%20just%20add%20a%20proxy%20server%20in%20the%20settings%20of%20the%20monitoring%20agent%20panel%20with%26nbsp%3B%20no%20username%20or%20password%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edidnot%20find%20any%20working%20example%20for%20that.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-181612%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EVirtual%20Machine%20Extension%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-313613%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20OMS%20agent%20to%20VM%20via%20ARM%20Template%20and%20using%20proxy%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-313613%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20send%20credentials%20to%20the%20proxy%20server%20using%20this%20method%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-182004%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20OMS%20agent%20to%20VM%20via%20ARM%20Template%20and%20using%20proxy%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-182004%22%20slang%3D%22en-US%22%3Eyes%20that%20worked%20perfectly%2C%3CBR%20%2F%3EThanks%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-181977%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20OMS%20agent%20to%20VM%20via%20ARM%20Template%20and%20using%20proxy%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-181977%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3ECan%20you%20try%20by%20adding%20proxyUri%20to%20the%20settings.%20I%20think%20that%20should%20work.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%7B%0A%22type%22%3A%20%22Microsoft.Compute%2FvirtualMachines%2Fextensions%22%2C%0A%22name%22%3A%20%22%5Bconcat(parameters('vmName')%2C'%2F'%2C'MMAAgent')%5D%22%2C%0A%22apiVersion%22%3A%20%222015-05-01-preview%22%2C%0A%22location%22%3A%20%22%5BresourceGroup().location%5D%22%2C%0A%22properties%22%3A%20%7B%0A%22publisher%22%3A%20%22Microsoft.EnterpriseCloud.Monitoring%22%2C%0A%22type%22%3A%20%22MicrosoftMonitoringAgent%22%2C%0A%22typeHandlerVersion%22%3A%20%221.0%22%2C%0A%22autoUpgradeMinorVersion%22%3A%20true%2C%0A%22settings%22%3A%20%7B%0A%22workspaceId%22%3A%20%22%5Breference(resourceId(parameters('OMSResourceGroupName')%2C'Microsoft.OperationalInsights%2Fworkspaces%2F'%2C%20parameters('workspaceName'))%2C%20'2015-03-20').customerId%5D%22%2C%0A%22proxyUri%22%3A%20%22%5Bparameters('ProxyUri')%5D%22%0A%7D%2C%0A%22protectedSettings%22%3A%20%7B%0A%22workspaceKey%22%3A%20%22%5BlistKeys(resourceId(parameters('OMSResourceGroupName')%2C'Microsoft.OperationalInsights%2Fworkspaces%2F'%2C%20parameters('workspaceName'))%2C%20'2015-03-20').primarySharedKey%5D%22%0A%7D%0A%7D%0A%7D%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi all,

 

I trying to deploy the OMS agent on windows server, using an ARM Template and setting the proxy settings in the template as well. 

 

i can install the agent as extension using the following resource

 

{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('vmName'),'/','MMAAgent')]",
"apiVersion": "2015-05-01-preview",
"location": "[resourceGroup().location]",
"properties": {
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
"type": "MicrosoftMonitoringAgent",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true,
"settings": {
"workspaceId": "[reference(resourceId(parameters('OMSResourceGroupName'),'Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-03-20').customerId]"
},
"protectedSettings": {
"workspaceKey": "[listKeys(resourceId(parameters('OMSResourceGroupName'),'Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-03-20').primarySharedKey]"
}
}
}

 

but is it possible to add the proxy settings to the template ? i want to just add a proxy server in the settings of the monitoring agent panel with  no username or password? 

 

didnot find any working example for that. 

3 Replies
Highlighted
Solution

Hi,

Can you try by adding proxyUri to the settings. I think that should work.

 

 

{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('vmName'),'/','MMAAgent')]",
"apiVersion": "2015-05-01-preview",
"location": "[resourceGroup().location]",
"properties": {
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
"type": "MicrosoftMonitoringAgent",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true,
"settings": {
"workspaceId": "[reference(resourceId(parameters('OMSResourceGroupName'),'Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-03-20').customerId]",
"proxyUri": "[parameters('ProxyUri')]"
},
"protectedSettings": {
"workspaceKey": "[listKeys(resourceId(parameters('OMSResourceGroupName'),'Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-03-20').primarySharedKey]"
}
}
}
Highlighted
yes that worked perfectly,
Thanks
Highlighted

Hi there

 

Is there a way to send credentials to the proxy server using this method? 

 

Thank you!