We have a need to monitor the azure Web App's resource usage in relation to the number of users logged into the application.
What is the best way to get information about the running azure environment (processor and memory) usage of the Azure WebApp for an ASP.NET application.
You can try to setup Application Insights in your application. Once done you should be able to get telemetry data with their API
(https://msdn.microsoft.com/en-us/library/azure/dn931943.aspx?f=255&MSPPError=-2147217396)
Related
Hello I hope you can help me.
I have a azure webapp that is basically an api programmed in dotnet core, this is connected to an azure application insights, where we monitor the api, the problem I have is that only one person on the team has access to these two resources(webapp and app insights), basically the permission for all rest of the team is a bureaucratic management that does not end resolving.
I need the data stored in the application insights to be replicated in another insights application in a new azure subscription that we already created where all team members have access.
What can I do to solve this problem?
I have an ASP.NET Core MVC application along with Entity Framework Core. Now I would like to host that application in Azure. I am new to Azure, so I don't know what needs to be configured on Azure before publishing the application to Azure.
Like Sajeetharan said you can quickly publish your ASP.NET MVC Application in Azure easily from Visual Studio itself.
But you need to understand how this actually works within azure
WebApps
The service which is used to host every Web Application (PaaS) is called Azure Web
Web.
App Service Plan
An App Service plan is the container for your app. The App Service plan settings will determine the location, features, cost and compute resources associated with your app. The Cost is based on the App Service plan and not the WebApps
While publishing your web applications in Azure, is nothing but just deploying your code to WebApps.
Update 1
Happy Coding !
You do not have to configure anything, if you already have an Azure subscribe just connect to your azure account via visual studio and create a new Web App to publish your code.
Read more here
Create an ASP.NET Core web app in Azure
My understanding so far on PaaS deployment using WebRoles or Worker Roles-
Spinning Web roles or Worker roles will create Cloud service to manage it.
However, in ARM resource group, their is no concept of Cloud service, then how are web & worker roles managed in ARM resource group?
Also I tried adding the webroles via JSON Outline in VS 2015, but no option to add webroles. So not sure if you can deploy webroles via JSON template?
Any information will be of great help.
Cloud Services have been around since the beginning of Azure.
To the deploy or manage them, you have to use the old APIs (Azure Service Management).
As far as I know, they won't be migrated to the new APIs (Azure Resource Manager), but you could use Virtual Machine Scale Sets instead.
Azure Resource Manager Web apps rely on the concept of App Service Plans, rather than cloud services. Basically this is the underlying VM(s) that the service runs on. You can specify the size and number of servers that make up the App Service plan, and then deploy on to those as a single unit.
You create an App service plan, then run web / worker roles inside that (as well as Logic, API, Functions)
As far as Web / Worker roles are concerned, App Service Plans do not draw a distinction between the two. You simply deploy code to it and it will run it however it is packaged. See here
The concept of cloud services simply don't exist within the Azure Resource Management model.
You can find a template for deploying a Web App here
We have a number of Application Insights resources, most of which were created automatically when App Services were created. Most of them are not being used. Is it safe to delete the Application Insights resources without affecting the rest of the application?
Yes it is, app insights resources are separate services in their own right, and only tied to your application by the application Id (or "key") that's published in the app insights resource blade.
Check that no application is linked to it and if yes, you can remove it safely without any issues.
I am trying to execute the REST API to get the usage metrics data from Web Application deployed on Azure.
Hi,
I am trying to execute the REST API to get the usage metrics data from Web Application deployed on Azure.
https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Web/sites//metrics?$filter=startTime%20eq%202016-04-12T06:05:42.907Z%20and%20endTime%20eq%202016-04-12T06:10:42.907Z&api-version=2014-04-01
But I am getting constantly 500 Internal Server Error.
Also, I tried to find out the given URL in Resource Explorer under the Mincrosoft.Web But in that I can see the metricsDefinitions but metrics is not available for this.
Can someone please let me know what how can I get the usage metrics data for the Web Application Services?
You can retrieve resource metrics via the Azure Insights API.By using the Azure Insights API it is possible to programmatically retrieve the available default metric definitions (the type of metric such as CPU Time, Requests, etc.), granularity, and metric values.
https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}/metrics?api-version=2014-04-01&$filter={filter}
It seems the REST API URI you are using is right, but before that the first step is to authenticate the Azure Insights API request. The easiest way to set up authentication is by creating an Azure AD service principal and retrieve the authentication token.
A very detailed walkthrough at https://blogs.msdn.microsoft.com/cloud_solution_architect/2016/02/23/retrieving-resource-metrics-via-the-azure-insights-api/.