Home > Back-end >  incorrect workspace key while installing Log Analytics Agent in Linux machine
incorrect workspace key while installing Log Analytics Agent in Linux machine

Time:04-03

I got this issue when deploying Log Analytics Agent in Linux machine on Azure cloud.

Enable failed with exit code 53 Installation failed due to incorrect workspace key. Please check if the workspace key is correct. For details, check logs in /var/log/azure/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux/extension.log

I used terraform script.

resource "azurerm_virtual_machine_extension" "log_analytic_agent" {
  name                       = "Log-Analytic-Agent-Extension"
  virtual_machine_id         =  module.machine.vm_id

  publisher                     = "Microsoft.EnterpriseCloud.Monitoring"
  type                          = "OmsAgentForLinux"
  type_handler_version          = "1.6"
  auto_upgrade_minor_version    = true


  settings = <<SETTINGS
    {
      "workspaceId" : "1323232323232323"
    }
  SETTINGS

  protected_settings = <<PROTECTED_SETTINGS
    {
      "workspaceKey" : "dsdsdsfd434fdvdghtcDW#efggrgrffefef"
    }
  PROTECTED_SETTINGS


}

CodePudding user response:

I just figured out, the reason why it got error above.

For installing log analytics agent in linux machine ,we should enble access Outbound from machine to these :

*.ods.opinsights.azure.com  Port 443    Outbound    
*.oms.opinsights.azure.com  Port 443    Outbound
*.blob.core.windows.net     Port 443    Outbound
*.azure-automation.net      Port 443    Outbound
  • Related