To configure a Log Analytics Workspace Connected Source in Azure, you can follow these steps:
Using Azure Portal:
- Navigate to your Log Analytics Workspace in the Azure portal.
- Click on “Connected Sources” under the “Settings” section on the left-hand side menu.
- Click on the “Add” button to add a new connected source.
- Select the type of connected source you want to add from the list of available options (e.g., Virtual Machines, Azure services, Custom logs, etc.).
- Follow the prompts to configure the connected source, which may include providing credentials, selecting log types, and setting up filters.
Using Azure PowerShell:
- Open Azure PowerShell and log in to your Azure account using the
Connect-AzAccountcmdlet. - Use the
Set-AzOperationalInsightsWorkspacecmdlet to set the Log Analytics Workspace you want to configure as the current context. - Use the
Add-AzOperationalInsightsDataSourcecmdlet to add a new connected source. For example, to add a virtual machine connected source, you can use the following command:
Add-AzOperationalInsightsDataSource -WorkspaceName "myWorkspace" -ResourceGroupName "myResourceGroup" -Kind "WindowsEvent" -ComputerName "myVM"
This command adds the Windows Event Log data source for a virtual machine named “myVM” to the Log Analytics Workspace named “myWorkspace” in the resource group named “myResourceGroup”.
Note: The specific parameters and syntax required may vary depending on the type of connected source you are configuring. You can find more information on the required parameters and syntax in the Azure PowerShell documentation.
