Skip to content

Commit 839c772

Browse files
authored
Merge pull request #48594 from DCtheGeek/dmc-automation-dsc-2
State Configuration changes
2 parents 7cd46e6 + d69e33d commit 839c772

13 files changed

+874
-590
lines changed

articles/automation/TOC.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,21 @@
131131
href: automation-linux-hrw-install.md
132132
- name: Run runbooks on a Hybrid Runbook Worker
133133
href: automation-hrw-run-runbooks.md
134-
- name: Deploy configuration management (DSC)
134+
- name: State Configuration
135135
items:
136-
- name: Desired State Configuration (DSC) overview
136+
- name: State Configuration overview
137137
href: automation-dsc-overview.md
138138
- name: Getting started
139139
href: automation-dsc-getting-started.md
140-
- name: Configure servers to a desired state and manage drift with Azure Automation
140+
- name: Configure servers to a desired state and manage drift with State Configuration
141141
href: tutorial-configure-servers-desired-state.md
142142
- name: Onboarding machines for management
143143
href: automation-dsc-onboarding.md
144144
- name: Compiling DSC configurations
145145
href: automation-dsc-compile.md
146146
- name: Continuous deployment using Chocolatey
147147
href: automation-dsc-cd-chocolatey.md
148-
- name: Forward Azure Automation DSC reporting data to OMS Log Analytics
148+
- name: Forward State Configuration reporting data to Log Analytics
149149
href: automation-dsc-diagnostics.md
150150
- name: Manage shared resources
151151
items:

articles/automation/automation-dsc-cd-chocolatey.md

Lines changed: 239 additions & 112 deletions
Large diffs are not rendered by default.

articles/automation/automation-dsc-compile.md

Lines changed: 153 additions & 108 deletions
Large diffs are not rendered by default.

articles/automation/automation-dsc-diagnostics.md

Lines changed: 60 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
---
2-
title: Forward Azure Automation DSC reporting data to Log Analytics
3-
description: This article demonstrates how to send Desired State Configuration (DSC) reporting data to Log Analytics to deliver additional insight and management.
2+
title: Forward Azure Automation State Configuration reporting data to Log Analytics
3+
description: This article demonstrates how to send Desired State Configuration (DSC) reporting data from Azure Automation State Configuration to Log Analytics to deliver additional insight and management.
44
services: automation
55
ms.service: automation
66
ms.component: dsc
7-
author: georgewallace
8-
ms.author: gwallace
9-
ms.date: 06/12/2018
7+
author: DCtheGeek
8+
ms.author: dacoulte
9+
ms.date: 08/08/2018
1010
ms.topic: conceptual
1111
manager: carmonm
1212
---
13-
# Forward Azure Automation DSC reporting data to Log Analytics
13+
# Forward Azure Automation State Configuration reporting data to Log Analytics
1414

15-
Automation can send DSC node status data to your Log Analytics workspace.
16-
Compliance status is visible in the Azure portal, or with PowerShell, for nodes and for individual DSC resources in node configurations.
17-
With Log Analytics you can:
15+
Azure Automation State Configuration can send Desired State Configuration (DSC) node status data to
16+
your Log Analytics workspace. Compliance status is visible in the Azure portal or with PowerShell,
17+
for nodes and for individual DSC resources in node configurations. With Log Analytics you can:
1818

19-
* Get compliance information for managed nodes and individual resources
20-
* Trigger an email or alert based on compliance status
21-
* Write advanced queries across your managed nodes
22-
* Correlate compliance status across Automation accounts
23-
* Visualize your node compliance history over time
19+
- Get compliance information for managed nodes and individual resources
20+
- Trigger an email or alert based on compliance status
21+
- Write advanced queries across your managed nodes
22+
- Correlate compliance status across Automation accounts
23+
- Visualize your node compliance history over time
2424

2525
## Prerequisites
2626

27-
To start sending your Automation DSC reports to Log Analytics, you need:
27+
To start sending your Automation State Configuration reports to Log Analytics, you need:
2828

29-
* The November 2016 or later release of [Azure PowerShell](/powershell/azure/overview) (v2.3.0).
30-
* An Azure Automation account. For more information, see [Getting Started with Azure Automation](automation-offering-get-started.md)
31-
* A Log Analytics workspace with an **Automation & Control** service offering. For more information, see [Get started with Log Analytics](../log-analytics/log-analytics-get-started.md).
32-
* At least one Azure Automation DSC node. For more information, see [Onboarding machines for management by Azure Automation DSC](automation-dsc-onboarding.md)
29+
- The November 2016 or later release of [Azure PowerShell](/powershell/azure/overview) (v2.3.0).
30+
- An Azure Automation account. For more information, see [Getting Started with Azure Automation](automation-offering-get-started.md)
31+
- A Log Analytics workspace with an **Automation & Control** service offering. For more information, see [Get started with Log Analytics](../log-analytics/log-analytics-get-started.md).
32+
- At least one Azure Automation State Configuration node. For more information, see [Onboarding machines for management by Azure Automation State Configuration](automation-dsc-onboarding.md)
3333

3434
## Set up integration with Log Analytics
3535

@@ -41,61 +41,67 @@ To begin importing data from Azure Automation DSC into Log Analytics, complete t
4141

4242
```powershell
4343
# Find the ResourceId for the Automation Account
44-
Find-AzureRmResource -ResourceType "Microsoft.Automation/automationAccounts"
44+
Find-AzureRmResource -ResourceType 'Microsoft.Automation/automationAccounts'
4545
```
46+
4647
1. Get the _ResourceId_ of your Log Analytics workspace by running the following PowerShell command:
4748
(if you have more than one workspace, choose the _ResourceID_ for the workspace you want to configure).
4849

4950
```powershell
5051
# Find the ResourceId for the Log Analytics workspace
51-
Find-AzureRmResource -ResourceType "Microsoft.OperationalInsights/workspaces"
52+
Find-AzureRmResource -ResourceType 'Microsoft.OperationalInsights/workspaces'
5253
```
54+
5355
1. Run the following PowerShell command, replacing `<AutomationResourceId>` and `<WorkspaceResourceId>` with the _ResourceId_ values from each of the previous steps:
5456

5557
```powershell
56-
Set-AzureRmDiagnosticSetting -ResourceId <AutomationResourceId> -WorkspaceId <WorkspaceResourceId> -Enabled $true -Categories "DscNodeStatus"
58+
Set-AzureRmDiagnosticSetting -ResourceId <AutomationResourceId> -WorkspaceId <WorkspaceResourceId> -Enabled $true -Categories 'DscNodeStatus'
5759
```
5860

59-
If you want to stop importing data from Azure Automation DSC into Log Analytics, run the following PowerShell command.
61+
If you want to stop importing data from Azure Automation State Configuration into Log Analytics, run the following PowerShell command:
6062

6163
```powershell
62-
Set-AzureRmDiagnosticSetting -ResourceId <AutomationResourceId> -WorkspaceId <WorkspaceResourceId> -Enabled $false -Categories "DscNodeStatus"
64+
Set-AzureRmDiagnosticSetting -ResourceId <AutomationResourceId> -WorkspaceId <WorkspaceResourceId> -Enabled $false -Categories 'DscNodeStatus'
6365
```
6466

65-
## View the DSC logs
67+
## View the State Configuration logs
6668

67-
After you set up integration with Log Analytics for your Automation DSC data, a **Log search** button will appear on
68-
the **DSC Nodes** blade of your automation account. Click the **Log Search** button to view the logs for DSC node data.
69+
After you set up integration with Log Analytics for your Automation State Configuration data, a
70+
**Log search** button will appear on the **DSC Nodes** blade of your automation account. Click the
71+
**Log Search** button to view the logs for DSC node data.
6972

7073
![Log search button](media/automation-dsc-diagnostics/log-search-button.png)
7174

72-
The **Log Search** blade opens, and you see a **DscNodeStatusData** operation for each DSC node,
73-
and a **DscResourceStatusData** operation for each [DSC resource](https://msdn.microsoft.com/powershell/dsc/resources)
74-
called in the Node configuration applied to that node.
75+
The **Log Search** blade opens, and you see a **DscNodeStatusData** operation for each State
76+
Configuration node, and a **DscResourceStatusData** operation for each [DSC
77+
resource](/powershell/dsc/resources) called in the Node configuration applied to that node.
7578

7679
The **DscResourceStatusData** operation contains error information for any DSC resources that failed.
7780

7881
Click each operation in the list to see the data for that operation.
7982

8083
You can also view the logs by [searching in Log Analytics.
8184
See [Find data using log searches](../log-analytics/log-analytics-log-searches.md).
82-
Type the following query to find your DSC logs:
83-
`Type=AzureDiagnostics ResourceProvider="MICROSOFT.AUTOMATION" Category = "DscNodeStatus"`
85+
Type the following query to find your State Configuration logs:
86+
`Type=AzureDiagnostics ResourceProvider='MICROSOFT.AUTOMATION' Category='DscNodeStatus'`
8487

8588
You can also narrow the query by the operation name. For example:
86-
`Type=AzureDiagnostics ResourceProvider="MICROSOFT.AUTOMATION" Category = "DscNodeStatus" OperationName = "DscNodeStatusData"
89+
`Type=AzureDiagnostics ResourceProvider='MICROSOFT.AUTOMATION' Category='DscNodeStatus' OperationName='DscNodeStatusData'`
8790

88-
### Send an email when a DSC compliance check fails
91+
### Send an email when a State Configuration compliance check fails
8992

90-
One of our top customer requests is for the ability to send an email or a text when something goes wrong with a DSC configuration.
93+
One of our top customer requests is for the ability to send an email or a text when something goes
94+
wrong with a DSC configuration.
9195

92-
To create an alert rule, you start by creating a log search for the DSC report records that should invoke the alert. Click the **+ New Alert Rule** button to create and configure the alert rule.
96+
To create an alert rule, you start by creating a log search for the State Configuration report
97+
records that should invoke the alert. Click the **+ New Alert Rule** button to create and configure
98+
the alert rule.
9399

94100
1. From the Log Analytics Overview page, click **Log Search**.
95-
1. Create a log search query for your alert by typing the following search into the query field: `Type=AzureDiagnostics Category=DscNodeStatus NodeName_s=DSCTEST1 OperationName=DscNodeStatusData ResultType=Failed`
101+
1. Create a log search query for your alert by typing the following search into the query field: `Type=AzureDiagnostics Category='DscNodeStatus' NodeName_s='DSCTEST1' OperationName='DscNodeStatusData' ResultType='Failed'`
96102

97-
If you have set up logs from more than one Automation account or subscription to your workspace, you can group your alerts by subscription and Automation account.
98-
Automation account name can be derived from the Resource field in the search of DscNodeStatusData.
103+
If you have set up logs from more than one Automation account or subscription to your workspace, you can group your alerts by subscription and Automation account.
104+
Automation account name can be derived from the Resource field in the search of DscNodeStatusData.
99105
1. To open the **Create rule** screen, click **+ New Alert Rule** at the top of the page. For more information on the options to configure the alert, see [Create an alert rulelert](../monitoring-and-diagnostics/monitor-alerts-unified-usage.md).
100106

101107
### Find failed DSC resources across all nodes
@@ -104,7 +110,7 @@ One advantage of using Log Analytics is that you can search for failed checks ac
104110
To find all instances of DSC resources that failed.
105111

106112
1. From the Log Analytics Overview page, click **Log Search**.
107-
1. Create a log search query for your alert by typing the following search into the query field: `Type=AzureDiagnostics Category=DscNodeStatus OperationName=DscResourceStatusData ResultType=Failed`
113+
1. Create a log search query for your alert by typing the following search into the query field: `Type=AzureDiagnostics Category='DscNodeStatus' OperationName='DscResourceStatusData' ResultType='Failed'`
108114

109115
### View historical DSC node status
110116

@@ -183,16 +189,22 @@ Diagnostics from Azure Automation creates two categories of records in Log Analy
183189

184190
## Summary
185191

186-
By sending your Automation DSC data to Log Analytics, you can get better insight into the status of your Automation DSC nodes by:
192+
By sending your Automation State Configuration data to Log Analytics, you can get better insight
193+
into the status of your Automation State Configuration nodes by:
187194

188-
* Setting up alerts to notify you when there is an issue
189-
* Using custom views and search queries to visualize your runbook results, runbook job status, and other related key indicators or metrics.
195+
- Setting up alerts to notify you when there is an issue
196+
- Using custom views and search queries to visualize your runbook results, runbook job status, and other related key indicators or metrics.
190197

191-
Log Analytics provides greater operational visibility to your Automation DSC data and can help address incidents more quickly.
198+
Log Analytics provides greater operational visibility to your Automation State Configuration data
199+
and can help address incidents more quickly.
192200

193201
## Next steps
194202

195-
* To learn more about how to construct different search queries and review the Automation DSC logs with Log Analytics, see [Log searches in Log Analytics](../log-analytics/log-analytics-log-searches.md)
196-
* To learn more about using Azure Automation DSC, see [Getting started with Azure Automation DSC](automation-dsc-getting-started.md)
197-
* To learn more about Log Analytics and data collection sources, see [Collecting Azure storage data in Log Analytics overview](../log-analytics/log-analytics-azure-storage.md)
198-
203+
- For an overview, see [Azure Automation State Configuration](automation-dsc-overview.md)
204+
- To get started, see [Getting started with Azure Automation State Configuration](automation-dsc-getting-started.md)
205+
- To learn about compiling DSC configurations so that you can assign them to target nodes, see [Compiling configurations in Azure Automation State Configuration](automation-dsc-compile.md)
206+
- For PowerShell cmdlet reference, see [Azure Automation State Configuration cmdlets](/powershell/module/azurerm.automation/#automation)
207+
- For pricing information, see [Azure Automation State Configuration pricing](https://azure.microsoft.com/pricing/details/automation/)
208+
- To see an example of using Azure Automation State Configuration in a continuous deployment pipeline, see [Continuous Deployment Using Azure Automation State Configuration and Chocolatey](automation-dsc-cd-chocolatey.md)
209+
- To learn more about how to construct different search queries and review the Automation State Configuration logs with Log Analytics, see [Log searches in Log Analytics](../log-analytics/log-analytics-log-searches.md)
210+
- To learn more about Log Analytics and data collection sources, see [Collecting Azure storage data in Log Analytics overview](../log-analytics/log-analytics-azure-storage.md)

0 commit comments

Comments
 (0)