Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article, you learn how to use Azure Developer CLI (azd) to monitor your app health.
This guide uses the React Web App with Node.js API and MongoDB on Azure template. You can also use an Azure Developer CLI template that provisions Application Insights and a monitoring dashboard.
Note
The ToDo sample repository is archived and no longer maintained. If you use another template, confirm that it provisions the monitoring resources required by the commands in this guide.
Note
The azd monitor command is still in beta. Read more about alpha and beta feature support on the feature versioning and release strategy page.
Prerequisites
- An Azure account with an active subscription.
- The Azure Developer CLI installed.
- Node.js with npm version 20 or later for the ToDo sample.
Deploy the monitoring sample
Open an empty directory in your terminal, and then sign in and initialize the ToDo sample in that directory:
azd auth login
azd init --template Azure-Samples/todo-nodejs-mongo .
azd up
When prompted, enter an environment name and select your Azure subscription and location. Wait for deployment to finish. Run the remaining commands from this project directory.
The Hello AZD samples in the deployment quickstart don't provision the Application Insights resources required by this walkthrough.
Configure your environment
Create monitoring activity in the app before running the azd monitor commands:
Open the deployed ToDo app in your browser by using the web endpoint in the
azd upoutput.Create a new list and add a couple of items.
Monitor the app
To help with monitoring apps, azd provides a monitor command to launch various Application Insights dashboards. Run the command with one of the following parameters in the project directory to monitor app health:
| Application Insights dashboard | Command |
|---|---|
| Main dashboard | azd monitor --overview |
| Live metrics dashboard | azd monitor --live |
| Logs dashboard | azd monitor --logs |
Clean up resources
When you no longer need the resources created in this article, run the azd down command to delete the resource group:
azd down
See also
Request help
For information on how to file a bug, request help, or propose a new feature for the Azure Developer CLI, please visit the troubleshooting and support page.