Skip to content
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

[GCP] Add dimensions for metrics data streams #8314

Merged
merged 17 commits into from
Dec 6, 2023
Merged
5 changes: 5 additions & 0 deletions packages/gcp/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "2.32.1"
changes:
- description: Add dimensions mappings and the metrics_fingerprint field across all metrics data streams.
type: enhancement
link: https://github.com/elastic/integrations/pull/8314
- version: "2.32.0"
changes:
- description: Add new billing data stream fields.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
description: Pipeline for parsing GCP Cloud Run metrics.
processors:
- fingerprint:
fields:
- gcp.labels
target_field: gcp.labels_fingerprint
ignore_missing: true
- rename:
field: gcp.metrics.container.billable_instance_time.value
target_field: gcp.cloudrun_metrics.container.billable_instance_time
Expand Down
5 changes: 5 additions & 0 deletions packages/gcp/data_stream/cloudrun_metrics/fields/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
name: cloud
- external: ecs
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.account.name
dimension: true
- external: ecs
name: cloud.availability_zone
- external: ecs
Expand All @@ -22,3 +24,6 @@
name: error.message
- external: ecs
name: service.type
- external: ecs
name: agent.id
dimension: true
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
- name: gcp
type: group
description: >-
GCP module
fields:
- name: labels_fingerprint
dimension: true
type: keyword
description: >-
Hashed value of the labels field.
- name: labels
type: group
description: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
description: Pipeline for parsing GCP CloudSQL MySQL metrics.
processors:
- fingerprint:
fields:
- gcp.labels
target_field: gcp.labels_fingerprint
ignore_missing: true
- drop:
description: Drop if database is not MySQL.
if: "ctx?.gcp?.labels?.cloudsql?.name != 'mysql'"
Expand Down
5 changes: 5 additions & 0 deletions packages/gcp/data_stream/cloudsql_mysql/fields/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
name: cloud
- external: ecs
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.account.name
dimension: true
- external: ecs
name: cloud.availability_zone
- external: ecs
Expand All @@ -22,3 +24,6 @@
name: error.message
- external: ecs
name: service.type
- external: ecs
name: agent.id
dimension: true
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
- name: gcp
type: group
description: >-
GCP module
fields:
- name: labels_fingerprint
dimension: true
type: keyword
description: >-
Hashed value of the labels field.
- name: labels
type: group
description: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
description: Pipeline for parsing GCP CloudSQL PostgreSQL metrics.
processors:
- fingerprint:
fields:
- gcp.labels
target_field: gcp.labels_fingerprint
ignore_missing: true
- drop:
description: Drop if database is not PostgreSQL.
if: "ctx?.gcp?.labels?.cloudsql?.name != 'postgres'"
Expand Down
5 changes: 5 additions & 0 deletions packages/gcp/data_stream/cloudsql_postgresql/fields/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
name: cloud
- external: ecs
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.account.name
dimension: true
- external: ecs
name: cloud.availability_zone
- external: ecs
Expand All @@ -22,3 +24,6 @@
name: error.message
- external: ecs
name: service.type
- external: ecs
name: agent.id
dimension: true
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
- name: gcp
type: group
description: >-
GCP module
fields:
- name: labels_fingerprint
dimension: true
type: keyword
description: >-
Hashed value of the labels field.
- name: labels
type: group
description: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
description: Pipeline for parsing GCP CloudSQL SQL Server metrics.
processors:
- fingerprint:
fields:
- gcp.labels
target_field: gcp.labels_fingerprint
ignore_missing: true
- drop:
description: Drop if database is not SQLServer.
if: "ctx?.gcp?.labels?.cloudsql?.name != 'sqlserver'"
Expand Down
5 changes: 5 additions & 0 deletions packages/gcp/data_stream/cloudsql_sqlserver/fields/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
name: cloud
- external: ecs
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.account.name
dimension: true
- external: ecs
name: cloud.availability_zone
- external: ecs
Expand All @@ -22,3 +24,6 @@
name: error.message
- external: ecs
name: service.type
- external: ecs
name: agent.id
dimension: true
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
- name: gcp
type: group
description: >-
GCP module
fields:
- name: labels_fingerprint
dimension: true
type: keyword
description: >-
Hashed value of the labels field.
- name: labels
type: group
description: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"user": {
"goog-gke-node": ""
}
}
},
"labels_fingerprint": "vP7l3YwKK9Mr+96HYpEj/Of6zVI="
},
"host": {
"id": "4751091017865185079",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
description: Pipeline for parsing GCP Compute metrics.
processors:
- fingerprint:
fields:
- gcp.labels
target_field: gcp.labels_fingerprint
ignore_missing: true
- rename:
field: gcp.metrics.firewall.dropped.bytes
target_field: gcp.compute.firewall.dropped.bytes
Expand Down
1 change: 1 addition & 0 deletions packages/gcp/data_stream/compute/fields/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
type: keyword
ignore_above: 1024
description: Instance name of the host machine.
dimension: true
- name: project.id
type: keyword
description: Name of the project in Google Cloud.
Expand Down
9 changes: 9 additions & 0 deletions packages/gcp/data_stream/compute/fields/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@
name: cloud
- external: ecs
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.account.name
dimension: true
- external: ecs
name: cloud.availability_zone
dimension: true
- external: ecs
name: cloud.instance.id
dimension: true
- external: ecs
name: cloud.machine.type
dimension: true
- external: ecs
name: cloud.provider
- external: ecs
name: cloud.region
dimension: true
- external: ecs
name: ecs.version
- external: ecs
Expand All @@ -22,3 +28,6 @@
name: error.message
- external: ecs
name: service.type
- external: ecs
name: agent.id
dimension: true
6 changes: 6 additions & 0 deletions packages/gcp/data_stream/compute/fields/package-fields.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
- name: gcp
type: group
description: >-
GCP module
fields:
- name: labels_fingerprint
dimension: true
type: keyword
description: >-
Hashed value of the labels field.
- name: labels
type: group
description: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
description: Pipeline for parsing GCP Dataproc metrics.
processors:
- fingerprint:
fields:
- gcp.labels
target_field: gcp.labels_fingerprint
ignore_missing: true
- rename:
field: gcp.metrics.batch.spark.executors.count
target_field: gcp.dataproc.batch.spark.executors.count
Expand Down
5 changes: 5 additions & 0 deletions packages/gcp/data_stream/dataproc/fields/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
name: cloud
- external: ecs
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.account.name
dimension: true
- external: ecs
name: cloud.availability_zone
- external: ecs
Expand All @@ -22,3 +24,6 @@
name: error.message
- external: ecs
name: service.type
- external: ecs
name: agent.id
dimension: true
6 changes: 6 additions & 0 deletions packages/gcp/data_stream/dataproc/fields/package-fields.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
- name: gcp
type: group
description: >-
GCP module
fields:
- name: labels_fingerprint
dimension: true
type: keyword
description: >-
Hashed value of the labels field.
- name: labels
type: group
description: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
description: Pipeline for parsing GCP Firestore metrics.
processors:
- fingerprint:
fields:
- gcp.labels
target_field: gcp.labels_fingerprint
ignore_missing: true
- rename:
field: gcp.metrics.document.delete.count
target_field: gcp.firestore.document.delete.count
Expand Down
5 changes: 5 additions & 0 deletions packages/gcp/data_stream/firestore/fields/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
name: cloud
- external: ecs
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.account.name
dimension: true
- external: ecs
name: cloud.availability_zone
- external: ecs
Expand All @@ -22,3 +24,6 @@
name: error.message
- external: ecs
name: service.type
- external: ecs
name: agent.id
dimension: true
6 changes: 6 additions & 0 deletions packages/gcp/data_stream/firestore/fields/package-fields.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
- name: gcp
type: group
description: >-
GCP module
fields:
- name: labels_fingerprint
dimension: true
type: keyword
description: >-
Hashed value of the labels field.
- name: labels
type: group
description: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
description: Pipeline for parsing GCP GKE metrics.
processors:
- fingerprint:
fields:
- gcp.labels
target_field: gcp.labels_fingerprint
ignore_missing: true
- rename:
field: gcp.metrics.container.cpu.core_usage_time.sec
target_field: gcp.gke.container.cpu.core_usage_time.sec
Expand Down
5 changes: 5 additions & 0 deletions packages/gcp/data_stream/gke/fields/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
name: cloud
- external: ecs
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.account.name
dimension: true
- external: ecs
name: cloud.availability_zone
- external: ecs
Expand All @@ -22,3 +24,6 @@
name: error.message
- external: ecs
name: service.type
- external: ecs
name: agent.id
dimension: true
6 changes: 6 additions & 0 deletions packages/gcp/data_stream/gke/fields/package-fields.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
- name: gcp
type: group
description: >-
GCP module
fields:
- name: labels_fingerprint
dimension: true
type: keyword
description: >-
Hashed value of the labels field.
- name: labels
type: group
description: >-
Expand Down
Loading