elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
12.06k stars 4.89k forks source link

[Question] Metricbeat Gcp module should keep the original labels of metrics #29573

Open kwinstonix opened 2 years ago

kwinstonix commented 2 years ago

1. The problem

When I use metricbeat to collecte instance metrics, I find that there is no instance_name label in labels.metrics. That is different from google monitoring docs and make me confused.

image

image

2. The reason

There is a filter logic in compute labels field.

https://github.com/elastic/beats/blob/76bf18b0c2be4c8adf1f2a0f9168aadcd04e8593/x-pack/metricbeat/module/gcp/timeseries_metadata_collector.go#L80-L89

3. Suggestion

cloud.intance.name is a common ecs filed , but we should also keep original metric labels. That would be more clear.

elasticmachine commented 2 years ago

Pinging @elastic/integrations (Team:Integrations)

kaiyan-sheng commented 2 years ago

@kwinstonix Thanks for looking into this and I agree with you, we should keep the original instance_name label as well. WDYT @endorama @aspacca ?

felix-lessoer commented 2 years ago

Do you also plan to move the other ECS related fields into their ECS equivalent? E.g. gcp.labels.resource.container_name could be container.name

Otherwise the Metrics view in Observabilty will not show the exported data from this module and customer has to also use Kubernetes integration to grab more data. But if the customer is doing so, the GCP module for GKE is not adding any value.

botelastic[bot] commented 1 year ago

Hi! We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

felix-lessoer commented 1 year ago

:+1

kwinstonix commented 1 year ago

@kaiyan-sheng , I opened a PR to fix this

botelastic[bot] commented 2 months ago

Hi! We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!