-
Notifications
You must be signed in to change notification settings - Fork 225
Update Azure Virtual Network with Azure metrics source compatibility #5498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
amee-sumo
wants to merge
1
commit into
main
Choose a base branch
from
Azure-docs-update-(Azure-Virtual-Network)
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+18
−75
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -88,83 +88,15 @@ Azure service sends monitoring data to Azure Monitor, which can then [stream dat | |||||
|
||||||
* Virtual Network Flow Logs collection from Storage Account using our [Collect Logs from Azure Blob Storage](/docs/send-data/collect-from-other-data-sources/azure-blob-storage/block-blob/collect-logs) integration. | ||||||
* Activity Logs collection from [Azure Monitor](https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-get-started) using our [Azure Event Hubs source](/docs/send-data/collect-from-other-data-sources/azure-monitoring/ms-azure-event-hubs-source/). It is recommended to create a separate source for activity logs. If you are already collecting these logs, you can skip this step. | ||||||
* Metrics collection using our [HTTP Logs and Metrics source](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/) via Azure Functions deployed using the ARM template. | ||||||
|
||||||
* Metrics collection using our [Azure Metrics Source](/docs/send-data/hosted-collectors/microsoft-source/azure-metrics-source). | ||||||
|
||||||
You must explicitly enable diagnostic settings and network flow logs for each Virtual Network you want to monitor. You can forward metrics to the same event hub provided they satisfy the limitations and permissions as described [here](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings?tabs=portal#destination-limitations). | ||||||
|
||||||
When you configure the event hubs source or HTTP source, plan your source category to ease the querying process. A hierarchical approach allows you to make use of wildcards. For example: `Azure/VirtualNetwork/Metrics` and `Azure/VirtualNetwork/Logs`. | ||||||
|
||||||
### Configure field in field schema | ||||||
1. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data > Logs > Fields**. <br/>[**New UI**](/docs/get-started/sumo-logic-ui). In the top menu select **Configuration**, and then under **Logs** select **Fields**. You can also click the **Go To...** menu at the top of the screen and select **Fields**. | ||||||
1. Search for the following fields: | ||||||
- `tenant_name`. This field is tagged at the collector level and users can get the tenant name using the instructions [here](https://learn.microsoft.com/en-us/azure/active-directory-b2c/tenant-management-read-tenant-name#get-your-tenant-name). | ||||||
- `location`. The region to which the resource name belongs. | ||||||
- `subscription_id`. Id associated with a subscription where the resource is present. | ||||||
- `resource_group`. The resource group name where the Azure resource is present. | ||||||
- `provider_name`. Azure resource provider name (for example, Microsoft.Storage). | ||||||
- `resource_type`. Azure resource type (for example, storageaccounts). | ||||||
- `resource_name`. The name of the resource (for example, storage account name). | ||||||
|
||||||
3. Create the fields if it is not present. Refer to [create and manage fields](/docs/manage/fields/#manage-fields). | ||||||
|
||||||
### Configure Field Extraction Rules | ||||||
|
||||||
Create a Field Extraction Rule (FER) for Azure Virtual Network by following the instructions [here](/docs/manage/field-extractions/create-field-extraction-rule/). | ||||||
|
||||||
* **Target Resource Extraction FER** | ||||||
|
||||||
```sql | ||||||
Rule Name: AzureVirtualNetworkTargetResourceIdExtractionFER | ||||||
Applied at: Ingest Time | ||||||
Scope (Specific Data): tenant_name=* FlowLogFlowEvent | ||||||
``` | ||||||
|
||||||
```sql title="Parse Expression" | ||||||
json field=_raw "target_resource_id", "category", "flow_log_resource_id" | ||||||
| where category="FlowLogFlowEvent" | ||||||
| toUpperCase(target_resource_id) as target_resource_id | ||||||
| parse field=target_resource_id "/SUBSCRIPTIONS/*/RESOURCEGROUPS/*/PROVIDERS/*/*/*" as subscription_id, resource_group, provider_name, resource_type, resource_name | ||||||
| parse field=resource_name "*/SUBNETS/*" as vnet_name, subnet_name nodrop | ||||||
| parse field=flow_log_resource_id "NETWORKWATCHERS/NETWORKWATCHER_*/" as region_name nodrop | ||||||
| if (!isBlank(region_name), toLowerCase(region_name), "global") as location | ||||||
| if (resource_name matches /SUBNETS/, "SUBNETS", resource_type) as resource_type | ||||||
| fields subscription_id, location, provider_name, resource_group, resource_type, resource_name | ||||||
``` | ||||||
|
||||||
### Configure metric rules | ||||||
|
||||||
* **Azure Observability Metadata Extraction Azure Virtual Network** | ||||||
|
||||||
In case this rule already exists, then no need to create it again. | ||||||
```sql | ||||||
Rule Name: AzureObservabilityMetadataExtractionAzureVirtualNetwork | ||||||
``` | ||||||
|
||||||
```sql title="Metric match expression" | ||||||
resourceId=/SUBSCRIPTIONS/*/RESOURCEGROUPS/*/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKS/* tenant_name=* | ||||||
``` | ||||||
| Fields extracted | Metric rule | | ||||||
|------------------|----------------| | ||||||
| subscription_id | $resourceId._1 | | ||||||
| resource_group | $resourceId._2 | | ||||||
| provider_name | MICROSOFT.NETWORK | | ||||||
| resource_type | VIRTUALNETWORKS | | ||||||
| resource_name | $resourceId._3 | | ||||||
|
||||||
### Configure metrics collection | ||||||
|
||||||
In this section, you will configure a pipeline for shipping metrics from Azure Monitor to an Event Hub, onto an Azure Function, and finally to an HTTP Source on a hosted collector in Sumo Logic. This step is required only for DDOS related metrics which comes after enabling DDOS protection in your virtual network. | ||||||
|
||||||
1. Create a hosted collector and tag `tenant_name` field. <br/><img src={useBaseUrl('img/integrations/microsoft-azure/Azure-Storage-Tag-Tenant-Name.png')} alt="Azure Storage Tag Tenant Name" style={{border: '1px solid gray'}} width="800" /> | ||||||
2. [Configure an HTTP Source](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-1-configure-an-http-source). | ||||||
1. [Configure and deploy the ARM Template](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-2-configure-azure-resources-using-arm-template). | ||||||
1. [Export metrics to Event Hub](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-3-export-metrics-for-a-particular-resource-to-event-hub). Perform the steps below for each storage service (blob, queue, table, and file) and each storage account that you want to monitor. | ||||||
* Choose `Stream to an event hub` as the destination. | ||||||
* Select `AllMetrics`. | ||||||
* Use the Event hub namespace created by the ARM template in Step 2 above. You can create a new Event hub or use the one created by the ARM template. You can use the default policy `RootManageSharedAccessKey` as the policy name. | ||||||
4. Tag the location field in the source with the right location value.<br/><img src={useBaseUrl('img/integrations/microsoft-azure/Azure-Storage-Tag-Location.png')} alt="Azure Storage Tag Location" style={{border: '1px solid gray'}} width="500" /> | ||||||
5. Enable the `DDOS protection` by following the instructions in Azure [documentation](https://learn.microsoft.com/en-us/azure/ddos-protection/manage-ddos-protection#enable-for-an-existing-virtual-network) | ||||||
To set up the Azure Metrics source in Sumo Logic, refer to [Azure Metrics Source](/docs/send-data/hosted-collectors/microsoft-source/azure-metrics-source). | ||||||
|
||||||
### Configure logs collection | ||||||
|
||||||
|
@@ -236,20 +168,31 @@ Since this source includes logs from multiple regions, avoid tagging it with a l | |||||
|
||||||
In order to find virtual networks without any flow log resource, you can audit flow logs configuration for virtual networks using a [built-in policy](https://learn.microsoft.com/en-us/azure/network-watcher/vnet-flow-logs-policy#audit-flow-logs-configuration-for-virtual-networks-using-a-built-in-policy). | ||||||
|
||||||
|
||||||
## Installing the Azure Virtual Network app | ||||||
|
||||||
Now that you have set up data collection, install the Azure Virtual Network Sumo Logic app to use the pre-configured [dashboards](#viewing-the-azure-virtual-network-app-dashboards) that provide visibility into your environment for real-time analysis of overall usage. | ||||||
|
||||||
import AppInstallNoDataSourceV2 from '../../reuse/apps/app-install-index-apps-v2.md'; | ||||||
import AppInstallIndexV2 from '../../reuse/apps/app-install-index-option.md'; | ||||||
|
||||||
<AppInstallIndexV2/> | ||||||
|
||||||
As part of the app installation process, the following fields will be created by default: | ||||||
|
||||||
<AppInstallNoDataSourceV2/> | ||||||
- `tenant_name`. This field is tagged at the collector level. You can get the tenant name using the instructions [here](https://learn.microsoft.com/en-us/azure/active-directory-b2c/tenant-management-read-tenant-name#get-your-tenant-name). | ||||||
- `location`. The region to which the resource name belongs to. | ||||||
- `subscription_id`. ID associated with a subscription where the resource is present. | ||||||
- `resource_group`. The resource group name where the Azure resource is present. | ||||||
- `provider_name`. Azure resource provider name (for example, Microsoft.Network). | ||||||
- `resource_type`. Azure resource type (for example, storage accounts). | ||||||
- `resource_name`. The name of the resource (for example, storage account name). | ||||||
- `service_type`. Type of the service that can be accessed with a Azure resource. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- `service_name`. Services that can be accessed with an Azure resource (for example, in Azure Container Instances the service is Subscriptions). | ||||||
|
||||||
## Viewing the Azure Virtual Network app dashboards | ||||||
|
||||||
import ViewDashboards from '../../reuse/apps/view-dashboards.md'; | ||||||
import ViewDashboardsIndex from '../../reuse/apps/view-dashboards-index.md'; | ||||||
|
||||||
<ViewDashboards/> | ||||||
<ViewDashboardsIndex/> | ||||||
|
||||||
### Overview | ||||||
|
||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.