Azure website disable FREB in deployment slots - azure

I'm trying to clean up my Event logs which show lots of identical errors
Event ID 2284 seems to be related to FREB, so when Anil (see link) says
" if you have multiple apps running under multiple app-pools, they
will each try to use the next filename in sequence and hence fail "
it made me wonder if the different staging slots were causing a conflict - which led me to want to try and turn off FREB for non-Production slots (with a sticky app setting slot maybe) to see if that stops all these log entries.
Is there a way to disable FREB on a per-slot basis?
edit: I can see there is a CLI command (-F) but I'm not sure how to bind this to the staging slot, permanently.

Yes you can do this, select the targeted deployment slot in azure portal. a setting blade opens, look for diagnostics logs and then you should be able to enable/disable required logging settings.
Hope this helps.

Related

Azure Linux App Service Not Displaying Application Logs

I've set up a linux based azure app service and am unable to see log messages from the application itself in both the "log stream" and "logs" tab of the monitoring options. It is important to note I can see start up messages in the logs for the deployed application and can see outputs when get and post requests are made to the corresponding connection url so i know its running (Also the tasks the application is written to perform are carried out). Additionally, in the "App Service Logs" tab I have "Application Logging" set to "File System" as is standard for what I'm trying to output but this hasn't resulted in any in-application logs being visible.
Lastly about a year ago I managed to set up two other linux based azure app services that work completely as desired and output the in app log messages to the stream and cannot replicate this behaviour with this one. I feel there is just some setting or property somewhere i have overlooked but no matter how many different setting tabs I investigate I cannot spot any significant differences.
Are there any somewhat hidden options or requirements to be aware of in order to get in-application logs to be outputted to a linux based app services "log stream"? Or some other solution at a higher level in the azure resource group, workspace, application insights etc that may solve this issue? Any help and suggestions are greatly appreciated thank you.
I have tested in my environment.
Go to Your App Service --> Select Diagnose and Solve Problems --> Click on Availability and Performance --> Select Application Logs
You should be able to see the Application Logs, Platform Logs and Deployment Logs here.
Log Stream gives you the live logs of your application. The logs displayed in the Application logs should be seen in the Log Stream.

Azure App Service File And Configuration Change Monitoring

As part of our production environment we have several App Services running inside of Azure. I would like to implement notifications to be sent to a specific email address upon file or configuration changes within those App Services. I have tried enabling Application Changes for the service but it does not appear to provide the capability to set up alerts on the changes,
I have also tried enabling App Service alerts but it does not appear that any of the test configuration changes that I have made were captured by the signal "Apply Web App Configuration".
The last thing that I tried was to enable Diagnostic Settings to capture AppServicePlatformLogs and AppServiceFileAuditLogs and stream them to an Event Hub, however, I cannot determine how to set up the email notification from the hub for the events.
I am hoping that there may be an easier way to set this up and was hoping that someone may have some pointers or resources that I can follow.
I was able to accomplish this under "Monitoring" -> "Alerts". A more detailed walkthrough can be found here https://perituza.com/blog/azure-app-service-monitoring-and-alerts/. The key was selecting "Activity Log - Administrative" as the Monitor Service in the Condition.

Diagnostics configuration for Azure Deployment throws an error

I'm trying to get diagnostics to work on my Azure Web Worker Role. I start out with the stock Web Worker Role solution by selecting 'New Project/Azure Cloud Service'. If I de-select the 'Enable Diagnostics' on the properties Worker Role, then I can successfully deploy the stock web role. It doesn't do much, but it deploys and appears to run. If I select the 'Enable Diagnostics', the deploy fails with:
9:27:34 PM - Applying Diagnostics extension.
9:27:37 PM - Value cannot be null.
Parameter name: s
I've tried various combinations for the 'Configure...' choices but get the same error. This appears on two machines now, so the chances that it's some sort of corruption are slim.
Anyone have a clue what's going on or have a simple, working example of emitting and reading diagnostic messages?
I got a different answer from MS support: “Our Product Team has rolled back the changes.”
I test it, and now I can publish with the diagnostic enabled without problem.
I got an answer from the support : it's an identified backend issue and the tech team is working on it with the highest priority.
As a workaround, disable diagnostics :

AzureWebApp: Monitor Application Logs

I'm building an Azure web-app and if there are certain unexpected errors, I want to be able to bubble it up in the Azure Dashboard / add alerts.
Any System.Diagnostics.Trace.TraceError() messages are logged to the ApplicationLog. Is there a way to add alert/monitoring-graphs for these in Azure Portal?
I think and most flexible option for configuring alerts on Web Apps is enabling the Application insights have the App Insight be one of your event sources:
https://azure.microsoft.com/en-us/documentation/articles/app-insights-search-diagnostic-logs/
Once you have the Application Insight setup then you can easily set any kind of alerts based on the diagnostics that are collected:
https://azure.microsoft.com/en-gb/documentation/articles/app-insights-alerts/
Aram's links below really helps. Please read them.
To Get this working:
Add the ApplicationInsights to your project.
(Optional) If you want log traces (System.Diagnostics.Trace) to be searchable on insights, add Microsoft.ApplicationInsights.TraceListener nuget to your project.
Use telemetryClient.TrackException() to place a server exception
when you hit a critical error.
Add an alert on Azure portal to check for ServerExceptions within the given time window.

Swap Slots on Windows Azure but don't copy AppSettings

Hello,
I noticed that when i want to swap slots on Azure the whole configuration will also be copied. I have a lot of environment-specific settings that i wanted to have configured automatically on a swap. So for example, i want that the ENVIRONMENT_TYPE of the test slot stays on TEST and doesn't change to DEV. Like you can see in the Screenshot, these preview messages don't really make sense.
Can anybody help me changing this option? How do you handle this?
Thanks a lot, have a nice day!
In the Azure Preview Portal, you can mark individual AppSettings as "Slot Setting" which means that they won't get swapped. This is described at https://azure.microsoft.com/en-gb/documentation/articles/web-sites-staged-publishing/.
You can access the Preview Portal at https://ms.portal.azure.com/. Choose Browse everything and select your Web-App. On the blade for your web-app, there is a box called Deployment Slots. If you select this, it will list the available Deployment slots - choose the one that you wish to modify, and you can then mark the individual App Settings as "Slot Setting".

Resources