|
| 1 | +# Workbook |
| 2 | + |
| 3 | +This project leverages [Azure Workbooks](https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-overview) |
| 4 | +to aggregate monitoring data from various Azure resources. |
| 5 | + |
| 6 | +The workbook's exported JSON is located in the [../infra/workbooks/workbook.json](../infra/workbooks/workbook.json) |
| 7 | +file. The actual resource names have been replaced with placeholders, which get populated during the workbook's deployment. |
| 8 | + |
| 9 | +## Modifying the Workbook |
| 10 | + |
| 11 | +The most straightforward method to modify the workbook is through the UI, followed by re-exporting the JSON file. |
| 12 | + |
| 13 | +To do this, navigate to the workbook resource and: |
| 14 | + |
| 15 | +1. Click on 'Edit' |
| 16 | +  |
| 17 | +2. Click on 'Advanced Editor' |
| 18 | +  |
| 19 | +3. Copy or download the contents into the [../infra/workbooks/workbook.json](../infra/workbooks/workbook.json) file |
| 20 | +  |
| 21 | +4. Replace the actual resource names with the corresponding placeholders: |
| 22 | + - `/subscriptions/00000000-0000-0000-0000-00000000000` -> `{subscription-id}` |
| 23 | + - `rg-<your-resource-group-name>` -> `{resource-group}` |
| 24 | + - `hosting-plan-<your-resource-token>` -> `{app-service-plan}` |
| 25 | + - `backend-<your-resource-token>` -> `{backend-app-service}` |
| 26 | + - `web-<your-resource-token>` -> `{web-app-service}` |
| 27 | + - `web-<your-resource-token>-admin` -> `{admin-app-service}` |
| 28 | + - `doc-processing` -> `{event-grid}` |
| 29 | + - `la-<your-resource-token>` -> `{log-analytics}` |
| 30 | + - `openai-<your-resource-token>` -> `{open-ai}` |
| 31 | + - `search-<your-resource-token>` -> `{ai-search}` |
| 32 | + - `str<your-resource-token>` -> `{storage-account}` |
| 33 | + |
| 34 | +## Adding New Resources to the Workbook |
| 35 | + |
| 36 | +To simplify the process of replacing resource names with placeholders, we've added hidden parameters that reference the |
| 37 | +resources. These parameters are visible when you're editing the workbook: |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +If you need to add a new resource to the workbook, please add this as a hidden parameter, then reference that parameter |
| 42 | +in your metric or query. The easiest way to do this is to duplicate an existing parameter and change it to the resource |
| 43 | +type you require. |
| 44 | + |
| 45 | +## Recommended Graph Settings |
| 46 | + |
| 47 | +To enhance the workbook's usability, we recommend the following settings, which can be found under `Advanced Settings`: |
| 48 | +- `Show open in Metrics Explorer button when not editing`: This allows users to easily modify or edit the query if |
| 49 | +required for a specific reason. |
| 50 | +- `Enable time range brushing` + `Export selected time range as parameter: timerange`: This allows users to easily |
| 51 | +modify the time range and zoom in on data by simply highlighting the time range on the graph. |
| 52 | + |
| 53 | +## Tabs |
| 54 | + |
| 55 | +To implement tab functionality, we first need to organize our graphs into groups. Then, in `Advanced Settings` for the |
| 56 | +groups, we enable the setting `Make this item conditionally visible`, adding a condition of `selTab equals <tab-name>`. |
| 57 | + |
| 58 | +We then add a new links section to the workbook, of type tabs. Where the action of each tab is `Set a parameter value` |
| 59 | +where the value is `selTab` and the settings is the name of the tab. |
| 60 | + |
| 61 | + |
0 commit comments