How to Configure Diagnostic Settings in Azure Monitor?
Platform logs in Azure, such as the Activity log and Azure resource logs, provide thorough diagnostic and auditing information for the Azure platform and the Azure resources on which it depends. Platform measurements are automatically collected and are often kept in the metrics database.
This article describes sending platform metrics and logs to various locations via diagnostic settings.
Each resource needs its diagnostic environment with the following standards:
Data from various metrics and logs are sent to locations specified in settings. For different resource types, there are several classifications.
One or more locations where the logs are sent. The location currently has a workspace for Log Analytics, Azure Storage, and Event Hubs.
It is only possible to describe one of each destination in a diagnostic scenario. Create different settings to send data to various destination types.
Destinations in Azure Monitoring
Platform logs and metrics can be sent to the destinations in Azure Monitoring, including the Log Analytics workspace, Azure Monitor partner integrations, and storage accounts.
Log Analytics Workspace
The Log Analytics workspace provides a centralized view of your data across all your Azure resources. You can use it to access powerful analytics tools such as Power BI to create custom dashboards, alerts, and reports based on your data. You can also use it to manage your data collection policies and integrate them with other services.
Azure Monitor Partner Integrations
Solutions from partner companies are available for you to use in Azure to improve your cloud infrastructure. Azure has completely integrated these solutions. Working with these solutions is quite similar to working with Microsoft's solutions. You employ a resource provider, resource types, and SDKs to manage the solution.
Azure Event Hubs
Event Hubs is a highly scalable pub/sub messaging service that can receive millions of events per second. It's built for enterprise-grade applications and cloud services. With Event Hubs, you can ingest millions of events per second into Azure Storage Blob or Table storage or stream them directly into another service like Power BI or an analytics solution like Azure Machine Learning or Cortana Intelligence Suite.
Azure Storage Account
You can use any storage account as a destination for sending your data. Azure storage account includes both standard storage accounts and premium storage accounts.
Create in Azure Portal
You can configure diagnostic settings in Azure Portal using the resource menu or Azure Monitor.
Configure diagnostic settings based on the resource in the Azure portal by following these steps.
Click Diagnostic settings under Monitor for a single resource.
To change diagnostic settings for a resource, click Diagnostic settings in Azure Monitor. On the resource page, click on it.
On the Azure Monitor page, select Activity Log, then click Diagnostic settings. Legacy Activity logs should be turned off.
2. If no settings are available for the resource you've chosen, a request to add a setting appears. To add a diagnostic setting, choose it.
3. Name your settings:
4. Metrics and logs to the route: For metrics, select a category group or individually check the boxes next to each type of data you want to send to the destinations listed later. The categories list varies depending on the Azure service. If you want to keep metrics in Azure Monitor Logs as well, choose AllMetrics.
5. Destination information: Each destination's checkbox should be selected. Options to add further information are shown.
5a: Log Analytics: Enter the workspace and subscription. If you don't already have one, make one now to continue.
5b: Event Hub includes the following requirements:
Event hub's subscription: The subscription to which the event hub belongs.
Event hub namespace: You must make one if you don't already have one.
Name of the event hub, optional to which all data should be sent. For each log category, an event hub is built if a name is not provided. You might wish to supply a name if you're broadcasting to different categories to prevent the creation of too many event hubs.
Policy name for the event hub (also optional): The permissions that the streaming mechanism has been specified by a policy. Visit Event Hub's features for more details.
5c: Select the Subscription, Storage account, and Retention policy for your storage needs.
6. Choose Save. The new setting is immediately shown in your list of options for this resource. As fresh event data is generated, logs are broadcast to the designated destinations. Up to 15 minutes may pass between the time an event is generated and the time it shows up in a workspace in Log Analytics.
Available Partner Solutions in Azure
Microsoft Azure has a growing ecosystem of partners that offer solutions that integrate with Microsoft Azure. The following are some of the most popular partner solutions:
Datadog is an analytics platform that delivers real-time insights into cloud infrastructure and application performance, providing visibility into business operations and IT performance. Datadog integrates with Azure to provide monitoring, alerting, reporting, and analysis.
Elastic is a search platform for developers and DevOps teams who need to analyze data quickly in real time. Elastic integrates with Azure in several ways, including support for deploying Elasticsearch clusters on Azure VM Scale Sets.
Logz.io offers log management as a service (LaaS), enabling users to securely collect, store, analyze and visualize their production logs from any source or format within the single pane of glass provided by Logz.io's web UI. Logz.io also integrates with Azure Monitor so you can access your cloud resources’ health environment directly from within Logz.io's user interface (UI).
Dynatrace for Azure provides real-time application performance management (APM) capabilities for modern applications running on Azure VMs and containers in Kubernetes clusters through its native integration with the Dynatrace Cloud Agent.
So, here’s everything about how to configure Diagnostic Settings on Resources in azure. You now have the tools necessary to re-enable the Network Watcher resource in case you unintentionally disabled it.