Conversation
b7e61ea to
1ab6284
Compare
🌐 Coverage report
|
|
/test |
|
Hi @gpop63 , please dont forget to do same for gcp cloud function metrics as well (you have done so far only cloud run metrics) |
| on_failure: | ||
| - set: | ||
| field: error.message | ||
| value: '{{ _ingest.on_failure_message }}' No newline at end of file |
There was a problem hiding this comment.
Could you set event.kind when an error occurs?
on_failure:
- set:
field: error.message
value: "{{{_ingest.on_failure_message}}}"
- append:
field: event.kind
value: pipeline_error
allow_duplicates: false
dmathieu
left a comment
There was a problem hiding this comment.
It seems the GCP API returns metrics with an additional .value to the key. I had to remove them, or I got the following errors:
Cannot index event publisher.Event{Content:beat.Event{Timestamp:time.Date(2023, time.February, 27, 14, 12, 26, 0, time.UTC), Meta:{"input_id":"gcp/metrics-cloudrun_metrics-2d8b7d7f-ea57-42e9-8ea9-ff05aa6ad3e6","raw_index":"metrics-gcp.cloudrun_metrics-default","stream_id":"gcp/metrics-gcp.cloudrun_metrics-2d8b7d7f-ea57-42e9-8ea9-ff05aa6ad3e6"}, Fields:{"agent":{"ephemeral_id":"4c06530f-f1db-478b-a25c-4a6dee50fed6","id":"66b24416-a674-41e0-8343-4188d4b4424d","name":"docker-fleet-agent","type":"metricbeat","version":"8.6.1"},"cloud":{"account":{"id":"elastic-obs-integrations-dev","name":"elastic-obs-integrations-dev"},"provider":"gcp"},"data_stream":{"dataset":"gcp.cloudrun_metrics","namespace":"default","type":"metrics"},"ecs":{"version":"8.0.0"},"elastic_agent":{"id":"66b24416-a674-41e0-8343-4188d4b4424d","snapshot":false,"version":"8.6.1"},"event":{"dataset":"gcp.cloudrun_metrics","duration":324001876,"module":"gcp"},"gcp":{"labels":{"metrics":{"state":"active"},"resource":{"configuration_name":"damien-test-hello","location":"us-central1","revision_name":"damien-test-hello-00001-ped","service_name":"damien-test-hello"}},"metrics":{"container":{"instance_count":{"value":1}}}},"host":{"architecture":"x86_64","containerized":false,"hostname":"docker-fleet-agent","id":"956e4429f62042c2bf337b823882ed6a","ip":["172.22.0.7"],"mac":["02-42-AC-16-00-07"],"name":"docker-fleet-agent","os":{"codename":"focal","family":"debian","kernel":"5.15.49-linuxkit","name":"Ubuntu","platform":"ubuntu","type":"linux","version":"20.04.5 LTS (Focal Fossa)"}},"metricset":{"name":"metrics","period":60000},"service":{"type":"gcp"}}, Private:interface {}(nil), TimeSeries:true}, Flags:0x0, Cache:publisher.EventCache{m:mapstr.M(nil)}} (status=400): {"type":"mapper_parsing_exception","reason":"failed to parse field [gcp.cloudrun_metrics.container.instance.count] of type [long] in document with id 'EdI7k4YB7zWeSt5gEssU'. Preview of field's value: '{value=1}'","caused_by":{"type":"illegal_argument_exception","reason":"Cannot parse object as number"}}, dropping event!
|
While merging main I made an error while fixing the conflict in |
|
Package gcp - 2.19.0 containing this change is available at https://epr.elastic.co/search?package=gcp |
Co-authored-by: Damien Mathieu <damien.mathieu@elastic.co> Co-authored-by: Edoardo Tenani <edoardo.tenani@elastic.co>

What does this PR do?
Adds Cloud Run metrics data stream.
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots