Skip to content

Commit 2a1c3d2

Browse files
Merge pull request #253216 from nikhilkaul-msft/main
Chaos Studio Add AppInsights and AzureMonitor Set Up Docs
2 parents 1a4d5ac + 784a9e6 commit 2a1c3d2

10 files changed

+108
-0
lines changed

articles/chaos-studio/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@
7474
href: chaos-studio-tutorial-dynamic-target-cli.md
7575
- name: Troubleshoot common issues
7676
href: troubleshooting.md
77+
- name: Set up your Chaos Experiment to emit telemetry to Azure Monitor
78+
href: chaos-studio-set-up-azure-monitor.md
79+
- name: Set up your Agent-Based Chaos Experiment to emit telemetry to App Insights
80+
href: chaos-studio-set-up-app-insights.md
7781
- name: Reference
7882
items:
7983
- name: Fault library
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Set up App Insights for a Chaos Studio agent-based experiment
3+
description: Understand the steps to connect App Insights to your Chaos Studio Agent-Based Experiment
4+
services: chaos-studio
5+
author: nikhilkaul-msft
6+
ms.topic: how-to
7+
ms.date: 09/27/2023
8+
ms.author: nikhilkaul
9+
ms.service: chaos-studio
10+
ms.custom: ignite-fall-2023
11+
---
12+
# How-to: Configure your experiment to emit Experiment Fault Events to App Insights
13+
In this guide, we'll show you the steps needed to configure a Chaos Studio **Agent-based** Experiment to emit telemetry to App Insights. These events show the start and stop of each fault as well as the type of fault executed and the resource the fault was executed against. App Insights is the primary recommended logging solution for **Agent-based** experiments in Chaos Studio.
14+
15+
## Prerequisites
16+
- An Azure subscription
17+
- An existing Chaos Studio [**Agent-based** Experiment](chaos-studio-tutorial-agent-based-portal.md)
18+
- [Required for Application Insights Resource as well] An existing [Log Analytics Workspace](../azure-monitor/logs/quick-create-workspace.md)
19+
- An existing [Application Insights Resource](../azure-monitor/app/create-workspace-resource.md)
20+
- [Required for Agent-based Chaos Experiments] A [User-Assigned Managed Identity](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md)
21+
22+
## Step 1: Copy the Instrumentation Key from your Application Insights Resource
23+
Once you have met all the prerequisite steps, copy the **Instrumentation Key** found in the overview page of your Application Insights Resource (see screenshot)
24+
25+
<br/>
26+
27+
[![Screenshot that shows Instrumentation Key in App Insights.](images/step-1a-app-insights.png)](images/step-1a-app-insights.png#lightbox)
28+
29+
## Step 2: Enable the Target Platform for your Agent-Based Fault with Application Insights
30+
Navigate to the Chaos Studio overview page and click on the **Targets** blade under the "Experiments Management" section. Find the target platform, ensure it's enabled for agent-based faults, and select "Manage Actions" in the right-most column. See screenshot below for an example:
31+
<br/>
32+
33+
<br/>
34+
35+
[![Screenshot that shows the Chaos Targets Page.](images/step-2a-app-insights.png)](images/step-2a-app-insights.png#lightbox)
36+
37+
## Step 3: Add your Application Insights account and Instrumentation key
38+
At this point, the resource configuration page seen in the screenshot should come up . After configuring your managed identity, make sure Application Insights is "Enabled" and then select your desired Application Insights Account and enter the Instrumentation Key you copied in Step 1. Once you have filled out the required information, you can click "Review+Create" to deploy your resource.
39+
40+
<br/>
41+
42+
[![Screenshot of Targets Deployment Page.](images/step-3a-app-insights.png)](images/step-3a-app-insights.png#lightbox)
43+
44+
## Step 4: Run the chaos experiment
45+
At this point, your Chaos Target is now configured to emit telemetry to the App Insights Resource you configured! If you navigate to your specific Application Insights Resource and open the "Logs" blade under the "Monitoring" section, you should see the Agent health status and any actions the Agent is taking on your Target Platform. You can now run your experiment and see logging in your Application Insights Resource. See screenshot for example of App Insights Resource running successfully on an Agent-based Chaos Target platform.
46+
47+
<br/>
48+
49+
To query your logs, navigate to the "Logs" tab in the Application Insights Resource to get your desired logging information your desired format.
50+
51+
<br/>
52+
53+
[![Screenshot of Logs tab in Application Insights Resource.](images/step-4a-app-insights.png)](images/step-4a-app-insights.png#lightbox)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Set up Azure monitor for a Chaos Studio experiment
3+
description: Understand the steps to connect Azure Monitor to your Chaos Studio Experiment
4+
services: chaos-studio
5+
author: nikhilkaul-msft
6+
ms.topic: how-to
7+
ms.date: 09/27/2023
8+
ms.author: nikhilkaul
9+
ms.service: chaos-studio
10+
ms.custom: ignite-fall-2023
11+
---
12+
# How-to: Configure your experiment to emit Experiment Fault Events to Azure Monitor
13+
In this guide, we'll show you the steps needed to integrate an Experiment to emit telemetry to Azure Monitor. These events show the start and stop of each fault as well as the type of fault executed and the resource the fault was executed against. You can overlay this data on top of your existing Azure Monitor or external monitoring dashboards.
14+
15+
## Prerequisites
16+
- An Azure subscription
17+
- An existing Chaos Studio Experiment [How to create your first Chaos Experiment](chaos-studio-quickstart-azure-portal.md)
18+
- An existing Log Analytics Workspace [How to Create a Log Analytics Workspace](../azure-monitor/logs/quick-create-workspace.md)
19+
20+
## Step 1: Navigate to Diagnostic Settings tab in your Chaos Experiment
21+
Navigate to the Chaos Experiment you want to emit telemetry to Azure Monitor and open it. Then navigate to the "Diagnostic settings" tab under the "Monitoring" section as shown in the below screenshot:
22+
23+
<br/>
24+
25+
[![Screenshot that shows Diagnostic Settings in Chaos Experiment.](images/step-1a.png)](images/step-1a.png#lightbox)
26+
27+
## Step 2: Connect your Chaos Experiment to your desired Log Analytics Workspace
28+
Once you are in the "Diagnostic Settings" tab within your Chaos Experiment, select "Add Diagnostic Setting."
29+
Enter the following details:
30+
1. **Diagnostic Setting Name**: Any String you want, much like a Resource Group Name
31+
2. **Category Groups**:Choose which category of logging you want to output to the Log Analytics workspace.
32+
3. **Subscription**: The subscription which includes the Log Analytics Workspace you would like to use
33+
4. **Log Analytics Workspace**: Where you'll select your desired Log Analytics Workspace
34+
<br/>
35+
All the other settings are optional
36+
<br/>
37+
38+
<br/>
39+
40+
[![Screenshot that shows the Diagnostic Settings blade and required information.](images/step-2a.png)](images/step-2a.png#lightbox)
41+
42+
## Step 3: Run the chaos experiment
43+
Once you have completed Step 2, your experiment is now configured to emit telemetry to Azure Monitor upon the next Chaos Experiment execution! It typically takes time (20 minutes) for the logs to populate. Once populated you can view the log events from the logs tab. Events include experiment start, stop, and details about the faults executed. You can even turn the logs into chart visualizations or overlay your existing live site visualizations with chaos metadata.
44+
45+
<br/>
46+
47+
To query your logs, navigate to the "Logs" tab in your Chaos Experiment Resource to get your desired logging information in your desired format.
48+
49+
<br/>
50+
51+
[![Screenshot of Logs tab in Chaos Experiment Resource.](images/step-3a.png)](images/step-3a.png#lightbox)
310 KB
Loading
267 KB
Loading
250 KB
Loading
295 KB
Loading
298 KB
Loading
372 KB
Loading
596 KB
Loading

0 commit comments

Comments
 (0)