Forum Discussion

Ahmed Atef's avatar
Ahmed Atef
Brass Contributor
Apr 11, 2018
Solved

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

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. 

  • 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]"
    }
    }
    }

3 Replies

  • 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]"
    }
    }
    }
    • awss-1979's avatar
      awss-1979
      Copper Contributor

      Hi there

       

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

       

      Thank you!

Resources