Is there a way for me to offload an App Service Plan to Log Analytics? - azure

I wan to see logs of the nodes of my app service plan in Log Analytics. I DONT want to do it with app service. I need to query data of my nodes with KQL

Unfortunately, it's impossible as of now. Please vote up for this user voice: Request to manage diagnostic settings for App Service Plan from Azure portal.
I also tried from both azure portal and rest api:
From azure portal, there is no the option of Diagnostic settings for app service plan.
From api Diagnostic Settings - Create Or Update: It throws an error says that app service plan is not in the whitelist which means that it's not supported currently.
Hope Microsoft can implement this feature for service plan asap:).

Related

Can you query the ApiManagementGatewayLogs in Azure using Invoke-AzOperationalInsightsQuery?

I want to query the ApiManagementGatewayLogs table for an API Management service in Azure using Invoke-AzOperationalInsightsQuery. I can query Log Analytics workspaces fine with this command. I am not able to do this with API Management because I cannot find the workspace ID.
In API Management service, the Logs blade (under "Monitor") uses the Log Analytics icon and it leads you to think it may have a workspace underlying it. Having this workspace would let me call Invoke-AzOperationalInsightsQuery with the subscription plus workspace values. I think. Right now, I don't know if there is a workspace associated to the API Management service or if it is a munged storage that gets created with a Log Analytics icon.
Looking at the dedicated Log Analytic workspaces reveals that none have the ApiManagementGatewayLogs table that is found in the API Management service. So it looks like there is no connection between the API Management service and an existing Log Analytics workspace.
If there is no way to query API Management using Invoke-AzOperationalInsightsQuery, is there some Powershell equivalent for querying an API Management service using KQL?
I found the solution to this.
In API Management blade, there is a "Diagnostics settings" link under the Monitoring section.
Your logs will need to be set up here for storage in a storage account, Log Analytics workspace, event hub or partner solution.
If you are using a Log Analytics workspace, then this will be the workspace you use when invoking the Invoke-AzOperationalInsightsQuery Powershell command.
The APIM will ship your ApiManagementGatewayLogs table to the workspace configured in Diagnostic settings.

My Dashboard in Azure for App Services outage

I am working on a custom Dashboard in Azure. My Application is hosted in an APp Service. If App services is down at Microsoft end, i want to show a Red Dot in my dashboard.
KUSTO will work here?
Some API calls i need to do and some Programming to create dashboard?
Please guide me
You can create the Azure dashboard using template deployment in which Azure offers the ability to orchestrate the deployment of multiple resources.
Once the required resources for Azure Dashboard can be configured in template ARM template format, you can deploy using REST APIs, PowerShell, Azure CLI and Azure Portal template deployment.
This Microsoft Documentation helps you to create the Azure Dashboard using the Sample Templates given.
You can enable Health checks for your App Service using Azure Monitor App and that you can bring on Azure Dashboard to see your app service is up or down in the form of graph.
Source: Azure Service Health Dashboard

Azure - monitoring resources using REST APIs

I am new to Azure and have been going through various tutorials.
I am looking specifically at Azure Monitoring using REST APIs.
What I am trying to do is get the status of various resources like Virtual Networks, AD, Load Balancers etc on a custom dashboard using REST APIs.
I have found some list of REST APIs that allow monitoring here(https://learn.microsoft.com/en-us/rest/api/monitor/)
But do they provide Resource health and Status.Also, do i have a create a new Service API Managament Resource(which is a paid resource) in the Azure Account for these APIs to run?.
Please let me know if you have any insights or reference materials on this
I don't think rest API is good for monitoring. I will suggest use Azure Monitor service under that you can use Azure resource metrics, Activity logs and service health. based on these metrics and logs you can set alert and show live data on the dashboard.
We are using Microsoft OMS for live monitoring (visualization of data) and Email/SMS for notification.
List item
Audit and receive notifications about important actions in your Azure subscription

Slow notification hub registrations

I've implemented Azure Mobile App Service which uses Azure Mobile Apps .NET Server, connected it to the Notification Hub and it works.
However according to application insights my slowest calls are actually client registrations, for example:
PUT /push/installations/{installationId}
My app is deployed on azure under different resource group than notification hub. Can this be the cause?
Resource Group is just a container that holds the related Azure resources, and it would stores metadata about the resources, so the location for a resource group determines the data center for storing the metadata of the resources. Details you could follow here.
PUT /push/installations/{installationId}
This is the build-in endpoint for the mobile client to create / update the registration with the installation model. The server side code would be similar to the PutInstallation method under NotificationInstallationsController.cs.
As you commented that the data center for hosting your Notification Hub is North Europe. You need to check the location of your App Service plan for running your mobile app. Details about Azure App Service plan, you could follow here.
I would recommend you scale up your app service plan to a higher tier to check this issue. Also, you could try to make your Notification Hub and Mobile App under the same data center to narrow this issue. Additionally, you could provide the detailed comparison between the requests trace logging in your application insights for us to troubleshoot this issue.

How to display azure app service's web server log on Azure log Analytics?

I have an api application hosted on azure App services. For the web server log (iis logs) I've turned on web server logging from Azure portal. Look at the screenshot below.
For storing web server logging
Server Logs are allowed to be stored on the Azure blob containers only. As per the configuration the logs are stored on blob container as expected. Now I want to use these logs to be displayed on Azure Log Analytics.
I've the following storage configurations on Log Analytics in Azure Web portal.
On Log Analytics explorer I can view logs from all other sources except the web server (iis logs). What I'm missing here?
Verified with App Services team that Log Analytics is only supported at the IaaS (VM) level, not at PaaS (App Service) level.
Hopefully we can get this on their roadmap soon - for now you have to manually ingest this data into an external log management tool (Splunk, Sumo Logic, Azure Data Explorer).
Update 12/02/2019
Azure App Service has announced a Public Preview for IIS App Log integration with Azure Log Analytics.
Expanding on the prior answer, under the Diagnostic settings (preview) pane you can now integrate multiple logs to Azure via Add diagnostics setting, this can store:
AppServiceAntivirusScanAuditLogs
AppServiceHTTPLogs
AppServiceConsoleLogs
AppServiceAppLogs
AppServiceFileAuditLogs
AppServiceAuditLogs
AppServiceIPSecAuditLogs
AppServicePlatformLogs
AllMetrics
You can send them to:
Log Analytics workspace
Archive to storage account
Stream to event hub
Send to partner solution
Additionally, Application Insights is migrating to be backed by Log Analytics so we are getting close to fully integrated platform for metrics and logs

Resources