You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/automate-custom-reports.md
+26-32Lines changed: 26 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ ms.reviewer: sdash
11
11
12
12
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.
13
13
14
-
Each enterprise has its unique reporting needs, such as:
14
+
Each enterprise has its unique reporting needs, such as:
15
15
16
16
* Specific percentile aggregations of metrics, or custom metrics in a report.
17
17
* Have different reports for daily, weekly, and monthly roll-ups of data for different audiences.
18
-
* Segmentation by custom attributes like region, or environment.
18
+
* Segmentation by custom attributes like region, or environment.
19
19
* Group some AI resources together in a single report, even if they may be in different subscriptions or resource groups etc.
20
20
* Separate reports containing sensitive metrics sent to selective audience.
21
21
* Reports to stakeholders who may not have access to the portal resources.
@@ -34,7 +34,7 @@ You can [programmatically query Application Insights](https://dev.applicationins
34
34

35
35
36
36
## Sample query for a weekly digest email
37
-
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.
37
+
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.
38
38
39
39
```AIQL
40
40
let period=7d;
@@ -66,40 +66,34 @@ availabilityResults
66
66
67
67
## Application Insights scheduled digest report
68
68
69
-
1.From the Azure portal, select **Create a Resource** > **Compute** > **Function App**.
69
+
1.Create an Azure Function App.(Application Insights _On_ is required only if you want to monitor your new Function App with Application Insights)
70
70
71
-

71
+
Visit the Azure Functions documentation to learn how to [create a function app](https://docs.microsoft.com/azure/azure-functions/functions-create-first-azure-function#create-a-function-app)
72
72
73
-
2.Enter appropriate info for your app and select _Create_. (Application Insights _On_ is required only if you want to monitor your new Function App with Application Insights)
73
+
2.Once your new Function App has completed deployment, select **Go to resource**.
74
74
75
-

75
+
3. Select **New function**.
76
76
77
-
3. Once your new Function App has completed deployment, select **Go to resource**.
77
+

78
78
79
-
4. Select **New function**.
80
-
81
-

82
-
83
-
5. Select the **_Application Insights scheduled digest template_**.
79
+
4. Select the **_Application Insights scheduled digest template_**.
84
80
85
81
> [!NOTE]
86
-
> By default, function apps are created with runtime version 2.x. You must [target Azure Functions runtime version](https://docs.microsoft.com/azure/azure-functions/set-runtime-version)**1.x** to use the Application Insights scheduled digest template. 
87
-
88
-
82
+
> By default, function apps are created with runtime version 3.x. You must [target Azure Functions runtime version](https://docs.microsoft.com/azure/azure-functions/set-runtime-version)**1.x** to use the Application Insights scheduled digest template. Go to Configuration > Function Runtime settings to change the runtime version. 
89
83
90
84

91
85
92
-
6. Enter an appropriate recipient e-mail address for your report and select **Create**.
86
+
5. Enter an appropriate recipient e-mail address for your report and select **Create**.
(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**.)
105
99
@@ -110,39 +104,39 @@ availabilityResults
110
104
> [!NOTE]
111
105
> If you don't have a SendGrid account you can create one. SendGrid's documentation for Azure Functions is [here](https://docs.microsoft.com/azure/azure-functions/functions-bindings-sendgrid). 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.
112
106
113
-
9. Select **Integrate** and under Outputs click **SendGrid ($return)**.
107
+
8. Select **Integrate** and under Outputs click **SendGrid ($return)**.
12. Check your e-mail to confirm that the message was sent/received successfully.
119
+
11. Check your e-mail to confirm that the message was sent/received successfully.
126
120
127
121

128
122
129
123
## SendGrid with Azure
130
124
131
125
These steps only apply if you don't already have a SendGrid account configured.
132
126
133
-
1. From the Azure portal select **Create a resource** search for **SendGrid Email Delivery** > Click**Create** > and fill out the SendGrid specific create instructions.
127
+
1. From the Azure portal, select **Create a resource**> search for **SendGrid Email Delivery** > click**Create** > fill out the SendGrid specific create instructions.
2. Once created under SendGrid Accounts select **Manage**.
138
132
139
-

133
+

140
134
141
135
3. This will launch SendGrid's site. Select **Settings** > **API Keys**.
142
136
143
137

144
138
145
-
4. Create an API Key > choose **Create & View** (Please 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.)
139
+
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.)
0 commit comments