Skip to content

Commit 3a7e2fd

Browse files
author
Richard Rundle
authored
Update Microsoft.Azure.Commands.Insights.dll-Help.xml
Include an example of sending logs and metrics to a Log Analytics workspace. Describe that the WorkspaceId parameter needs to be the ResourceId of the Log Analytics workspace.
1 parent dbff226 commit 3a7e2fd

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/ResourceManager/Insights/Commands.Insights/Microsoft.Azure.Commands.Insights.dll-Help.xml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7047,7 +7047,7 @@ $rule2 = New-AzureRmAutoscaleRule -MetricName Requests -MetricResourceId "/
70477047
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
70487048
<maml:name>WorkspaceId</maml:name>
70497049
<maml:description>
7050-
<maml:para>The Id of the workspace</maml:para>
7050+
<maml:para>The resource Id of the Log Analytics workspace to send logs/metrics to.</maml:para>
70517051
</maml:description>
70527052
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
70537053
</command:parameter>
@@ -7162,7 +7162,7 @@ $rule2 = New-AzureRmAutoscaleRule -MetricName Requests -MetricResourceId &quot;/
71627162
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
71637163
<maml:name>WorkspaceId</maml:name>
71647164
<maml:description>
7165-
<maml:para>The Id of the workspace</maml:para>
7165+
<maml:para>The resource Id of the Log Analytics workspace to send logs/metrics to.</maml:para>
71667166
</maml:description>
71677167
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
71687168
<dev:type>
@@ -7323,6 +7323,26 @@ $rule2 = New-AzureRmAutoscaleRule -MetricName Requests -MetricResourceId &quot;/
73237323
</command:commandLine>
73247324
</command:commandLines>
73257325
</command:example>
7326+
<command:example>
7327+
<maml:title>-------------------------- Enabling logs and metrics to go to a Log Analytics workspace --------------------------</maml:title>
7328+
<maml:introduction>
7329+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
7330+
</maml:introduction>
7331+
<dev:code>Set-AzureRmDiagnosticSetting -ResourceId &lt;resourceId&gt; --WorkspaceId $workspaceResourceId -Enable $true</dev:code>
7332+
<dev:remarks>
7333+
<maml:para>This will enable all logs and metrics for the resource to be sent to a Log Analytics workspace. You can get the resource Id for a workspace using (Get-AzureRmOperationalInsightsWorkspace).ResourceId .</maml:para>
7334+
<maml:para />
7335+
<maml:para />
7336+
<maml:para></maml:para>
7337+
</dev:remarks>
7338+
<command:commandLines>
7339+
<command:commandLine>
7340+
<command:commandText>
7341+
<maml:para />
7342+
</command:commandText>
7343+
</command:commandLine>
7344+
</command:commandLines>
7345+
</command:example>
73267346
</command:examples>
73277347
<maml:relatedLinks>
73287348
<maml:navigationLink>
@@ -7331,4 +7351,4 @@ $rule2 = New-AzureRmAutoscaleRule -MetricName Requests -MetricResourceId &quot;/
73317351
</maml:navigationLink>
73327352
</maml:relatedLinks>
73337353
</command:command>
7334-
</helpItems>
7354+
</helpItems>

0 commit comments

Comments
 (0)