Skip to content

Commit d35a3a8

Browse files
Merge pull request #313695 from v-thpra/tjp-fresh-azcontapps-007
Q&M Freshness - Azure Container Apps - TJP007
2 parents 120d0cd + d213a28 commit d35a3a8

1 file changed

Lines changed: 18 additions & 22 deletions

File tree

articles/container-apps/java-metrics-with-grafana.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ author: craigshoemaker
66
ms.service: azure-container-apps
77
ms.custom: devx-track-extended-java
88
ms.topic: tutorial
9-
ms.date: 12/18/2024
9+
ms.date: 03/25/2026
1010
ms.author: cshoe
1111
#customer intent: As a developer, I want to build a grafa dashboard for Java metrics exposed from Azure Container Apps
1212
---
1313

1414
# Tutorial: Build a Java metrics dashboard with Azure Managed Grafana
1515

16-
In this tutorial, you will learn how to set up a metrics dashboard using Azure Managed Grafana to monitor Java applications running in Azure Container Apps.
16+
In this tutorial, you learn how to set up a metrics dashboard using Azure Managed Grafana to monitor Java applications running in Azure Container Apps.
1717

1818
Grafana is a popular tool for centralized metrics visualization and monitoring in the observability industry. Azure Managed Grafana is a fully managed Azure service that allows you to deploy and manage Grafana dashboards with seamless Azure integration. You can use Azure Managed Grafana to visualize Java metrics exposed by Azure Container Apps or integrate Java metrics into your existing Grafana dashboards.
1919

@@ -25,15 +25,16 @@ In this tutorial, you:
2525
2626
## Prerequisites
2727

28-
* An Azure account with an active subscription. If you don't already have one, you can [can create one for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
29-
* [Azure CLI](/cli/azure/install-azure-cli).
30-
* [A Java application deployed in Azure Container Apps](java-get-started.md).
28+
- An Azure account with an active subscription. If you don't already have one, you can [can create one for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
29+
- [Azure CLI](/cli/azure/install-azure-cli).
30+
- [A Java application deployed in Azure Container Apps](java-get-started.md).
3131

3232
## Set up the environment
3333

3434
Use the following steps to define environment variables and ensure your Azure Managed Grafana extension is up to date.
3535

3636
1. Create variables to support your Grafana configuration.
37+
3738
```bash
3839
export LOCATION=eastus
3940
export SUBSCRIPTION_ID={subscription-id}
@@ -44,12 +45,11 @@ Use the following steps to define environment variables and ensure your Azure Ma
4445
| Variable | Description |
4546
|-------------------------|------------------------------------------------------------------------------------|
4647
| `LOCATION` | The Azure region location where you create your Azure Managed Grafana instance. |
47-
| `SUBSCRIPTION_ID` | The subscription ID which you use to create your Azure Container Apps and Azure Managed Grafana instance. |
48+
| `SUBSCRIPTION_ID` | The subscription ID, which you use to create your Azure Container Apps and Azure Managed Grafana instance. |
4849
| `RESOURCE_GROUP` | The Azure resource group name for your Azure Managed Grafana instance. |
4950
| `GRAFANA_INSTANCE_NAME` | The instance name for your Azure Managed Grafana instance. |
50-
51-
52-
1. Log in to Azure with the Azure CLI.
51+
52+
1. Sign in to Azure with the Azure CLI.
5353

5454
```azurecli
5555
az login
@@ -63,10 +63,9 @@ Use the following steps to define environment variables and ensure your Azure Ma
6363

6464
1. Use the following command to ensure that you have the latest version of the Azure CLI extensions for Azure Managed Grafana.
6565

66-
```azurecli
67-
az extension add --name amg --upgrade
68-
```
69-
66+
```azurecli
67+
az extension add --name amg --upgrade
68+
```
7069

7170
## Set up an Azure Managed Grafana instance
7271

@@ -81,7 +80,7 @@ First, create an Azure Managed Grafana instance, and grant necessary role assign
8180
--location $LOCATION
8281
```
8382

84-
1. Grant the Azure Managed Grafana instance "Monitoring Reader" role to read metrics from Azure Monitor. Find more about the [authentication and permissions for Azure Managed Grafana](../managed-grafana/how-to-authentication-permissions.md).
83+
1. To read metrics from Azure Monitor, you need to grant the Azure Managed Grafana instance a *Monitoring Reader* role. To find out more, see [authentication and permissions for Azure Managed Grafana](../managed-grafana/how-to-authentication-permissions.md).
8584

8685
```azurecli
8786
GRAFA_IDDENTITY=$(az grafana show --name $GRAFANA_INSTANCE_NAME --resource-group $RESOURCE_GROUP --query "identity.principalId" --output tsv)
@@ -94,7 +93,6 @@ First, create an Azure Managed Grafana instance, and grant necessary role assign
9493
> [!IMPORTANT]
9594
> To add a new dashboard in Grafana, you need to have `Grafana Admin` or `Grafana Editor`role, see [Azure Managed Grafana roles](../managed-grafana/concept-role-based-access-control.md).
9695
97-
9896
1. Assign the `Grafana Admin` role to your account on the Azure Managed Grafana resource.
9997

10098
Get the resource ID for your Azure Managed Grafana instance.
@@ -121,20 +119,20 @@ First, create an Azure Managed Grafana instance, and grant necessary role assign
121119
--query "properties.endpoint" \
122120
--output tsv
123121
```
124-
This command returns the URL you can use to access the Azure Managed Grafana dashboard. Open your browser with URL and login.
122+
This command returns the URL you can use to access the Azure Managed Grafana dashboard. Open your browser with the URL and sign in.
125123

126-
1. Go to `Dashboard` > `New` -> `Import`. Upload the above sample dashboard JSON file, and choose the default built-in `Azure Monitor` data source, then click `Import` button.
124+
1. Go to `Dashboard` > `New` -> `Import` and upload the sample dashboard JSON file that you downloaded in the previous step. Choose the default built-in `Azure Monitor` data source, then select the `Import` button.
127125

128126
:::image type="content" source="media/java-metrics-with-grafana/import-java-dashboard.png" alt-text="Screenshot of importing Java metric dashboard for Azure Container Apps." lightbox="media/java-metrics-with-grafana/import-java-dashboard.png":::
129127

130-
131128
## Visualize Java metrics for Azure Container Apps with Grafana
132129

133-
1. Input your resource information in the filters for your Azure Container Apps. Now you can view all the [supported Java metrics in Azure Container Apps](java-metrics.md) within the dashboard. The sample dashboard provides live metric data, including
130+
1. Input your resource information in the filters for your Azure Container Apps. Now you can view all the [supported Java Virtual Machine (JVM) metrics in Azure Container Apps](java-metrics.md) within the dashboard. The sample dashboard provides live metric data, including
131+
134132
- Container App Overview
135133
- JVM Memory Usage
136134
- JVM Memory Buffer
137-
- JVM GC JVM GC
135+
- JVM garbage collection (GC)
138136
- A detailed JVM Memory Usage Analysis
139137

140138
:::image type="content" source="media/java-metrics-with-grafana/grafana-overview.png" alt-text="Screenshot of Overview tab in Grafana." lightbox="media/java-metrics-with-grafana/grafana-overview.png":::
@@ -147,10 +145,8 @@ First, create an Azure Managed Grafana instance, and grant necessary role assign
147145

148146
:::image type="content" source="media/java-metrics-with-grafana/grafana-jvm-memory-analysis.png" alt-text="Screenshot of JVM memory analysis tab in Grafana." lightbox="media/java-metrics-with-grafana/grafana-jvm-memory-analysis.png":::
149147

150-
151148
You can use this dashboard as a starting point to create your own customized metric visualizations and monitoring solution.
152149

153-
154150
## Clean up resources
155151

156152
The resources created in this tutorial have an effect on your Azure bill. If you aren't going to use these services long-term, run the following command to remove everything created in this tutorial.

0 commit comments

Comments
 (0)