Skip to content

Commit efa3fce

Browse files
authored
Merge pull request #219050 from paulth1/app-articles-batch-12
edit pass: App articles batch 12
2 parents 18150c4 + befc79a commit efa3fce

File tree

5 files changed

+258
-254
lines changed

5 files changed

+258
-254
lines changed
Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
---
22
title: Automate custom reports with Application Insights data
3-
description: Automate custom daily/weekly/monthly reports with Azure Monitor Application Insights data
3+
description: Automate custom daily, weekly, and monthly reports with Azure Monitor Application Insights data.
44
ms.topic: conceptual
55
ms.date: 05/20/2019
66
ms.reviewer: tilee
77
---
88

99
# Automate custom reports with Application Insights data
1010

11-
Periodical reports help keep a team informed on how their business critical services are doing. Developers, DevOps/SRE teams, and their managers can be productive with automated reports reliably delivering insights without requiring everyone to sign in the portal. Such reports can also help identify gradual increases in latencies, load or failure rates that may not trigger any alert rules.
11+
Periodical reports help keep a team informed on how their business-critical services are doing. Developers, DevOps/SRE teams, and their managers can be productive with automated reports that reliably deliver insights without requiring everyone to sign in to the portal. Such reports can also help identify gradual increases in latencies, load, or failure rates that might not trigger any alert rules.
1212

1313
Each enterprise has its unique reporting needs, such as:
1414

15-
* Specific percentile aggregations of metrics, or custom metrics in a report.
16-
* Have different reports for daily, weekly, and monthly roll-ups of data for different audiences.
17-
* Segmentation by custom attributes like region, or environment.
18-
* Group some AI resources together in a single report, even if they may be in different subscriptions or resource groups etc.
19-
* Separate reports containing sensitive metrics sent to selective audience.
20-
* Reports to stakeholders who may not have access to the portal resources.
15+
* Specific percentile aggregations of metrics or custom metrics in a report.
16+
* Different reports for daily, weekly, and monthly roll-ups of data for different audiences.
17+
* Segmentation by custom attributes like region or environment.
18+
* AI resources grouped together in a single report, even if they might be in different subscriptions or resource groups.
19+
* Separate reports that contain sensitive metrics sent to selective audiences.
20+
* Reports to stakeholders who might not have access to the portal resources.
2121

22-
> [!NOTE]
23-
> The weekly Application Insights digest email did not allow any customization, and will be discontinued in favor of the custom options listed below. The last weekly digest email will be sent on June 11, 2018. Please configure one of the following options to get similar custom reports (use the query suggested below).
22+
> [!NOTE]
23+
> The weekly Application Insights digest email didn't allow any customization and will be discontinued in favor of the custom options listed here. The last weekly digest email was sent on June 11, 2018. Configure one of the following options to get similar custom reports. Use the query that's suggested in this article.
2424
25-
## To automate custom report emails
25+
## Automate custom report emails
2626

2727
You can [programmatically query Application Insights](https://dev.applicationinsights.io/) data to generate custom reports on a schedule. The following options can help you get started quickly:
2828

29-
* [Automate reports with Power Automate](../logs/logicapp-flow-connector.md)
30-
* [Automate reports with Logic Apps](automate-with-logic-apps.md)
31-
* Use the "Application Insights scheduled digest" [Azure function](../../azure-functions/functions-get-started.md) template in the Monitoring scenario. This function uses SendGrid to deliver the email.
29+
* [Automate reports with Power Automate](../logs/logicapp-flow-connector.md).
30+
* [Automate reports with Azure Logic Apps](automate-with-logic-apps.md).
31+
* Use the **Application Insights scheduled digest** [Azure Functions](../../azure-functions/functions-get-started.md) template in the **Monitoring** scenario. This function uses SendGrid to deliver the email.
3232

33-
![Azure function template](./media/automate-custom-reports/azure-function-template.png)
33+
![Screenshot that shows an Azure Functions template.](./media/automate-custom-reports/azure-function-template.png)
3434

3535
## Sample query for a weekly digest email
36-
The following query shows joining across multiple datasets for a weekly digest email like report. Customize it as required and use it with any of the options listed above to automate a weekly report.
36+
The following query shows joining across multiple datasets for a weekly digest email-like report. Customize it as required and use it with any of the options previously listed to automate a weekly report.
3737

3838
```AIQL
3939
let period=7d;
@@ -65,87 +65,87 @@ availabilityResults
6565

6666
## Application Insights scheduled digest report
6767

68-
1. Create an Azure Function App.(Application Insights _On_ is required only if you want to monitor your new Function App with Application Insights)
68+
1. Create an Azure Functions app. Application Insights **On** is required only if you want to monitor your new Azure Functions app with Application Insights.
6969

70-
Visit the Azure Functions documentation to learn how to [create a function app](../../azure-functions/functions-get-started.md)
70+
See the Azure Functions documentation to learn how to [create a function app](../../azure-functions/functions-get-started.md).
7171

72-
2. Once your new Function App has completed deployment, select **Go to resource**.
72+
1. After your new Azure Functions app has finished deployment, select **Go to resource**.
7373

74-
3. Select **New function**.
74+
1. Select **New function**.
7575

76-
![Create a new Function screenshot](./media/automate-custom-reports/new-function.png)
76+
![Screenshot that shows Create a new function.](./media/automate-custom-reports/new-function.png)
7777

78-
4. Select the **_Application Insights scheduled digest template_**.
78+
1. Select the **Application Insights scheduled digest** template.
7979

8080
> [!NOTE]
81-
> By default, function apps are created with runtime version 3.x. You must [target Azure Functions runtime version](../../azure-functions/set-runtime-version.md) **1.x** to use the Application Insights scheduled digest template. Go to Configuration > Function Runtime settings to change the runtime version. ![runtime screenshot](./media/automate-custom-reports/change-runtime-v.png)
81+
> By default, function apps are created with runtime version 3.x. You must [target Azure Functions runtime version](../../azure-functions/set-runtime-version.md) **1.x** to use the Application Insights scheduled digest template. Go to **Configuration** > **Function runtime settings** to change the runtime version. ![Screenshot that shows the Function runtime settings tab.](./media/automate-custom-reports/change-runtime-v.png)
8282
83-
![New Function Application Insights Template screenshot](./media/automate-custom-reports/function-app-04.png)
83+
![Screenshot that shows New Function Application Insights Template.](./media/automate-custom-reports/function-app-04.png)
8484

85-
5. Enter an appropriate recipient e-mail address for your report and select **Create**.
85+
1. Enter an appropriate recipient email address for your report and select **Create**.
8686

87-
![Function Settings screenshot](./media/automate-custom-reports/scheduled-digest.png)
87+
![Screenshot that shows Function Settings.](./media/automate-custom-reports/scheduled-digest.png)
8888

89-
6. Select your **Function App** > **Platform features** > **Configuration**.
89+
1. Select **Function Apps** > **Platform features** > **Configuration**.
9090

91-
![Azure Function Application settings screenshot](./media/automate-custom-reports/config.png)
91+
![Screenshot that shows Azure Function Application settings.](./media/automate-custom-reports/config.png)
9292

93-
7. Create three new application settings with appropriate corresponding values ``AI_APP_ID``, ``AI_APP_KEY``, and ``SendGridAPI``. Select **Save**.
93+
1. Create three new application settings with the appropriate corresponding values ``AI_APP_ID``, ``AI_APP_KEY``, and ``SendGridAPI``. Select **Save**.
9494

95-
![Function integration interface screenshot](./media/automate-custom-reports/app-settings.png)
95+
![Screenshot that shows Function integration interface.](./media/automate-custom-reports/app-settings.png)
9696

97-
(The AI_ values can be found under API Access for the Application Insights Resource you want to report on. If you don't have an Application Insights API Key, there is the option to **Create API Key**.)
97+
You can find the AI_ values under **API Access** for the Application Insights resource you want to report on. If you don't have an Application Insights API key, use the **Create API Key** option.
9898

9999
* AI_APP_ID = Application ID
100100
* AI_APP_KEY = API Key
101101
* SendGridAPI =SendGrid API Key
102102

103103
> [!NOTE]
104-
> If you don't have a SendGrid account you can create one. SendGrid's documentation for Azure Functions is [here](../../azure-functions/functions-bindings-sendgrid.md). If just want a minimal explanation of how to setup SendGrid and generate an API key one is provided at the end of this article.
104+
> If you don't have a SendGrid account, you can create one. For more information, see [Azure Functions SendGrid bindings](../../azure-functions/functions-bindings-sendgrid.md) for the SendGrid documentation for Azure Functions. If you want a brief explanation of how to set up SendGrid and generate an API key, one is provided at the end of this article.
105105
106-
8. Select **Integrate** and under Outputs click **SendGrid ($return)**.
106+
1. Select **Integrate**. Under **Outputs**, select **SendGrid ($return)**.
107107

108-
![Output screenshot](./media/automate-custom-reports/integrate.png)
108+
![Screenshot that shows Outputs.](./media/automate-custom-reports/integrate.png)
109109

110-
9. Under the **SendGridAPI Key App Setting**, select your newly created App Setting for **SendGridAPI**.
110+
1. Under the **SendGridAPI Key App Setting**, select your newly created app setting **SendGridAPI**.
111111

112-
![Run Function App screenshot](./media/automate-custom-reports/sendgrid-output.png)
112+
![Screenshot that shows SendGridAPI.](./media/automate-custom-reports/sendgrid-output.png)
113113

114-
10. Run and test your Function App.
114+
1. Run and test your function app.
115115

116-
![Test Screenshot](./media/automate-custom-reports/function-app-11.png)
116+
![Screenshot that shows Test.](./media/automate-custom-reports/function-app-11.png)
117117

118-
11. Check your e-mail to confirm that the message was sent/received successfully.
118+
1. Check your email to confirm that the message was sent or received successfully.
119119

120-
![E-mail subject line screenshot](./media/automate-custom-reports/function-app-12.png)
120+
![Screenshot that shows the E-mail subject line.](./media/automate-custom-reports/function-app-12.png)
121121

122122
## SendGrid with Azure
123123

124124
These steps only apply if you don't already have a SendGrid account configured.
125125

126-
1. From the Azure portal, select **Create a resource** > search for **SendGrid Email Delivery** > click **Create** > fill out the SendGrid specific create instructions.
126+
1. On the Azure portal, select **Create a resource**. Search for **SendGrid Email Delivery** and select **Create**. Fill out the SendGrid instructions.
127127

128-
![Create SendGrid Resource Screenshot](./media/automate-custom-reports/sendgrid.png)
128+
![Screenshot that shows the SendGrid Create button.](./media/automate-custom-reports/sendgrid.png)
129129

130-
2. Once created under SendGrid Accounts select **Manage**.
130+
1. Under **SendGrid Accounts**, select **Manage**.
131131

132-
![Settings API Key Screenshot](./media/automate-custom-reports/sendgrid-manage.png)
132+
![Screenshot that shows the Manage button.](./media/automate-custom-reports/sendgrid-manage.png)
133133

134-
3. This will launch SendGrid's site. Select **Settings** > **API Keys**.
134+
1. This action opens SendGrid's site. Select **Settings** > **API Keys**.
135135

136-
![Create and View API Key App Screenshot](./media/automate-custom-reports/function-app-15.png)
136+
![Screenshot that shows API Keys under Settings.](./media/automate-custom-reports/function-app-15.png)
137137

138-
4. Create an API Key > choose **Create & View**. (Review SendGrid's documentation on restricted access to determine what level of permissions is appropriate for your API Key. Full Access is selected here for example purposes only.)
138+
1. To create an API key, select **Create & View**. Review SendGrid's documentation on restricted access to determine what level of permissions is appropriate for your API key. **Full Access** is selected here only as an example.
139139

140-
![Full access screenshot](./media/automate-custom-reports/function-app-16.png)
140+
![Screenshot that shows Full Access.](./media/automate-custom-reports/function-app-16.png)
141141

142-
5. Copy the entire key, this value is what you need in your Function App settings as the value for SendGridAPI
142+
1. Copy the entire key. This value is what you need in your function app settings as the value for `SendGridAPI`.
143143

144-
![Copy API key screenshot](./media/automate-custom-reports/function-app-17.png)
144+
![Screenshot that shows the API Key Created pane.](./media/automate-custom-reports/function-app-17.png)
145145

146146
## Next steps
147147

148148
* Learn more about creating [Analytics queries](../logs/get-started-queries.md).
149149
* Learn more about [programmatically querying Application Insights data](https://dev.applicationinsights.io/)
150150
* Learn more about [Logic Apps](../../logic-apps/logic-apps-overview.md).
151-
* Learn more about [Microsoft Power Automate](https://ms.flow.microsoft.com).
151+
* Learn more about [Power Automate](https://ms.flow.microsoft.com).

0 commit comments

Comments
 (0)