Forum Discussion

GouravIN's avatar
GouravIN
Brass Contributor
Nov 17, 2018

How to install oms extension on Linux VMs using CLI

Hi There,

 

I want to install OMS extension on Linux VMs using Azure CLI and for this I am using below code. But not sure why there are two values with workspaceKey and omskey as well as workspaceId and omsid.

 

are they referring any two different key and IDs? 

 

az vm extension set \
--resource-group myResourceGroup \
--vm-name myVM \
--name OmsAgentForLinux \
--publisher Microsoft.EnterpriseCloud.Monitoring \
--version 1.7 --protected-settings '{"workspaceKey": "omskey"}' \
--settings '{"workspaceId": "omsid"}'

 

 

 

6 Replies

  • Try replacing omsid with the actual workspace ID and omskey with the primary or secondary key from the workspace. Both can be found in advanced settings in the workspace
    • GouravIN's avatar
      GouravIN
      Brass Contributor

      Hi Travis,

       

      I just missed : in the script, Now able to understand it properly. 

       

      But whenever i tried to execute this script i am getting "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" error on screen.

       

      Could you please help me to fix this. I have also attached screenshot for further reference : -

       

       

       

       

      • The only thing that I noticed is the examples in MS Docs only shows single quotes around protected-settings and settings.  Try removing them from the rest?

Resources