Skip to content

Commit

Permalink
Remove azure.resourcegroup.name
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKatsoulis committed Mar 8, 2024
1 parent 757fc01 commit 884af33
Show file tree
Hide file tree
Showing 21 changed files with 16 additions and 123 deletions.
11 changes: 0 additions & 11 deletions auditbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2559,17 +2559,6 @@ alias to: cloud.region
--
*`azure.resourcegroup.name`*::
+
--
Name of resourceGroup the azure cloud instance belongs to.
type: keyword
--
[[exported-fields-common]]
== Common fields
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/include/fields.go

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions filebeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27762,17 +27762,6 @@ alias to: cloud.region

--


*`azure.resourcegroup.name`*::
+
--
Name of resourceGroup the azure cloud instance belongs to.


type: keyword

--

[[exported-fields-coredns]]
== Coredns fields

Expand Down
2 changes: 1 addition & 1 deletion filebeat/include/fields.go

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions heartbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -321,17 +321,6 @@ alias to: cloud.region
--
*`azure.resourcegroup.name`*::
+
--
Name of resourceGroup the azure cloud instance belongs to.
type: keyword
--
[[exported-fields-common]]
== Common heartbeat monitor fields
Expand Down
2 changes: 1 addition & 1 deletion heartbeat/include/fields.go

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions libbeat/processors/add_cloud_metadata/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,3 @@
type: alias
path: cloud.region
migration: true

- name: azure.resourcegroup
default_field: true
type: group
fields:
- name: name
type: keyword
description: >
Name of resourceGroup the azure cloud instance belongs to.
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ _Azure Virtual Machine_
[source,json]
-------------------------------------------------------------------------------
{
"azure": {
"resourcegroup.name": "/subscriptions/641ebacb-7743-41e7-b4fa-af1167351a61/resourcegroups/testgroup/providers/Microsoft.ContainerService/managedClusters/testcluster"
},
"cloud": {
"provider": "azure",
"instance.id": "04ab04c3-63de-4709-a9f9-9ab8c0411d5e",
Expand Down
15 changes: 7 additions & 8 deletions libbeat/processors/add_cloud_metadata/provider_azure_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,11 @@ var azureVMMetadataFetcher = provider{
"service": s.Object{
"name": c.Str("serviceName"),
},
"region": c.Str("location"),
"region": c.Str("location"),
"resourcegroup": c.Str("resourceGroupName"),
}.Apply(m)

azure, _ := s.Schema{
"resourcegroup": s.Object{
"name": c.Str("resourceGroupName"),
},
}.Apply(m)
return mapstr.M{"cloud": cloud, "azure": azure}
return mapstr.M{"cloud": cloud}
}

azGenSchema := func(m map[string]interface{}) mapstr.M {
Expand Down Expand Up @@ -189,11 +185,14 @@ func (az *azureMetadataFetcher) fetchAzureClusterMeta(
) {
logger := logp.NewLogger("add_cloud_metadata")
subscriptionId, _ := az.httpMeta.GetValue("cloud.account.id")
resourceGroupName, _ := az.httpMeta.GetValue("azure.resourcegroup.name")
resourceGroupName, _ := az.httpMeta.GetValue("cloud.resourcegroup")
strResourceGroupName := ""
if val, ok := resourceGroupName.(string); ok {
strResourceGroupName = val
}
// Drop cloud.resourcegroup field as we do not want the cloud provider to populate this field
az.httpMeta.Delete("cloud.resourcegroup")

strSubscriptionId := ""
if val, ok := subscriptionId.(string); ok {
strSubscriptionId = val
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ func TestRetrieveAzureMetadata(t *testing.T) {
}

expected := mapstr.M{
"azure": mapstr.M{
"resourcegroup": mapstr.M{
"name": "MC_myname_group_myname_eastus",
},
},
"cloud": mapstr.M{
"provider": "azure",
"instance": mapstr.M{
Expand Down
11 changes: 0 additions & 11 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10158,17 +10158,6 @@ alias to: cloud.region

--


*`azure.resourcegroup.name`*::
+
--
Name of resourceGroup the azure cloud instance belongs to.


type: keyword

--

[[exported-fields-cloudfoundry]]
== Cloudfoundry fields

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/include/fields/fields.go

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions packetbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1347,17 +1347,6 @@ alias to: cloud.region
--
*`azure.resourcegroup.name`*::
+
--
Name of resourceGroup the azure cloud instance belongs to.
type: keyword
--
[[exported-fields-common]]
== Common fields
Expand Down
2 changes: 1 addition & 1 deletion packetbeat/include/fields.go

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions winlogbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,6 @@ alias to: cloud.region
--
*`azure.resourcegroup.name`*::
+
--
Name of resourceGroup the azure cloud instance belongs to.
type: keyword
--
[[exported-fields-docker-processor]]
== Docker fields
Expand Down
2 changes: 1 addition & 1 deletion winlogbeat/include/fields.go

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions x-pack/functionbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,6 @@ alias to: cloud.region
--
*`azure.resourcegroup.name`*::
+
--
Name of resourceGroup the azure cloud instance belongs to.
type: keyword
--
[[exported-fields-docker-processor]]
== Docker fields
Expand Down
2 changes: 1 addition & 1 deletion x-pack/functionbeat/include/fields.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion x-pack/heartbeat/include/fields.go

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions x-pack/osquerybeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,6 @@ alias to: cloud.region
--
*`azure.resourcegroup.name`*::
+
--
Name of resourceGroup the azure cloud instance belongs to.
type: keyword
--
[[exported-fields-docker-processor]]
== Docker fields
Expand Down
2 changes: 1 addition & 1 deletion x-pack/osquerybeat/include/fields.go

Large diffs are not rendered by default.

0 comments on commit 884af33

Please sign in to comment.