Prajith K, Michael above has provided some great insights about Diagnostic Settings, enabling them through Azure Policy and estimating cost. The following answer to your questions, in addition to Michael's answer, should help you further.
1.
- & 2. Diagnostic settings are not a must for all Azure resources to function. Even with diagnostic setting in disabled state, you can troubleshoot various issues. The troubleshooting process would depend on the type of resources deployed and the issue with them.
The common issues with Azure Resources' can be troubleshot using the "Diagnose and solve problems" option available in respective resource's "Resource Menu"
![User's image](/api/attachments/f116188b-899c-423f-b925-2825e7ad078b?platform=QnA)
If you are deploying Web Apps, the application's logging & Application Insights itself can provide enough information for troubleshooting a wide variety of issues.
For VMs, system logs/event viewer could help you solve most of the issues.
Also, Azure Monitor Metric is available that collects numeric data from resource into time series DB. It is available for certain metrics (depending on the resource) by default.
Therefore, even without diagnostic settings enabled, you can troubleshoot a large number of issues. I would suggest looking at the following links for more insights in this area: -
- Microsoft Azure troubleshooting documentation
undefinedundefined
-
-
-
- Azure Well-Architected Framework's Monitoring operations of cloud applications - This provides a comprehensive easy to navigate checklist that should help you detect, correct, and prevent issues from occurring.
Diagnostic Settings - can help you centralize the log collection into easy query-able format and storage (for example, when they are enabled to send logs/metrics to Log Analytics). Each resource will have its own types of logs to be collected, hence it will be important to understand the type of logs to collect and their retention period.
3. Usage cost and current utilization of Log Analytics Workspace - You could use the Usage Chart available in "Usage and estimated costs" of the Log analytics workspace to get this information. Also, this link has some good information and queries which can be used to analyze the usage pattern by various types of logs. 4. The answer as provided above should help you. You could check the Create diagnostic settings at scale using Azure Policy for this information. Note that every resource will have its own type of logs which can be sent to various destinations. Therefore, the doc mentions initiative (which is collection of Azure policies for various types of resource) that can assigned in one go. This should help you enable the setting up of diagnostic settings on the majority of the resources.
Please let me know if you have any questions. Please 'Accept as answer' if it helped so that it can help others in the community looking for help on similar topics.