Skip to content

Commit fa63304

Browse files
authored
Merge pull request #204256 from AbbyMSFT/workbooks
Sample workbook
2 parents 428c9e0 + a910087 commit fa63304

File tree

4 files changed

+112
-7
lines changed

4 files changed

+112
-7
lines changed

.openpublishing.redirection.azure-monitor.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@
216216
"redirect_url": "/azure/azure-monitor/visualize/workbooks-overview",
217217
"redirect_document_id": false
218218
},
219+
{
220+
"source_path_from_root": "/articles/azure-monitor/visualize/workbooks-sample-links.md",
221+
"redirect_url": "/azure/azure-monitor/visualize/workbooks-samples",
222+
"redirect_document_id": false
223+
},
219224
{
220225
"source_path_from_root": "/articles/azure-monitor/visualize/view-designer-conversion-access.md",
221226
"redirect_url": "/azure/azure-monitor/visualize/workbooks-overview",

articles/azure-monitor/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,8 +1356,6 @@ items:
13561356
href: visualize/workbooks-templates.md
13571357
- name: Creating a new workbook
13581358
href: visualize/workbooks-create-workbook.md
1359-
- name: Workbook configuration options
1360-
href: visualize/workbooks-configurations.md
13611359
- name: Working with data sources
13621360
href: visualize/workbooks-data-sources.md
13631361
- name: Working with visualizations
@@ -1404,6 +1402,8 @@ items:
14041402
href: visualize/workbooks-resources.md
14051403
- name: Multi-value parameters
14061404
href: visualize/workbooks-multi-value.md
1405+
- name: Workbook configuration options
1406+
href: visualize/workbooks-configurations.md
14071407
- name: Commonly used components
14081408
href: visualize/workbooks-commonly-used-components.md
14091409
- name: Workbook result limits

articles/azure-monitor/visualize/workbooks-criteria.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.reviewer: gardnerjr
1313

1414
When a query depends on many parameters, then the query will be stalled until each of its parameters have been resolved. Sometimes a parameter could have a simple query that concatenates a string or performs a conditional evaluation. However these queries still make network calls to services that perform these basic operations and that increases the time it takes for a parameter to resolve a value. This results in long load times for complex workbooks.
1515

16-
Criteria Text parameters solve this issue, as an author can define a set of criteria based on previously specified parameters, which will be evaluated to provide a dynamic value. The main benefit of using Criteria parameters is that it has the ability to resolve values of previously specified parameters and perform simple conditional operations without making any network calls. Below is an example of such a use case.
16+
Using criteria parameters, you can define a set of criteria based on previously specified parameters which will be evaluated to provide a dynamic value. The main benefit of using criteria parameters is that criteria parameters can resolve values of previously specified parameters and perform simple conditional operations without making any network calls. Below is an example of such a use case.
1717

1818
## Example
1919
Consider the conditional query below:
@@ -33,7 +33,7 @@ This can be translated to a criteria text parameter like so:
3333

3434
In the image above, the conditions will be evaluated from top to bottom and the value of the parameter `isNetworkCounter` will take the value of which ever condition evaluates to true first. All conditions except for the default condition (the 'else' condition) can be reordered to get the desired outcome.
3535

36-
## Setting up criteria
36+
## Set up criteria
3737
1. Start with a workbook with at least one existing parameter in edit mode.
3838
1. Choose Add parameters from the links within the workbook.
3939
1. Select on the blue Add Parameter button.
@@ -46,7 +46,7 @@ In the image above, the conditions will be evaluated from top to bottom and the
4646
1. Choose 'Save' from the toolbar to create the parameter.
4747

4848
> [!NOTE]
49-
> The first parameter in the workbook will not show the `Criteria` tab
49+
> The first parameter in the workbook will not show the `Criteria` tab.
5050
5151
:::image type="content" source="media/workbooks-criteria/workbooks-criteria-first-param.png" alt-text="Screenshot showing the first parameter.":::
5252

@@ -56,7 +56,7 @@ In the image above, the conditions will be evaluated from top to bottom and the
5656
- Parameter type: Text
5757
- Required: checked
5858
- Get data from: Criteria
59-
1. A grid should appear, select on 'Edit' next to the blank text box, this will bring up a 'Criteria Settings' form. Refer to [Criteria Settings form](#criteria-settings-form) for the description of each field.
59+
1. A grid appears. Select **Edit** next to the blank text box to open the 'Criteria Settings' form. Refer to [Criteria Settings form](#criteria-settings-form) for the description of each field.
6060

6161
:::image type="content" source="media/workbooks-criteria/workbooks-criteria-setting.png" alt-text="Screenshot showing the criteria settings form.":::
6262

articles/azure-monitor/visualize/workbooks-sample-links.md renamed to articles/azure-monitor/visualize/workbooks-samples.md

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,109 @@ ms.date: 07/05/2022
99
ms.reviewer: gardnerjr
1010
---
1111

12-
# Sample Azure Workbooks with links
12+
# Sample Azure Workbooks
1313
This article includes sample Azure Workbooks.
1414

15+
16+
## Sample JSON Path parameter workbook
17+
```json
18+
{
19+
"version": "Notebook/1.0",
20+
"items": [
21+
{
22+
"type": 9,
23+
"content": {
24+
"version": "KqlParameterItem/1.0",
25+
"parameters": [
26+
{
27+
"id": "f2552663-d809-40da-93c4-9618dfde9b1d",
28+
"version": "KqlParameterItem/1.0",
29+
"name": "selection",
30+
"type": 1,
31+
"value": "{ \"series\":\"Failures\", \"x\": 5, \"y\": 10}"
32+
}
33+
],
34+
"style": "above",
35+
"queryType": 0,
36+
"resourceType": "microsoft.operationalinsights/workspaces"
37+
},
38+
"name": "parameters - 1"
39+
},
40+
{
41+
"type": 1,
42+
"content": {
43+
"json": "For example, you may have a string parameter named `selection` that was the result of a query or selection in a visualization that has the following value \r\n```json\r\n{selection:json}\r\n```\r\n\r\nUsing JSONPath, you could get individual values from that object:\r\n\r\nformat | result\r\n---|---\r\n`selection:$.series` | `{selection:$..series}`\r\n`selection:$.x` | `{selection:$..x}`\r\n`selection$.y`| `{selection:$..y}`"
44+
},
45+
"name": "text - 0"
46+
}
47+
],
48+
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
49+
}
50+
```
51+
## Sample ARM template for creating a workbook template
52+
```json
53+
{
54+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
55+
"contentVersion": "1.0.0.0",
56+
"parameters": {
57+
"resourceName": {
58+
"type": "string",
59+
"defaultValue": "test-template",
60+
"metadata": {
61+
"description": "The unique name for this workbook template instance"
62+
}
63+
}
64+
},
65+
"resources": [
66+
{
67+
"name": "[parameters('resourceName')]",
68+
"type": "microsoft.insights/workbooktemplates",
69+
"location": "[resourceGroup().location]",
70+
"apiVersion": "2019-10-17-preview",
71+
"dependsOn": [],
72+
"properties": {
73+
"priority": 1,
74+
"galleries": [
75+
{
76+
"name": "A Workbook Template",
77+
"category": "Deployed Templates",
78+
"order": 100,
79+
"type": "workbook",
80+
"resourceType": "Azure Monitor"
81+
}
82+
],
83+
"templateData": {
84+
"version": "Notebook/1.0",
85+
"items": [
86+
{
87+
"type": 1,
88+
"content": {
89+
"json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections."
90+
},
91+
"name": "text - 2"
92+
},
93+
{
94+
"type": 3,
95+
"content": {
96+
"version": "KqlItem/1.0",
97+
"query": "union withsource=[\"$TableName\"] *\n| summarize Count=count() by TableName=[\"$TableName\"]\n| render barchart",
98+
"size": 1,
99+
"exportToExcelOptions": "visible",
100+
"queryType": 0,
101+
"resourceType": "microsoft.operationalinsights/workspaces"
102+
},
103+
"name": "query - 2"
104+
}
105+
],
106+
"styleSettings": {},
107+
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
108+
}
109+
}
110+
}
111+
]
112+
}
113+
```
114+
15115
## Sample workbook with links
16116

17117
```json

0 commit comments

Comments
 (0)