Log Analytics-VM-Erweiterung für WindowsLog Analytics virtual machine extension for Windows
Azure Monitor-Protokolle bieten Überwachungsfunktionen für cloudbasierte und lokale Ressourcen.Azure Monitor Logs provides monitoring capabilities across cloud and on-premises assets. Die Log Analytics-Agent-VM-Erweiterung für Windows wird von Microsoft veröffentlicht und unterstützt.The Log Analytics agent virtual machine extension for Windows is published and supported by Microsoft. Die Erweiterung installiert den Log Analytics-Agent auf virtuellen Azure-Computern und registriert virtuelle Computer in einem vorhandenen Log Analytics-Arbeitsbereich.The extension installs the Log Analytics agent on Azure virtual machines, and enrolls virtual machines into an existing Log Analytics workspace. Dieses Dokument enthält ausführliche Informationen zu den unterstützten Plattformen, Konfigurationen und Bereitstellungsoptionen für die Log Analytics-VM-Erweiterung für Windows.This document details the supported platforms, configurations, and deployment options for the Log Analytics virtual machine extension for Windows.
VoraussetzungenPrerequisites
BetriebssystemOperating system
Ausführliche Informationen zu den unterstützten Windows-Betriebssystemen finden Sie im Artikel Übersicht über Azure Monitor-Agents.For details about the supported Windows operating systems, refer to the Overview of Azure Monitor agents article.
Version des Agents und der VM-ErweiterungAgent and VM Extension version
Die folgende Tabelle enthält eine Zuordnung der Version der Log Analytics-VM-Erweiterung für Windows und des Log Analytics-Agent-Pakets für jedes Release.The following table provides a mapping of the version of the Windows Log Analytics VM extension and Log Analytics agent bundle for each release.
Log Analytics-Agent-Paketversion für WindowsLog Analytics Windows agent bundle version | Version der Log Analytics-VM-Erweiterung für WindowsLog Analytics Windows VM extension version | VeröffentlichungsdatumRelease Date | VersionsinformationenRelease Notes |
---|---|---|---|
10.20.1805310.20.18053 | 1.0.18053.01.0.18053.0 | Oktober 2020October 2020 |
|
10.20.1804010.20.18040 | 1.0.18040.21.0.18040.2 | August 2020August 2020 |
|
10.20.1803810.20.18038 | 1.0.180381.0.18038 | April 2020April 2020 |
|
10.20.1802910.20.18029 | 1.0.180291.0.18029 | März 2020March 2020 |
|
10.20.1801810.20.18018 | 1.0.180181.0.18018 | Oktober 2019October 2019 |
|
10.20.1801110.20.18011 | 1.0.180111.0.18011 | Juli 2019July 2019 |
|
10.20.1800110.20.18001 | 1.0.180011.0.18001 | Juni 2019June 2019 |
|
10.19.1351510.19.13515 | 1.0.135151.0.13515 | März 2019March 2019 |
|
10.19.1000610.19.10006 | –n/a | Dezember 2018Dec 2018 |
|
8.0.111368.0.11136 | –n/a | September 2018Sept 2018 |
|
8.0.111038.0.11103 | –n/a | April 2018April 2018 | |
8.0.110818.0.11081 | 1.0.110811.0.11081 | November 2017Nov 2017 | |
8.0.110728.0.11072 | 1.0.110721.0.11072 | September 2017Sept 2017 | |
8.0.110498.0.11049 | 1.0.110491.0.11049 | Februar 2017Feb 2017 |
Azure Security CenterAzure Security Center
Azure Security Center stellt den Log Analytics-Agent automatisch bereit und verbindet ihn mit dem Standardarbeitsbereich von Log Analytics für das Azure-Abonnement.Azure Security Center automatically provisions the Log Analytics agent and connects it with the default Log Analytics workspace of the Azure subscription. Wenn Sie Azure Security Center verwenden, führen Sie nicht die Schritte in diesem Dokument aus.If you are using Azure Security Center, do not run through the steps in this document. Andernfalls überschreiben Sie den konfigurierten Arbeitsbereich und unterbrechen die Verbindung mit Azure Security Center.Doing so overwrites the configured workspace and break the connection with Azure Security Center.
InternetkonnektivitätInternet connectivity
Um die Log Analytics-Agent-Erweiterung für Windows verwenden zu können, muss der virtuelle Zielcomputer mit dem Internet verbunden sein.The Log Analytics agent extension for Windows requires that the target virtual machine is connected to the internet.
ErweiterungsschemaExtension schema
Der folgende JSON-Code zeigt das Schema für die Log Analytics-Agent-Erweiterung.The following JSON shows the schema for the Log Analytics agent extension. Für die Erweiterung werden die Arbeitsbereichs-ID und der Arbeitsbereichsschlüssel aus dem Log Analytics-Zielarbeitsbereich benötigt.The extension requires the workspace ID and workspace key from the target Log Analytics workspace. Diese sind in den Einstellungen des Arbeitsbereichs im Azure-Portal zu finden.These can be found in the settings for the workspace in the Azure portal. Da der Arbeitsbereichsschlüssel als vertrauliche Information behandelt werden muss, sollte er in einer geschützten Einstellungskonfiguration gespeichert werden.Because the workspace key should be treated as sensitive data, it should be stored in a protected setting configuration. Die geschützten Einstellungsdaten der Azure-VM-Erweiterung werden verschlüsselt und nur auf dem virtuellen Zielcomputer entschlüsselt.Azure VM extension protected setting data is encrypted, and only decrypted on the target virtual machine. Bitte beachten Sie, dass bei workspaceId und workspaceKey die Groß-/Kleinschreibung beachtet wird.Note that workspaceId and workspaceKey are case-sensitive.
{
"type": "extensions",
"name": "OMSExtension",
"apiVersion": "[variables('apiVersion')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
"properties": {
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
"type": "MicrosoftMonitoringAgent",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true,
"settings": {
"workspaceId": "myWorkSpaceId"
},
"protectedSettings": {
"workspaceKey": "myWorkspaceKey"
}
}
}
EigenschaftswerteProperty values
NameName | Wert/BeispielValue / Example |
---|---|
apiVersionapiVersion | 2015-06-152015-06-15 |
publisherpublisher | Microsoft.EnterpriseCloud.MonitoringMicrosoft.EnterpriseCloud.Monitoring |
typetype | MicrosoftMonitoringAgentMicrosoftMonitoringAgent |
typeHandlerVersiontypeHandlerVersion | 1.01.0 |
workspaceId (z.B.)*workspaceId (e.g)* | 6f680a37-00c6-41c7-a93f-1437e34625746f680a37-00c6-41c7-a93f-1437e3462574 |
workspaceKey (z.B.)workspaceKey (e.g) | z4bU3p1/GrnWpQkky4gdabWXAhbWSTz70hm4m2Xt92XI+rSRgE8qVvRhsGo9TXffbrTahyrwv35W0pOqQAU7uQ==z4bU3p1/GrnWpQkky4gdabWXAhbWSTz70hm4m2Xt92XI+rSRgE8qVvRhsGo9TXffbrTahyrwv35W0pOqQAU7uQ== |
* In der Log Analytics-API heißt die „workspaceId“ „consumerId“.* The workspaceId is called the consumerId in the Log Analytics API.
Hinweis
Informationen zu weiteren Eigenschaften finden Sie unter Verbinden von Windows-Computern mit Azure Monitor.For additional properties see Azure Connect Windows Computers to Azure Monitor.
Bereitstellung von VorlagenTemplate deployment
Azure-VM-Erweiterungen können mithilfe von Azure Resource Manager-Vorlagen bereitgestellt werden.Azure VM extensions can be deployed with Azure Resource Manager templates. Das im vorherigen Abschnitt erläuterte JSON-Schema kann in einer Azure Resource Manager-Vorlage zum Ausführen der Log Analytics-Agent-Erweiterung im Rahmen einer Azure Resource Manager-Bereitstellung verwendet werden.The JSON schema detailed in the previous section can be used in an Azure Resource Manager template to run the Log Analytics agent extension during an Azure Resource Manager template deployment. Eine Beispielvorlage mit der Log Analytics-Agent-VM-Erweiterung finden Sie im Azure-Schnellstartkatalog.A sample template that includes the Log Analytics agent VM extension can be found on the Azure Quickstart Gallery.
Hinweis
Die Vorlage unterstützt nicht die Angabe mehrerer Arbeitsbereichs-IDs und Arbeitsbereichsschlüssel, wenn Sie den Agent zum Berichten an mehrere Arbeitsbereiche konfigurieren möchten.The template does not support specifying more than one workspace ID and workspace key when you want to configure the agent to report to multiple workspaces. Informationen zum Konfigurieren des Agents zum Berichten an mehrere Arbeitsbereiche finden Sie unter Hinzufügen oder Entfernen von Arbeitsbereichen.To configure the agent to report to multiple workspaces, see Adding or removing a workspace.
Der JSON-Code für eine Erweiterung des virtuellen Computers kann innerhalb der VM-Ressource geschachtelt oder im Stamm bzw. auf der obersten Ebene einer Resource Manager-JSON-Vorlage platziert werden.The JSON for a virtual machine extension can be nested inside the virtual machine resource, or placed at the root or top level of a Resource Manager JSON template. Die Platzierung des JSON-Codes wirkt sich auf den Wert von Name und Typ der Ressource aus.The placement of the JSON affects the value of the resource name and type. Weitere Informationen finden Sie unter Set name and type for child resources (Festlegen von Name und Typ für untergeordnete Ressourcen).For more information, see Set name and type for child resources.
Im folgenden Beispiel wird davon ausgegangen, dass die Log Analytics-Erweiterung in der VM-Ressource geschachtelt ist.The following example assumes the Log Analytics extension is nested inside the virtual machine resource. Beim Schachteln der Ressource für die Erweiterung wird der JSON-Code im "resources": []
-Objekt des virtuellen Computers platziert.When nesting the extension resource, the JSON is placed in the "resources": []
object of the virtual machine.
{
"type": "extensions",
"name": "OMSExtension",
"apiVersion": "[variables('apiVersion')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
"properties": {
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
"type": "MicrosoftMonitoringAgent",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true,
"settings": {
"workspaceId": "myWorkSpaceId"
},
"protectedSettings": {
"workspaceKey": "myWorkspaceKey"
}
}
}
Beim Platzieren des JSON-Codes für die Erweiterung im Stamm der Vorlage enthält der Name der Ressource einen Verweis auf die übergeordnete VM, und der Typ spiegelt die geschachtelte Konfiguration wider.When placing the extension JSON at the root of the template, the resource name includes a reference to the parent virtual machine, and the type reflects the nested configuration.
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "<parentVmResource>/OMSExtension",
"apiVersion": "[variables('apiVersion')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
"properties": {
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
"type": "MicrosoftMonitoringAgent",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true,
"settings": {
"workspaceId": "myWorkSpaceId"
},
"protectedSettings": {
"workspaceKey": "myWorkspaceKey"
}
}
}
PowerShell-BereitstellungPowerShell deployment
Mit dem Befehl Set-AzVMExtension
können Sie die Log Analytics-Agent-VM-Erweiterung auf einem vorhandenen virtuellen Computer bereitstellen.The Set-AzVMExtension
command can be used to deploy the Log Analytics agent virtual machine extension to an existing virtual machine. Vor dem Ausführen des Befehls müssen die öffentliche und die private Konfiguration in einer PowerShell-Hashtabelle gespeichert werden.Before running the command, the public and private configurations need to be stored in a PowerShell hash table.
$PublicSettings = @{"workspaceId" = "myWorkspaceId"}
$ProtectedSettings = @{"workspaceKey" = "myWorkspaceKey"}
Set-AzVMExtension -ExtensionName "MicrosoftMonitoringAgent" `
-ResourceGroupName "myResourceGroup" `
-VMName "myVM" `
-Publisher "Microsoft.EnterpriseCloud.Monitoring" `
-ExtensionType "MicrosoftMonitoringAgent" `
-TypeHandlerVersion 1.0 `
-Settings $PublicSettings `
-ProtectedSettings $ProtectedSettings `
-Location WestUS
Problembehandlung und SupportTroubleshoot and support
ProblembehandlungTroubleshoot
Daten zum Status von Erweiterungsbereitstellungen können über das Azure-Portal und mithilfe des Azure PowerShell-Moduls abgerufen werden.Data about the state of extension deployments can be retrieved from the Azure portal, and by using the Azure PowerShell module. Führen Sie über das Azure PowerShell-Modul den folgenden Befehl aus, um den Bereitstellungsstatus von Erweiterungen für einen bestimmten virtuellen Computer anzuzeigen.To see the deployment state of extensions for a given VM, run the following command using the Azure PowerShell module.
Get-AzVMExtension -ResourceGroupName myResourceGroup -VMName myVM -Name myExtensionName
Die Ausgabe der Erweiterungsausführung wird in Dateien im folgenden Verzeichnis protokolliert:Extension execution output is logged to files found in the following directory:
C:\WindowsAzure\Logs\Plugins\Microsoft.EnterpriseCloud.Monitoring.MicrosoftMonitoringAgent\
SupportSupport
Sollten Sie beim Lesen dieses Artikels feststellen, dass Sie weitere Hilfe benötigen, können Sie sich über das MSDN Azure-Forum oder über das Stack Overflow-Forum mit Azure-Experten in Verbindung setzen.If you need more help at any point in this article, you can contact the Azure experts on the MSDN Azure and Stack Overflow forums. Alternativ dazu haben Sie die Möglichkeit, einen Azure-Supportfall zu erstellen.Alternatively, you can file an Azure support incident. Rufen Sie die Azure-Support-Website auf, und wählen Sie „Support erhalten“ aus.Go to the Azure support site and select Get support. Informationen zur Nutzung von Azure-Support finden Sie unter Microsoft Azure-Support-FAQ.For information about using Azure Support, read the Microsoft Azure support FAQ.