Skip to content

Commit cd3b570

Browse files
added fields and FER sections
1 parent 00b4fd9 commit cd3b570

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

docs/integrations/microsoft-azure/kubernetes.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,62 @@ The AKS - Control Plane app collects logs for the following [Azure Kubernetes Se
3737
* **kube-controller-manager**. The Controller Manager oversees a number of smaller controllers that perform actions, such as replicating pods and handling node operations.
3838
* **cluster-autoscaler**. The cluster autoscaler component watches for pods in your cluster that can't be scheduled because of resource constraints. When the cluster autoscaler detects issues, it scales up the number of nodes in the node pool to meet the application demands. It also regularly checks nodes for a lack of running pods and scales down the number of nodes as needed.
3939

40+
### Configure field in field schema
41+
42+
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**.
43+
1. Search for the following fields:
44+
- `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).
45+
- `location`. The region to which the resource name belongs to.
46+
- `subscription_id`. ID associated with a subscription where the resource is present.
47+
- `resource_group`. The resource group name where the Azure resource is present.
48+
- `provider_name`. Azure resource provider name (for example, Microsoft.Network).
49+
- `resource_type`. Azure resource type (for example, storage accounts).
50+
- `resource_name`. The name of the resource (for example, storage account name).
51+
- `service_type`. Type of the service that can be accessed with a Azure resource.
52+
- `service_name`. Services that can be accessed with an Azure resource (for example, in Azure Kubernetes service is Subscriptions).
53+
1. Create the fields if they are not present. Refer to [Manage fields](/docs/manage/fields/#manage-fields).
54+
55+
### Configure field extraction rules
56+
57+
Create the following Field Extraction Rule(s) (FER) for Azure Kubernetes Service by following the instructions in [Create a Field Extraction Rule](/docs/manage/field-extractions/create-field-extraction-rule/).
58+
59+
#### Azure location extraction FER
60+
61+
```sql
62+
Rule Name: AzureLocationExtractionFER
63+
Applied at: Ingest Time
64+
Scope (Specific Data): tenant_name=*
65+
```
66+
67+
```sql title="Parse Expression"
68+
json "location", "properties.resourceLocation", "properties.region" as location, resourceLocation, service_region nodrop
69+
| replace(toLowerCase(resourceLocation), " ", "") as resourceLocation
70+
| if (!isBlank(resourceLocation), resourceLocation, location) as location
71+
| if (!isBlank(service_region), service_region, location) as location
72+
| if (isBlank(location), "global", location) as location
73+
| fields location
74+
```
75+
76+
#### Resource ID extraction FER
77+
78+
```sql
79+
Rule Name: AzureResourceIdExtractionFER
80+
Applied at: Ingest Time
81+
Scope (Specific Data): tenant_name=*
82+
```
83+
84+
```sql title="Parse Expression"
85+
json "resourceId", "ResourceId" as resourceId1, resourceId2 nodrop
86+
| if (isBlank(resourceId1), resourceId2, resourceId1) as resourceId
87+
| toUpperCase(resourceId) as resourceId
88+
| parse regex field=resourceId "/SUBSCRIPTIONS/(?<subscription_id>[^/]+)" nodrop
89+
| parse field=resourceId "/RESOURCEGROUPS/*/" as resource_group nodrop
90+
| parse regex field=resourceId "/PROVIDERS/(?<provider_name>[^/]+)" nodrop
91+
| parse regex field=resourceId "/PROVIDERS/[^/]+(?:/LOCATIONS/[^/]+)?/(?<resource_type>[^/]+)/(?<resource_name>.+)" nodrop
92+
| parse regex field=resource_name "(?<parent_resource_name>[^/]+)(?:/PROVIDERS/[^/]+)?/(?<service_type>[^/]+)/?(?<service_name>.+)" nodrop
93+
| if (isBlank(parent_resource_name), resource_name, parent_resource_name) as resource_name
94+
| fields subscription_id, location, provider_name, resource_group, resource_type, resource_name, service_type, service_name
95+
```
4096

4197
### Sample log messages
4298

0 commit comments

Comments
 (0)