# Add\_cloud\_metadata fails to retrieve instance ID on Oracle Cloud Infrastructure (OCI) in versions after 8.12.0

**URL:** <https://discuss.elastic.co/t/add-cloud-metadata-fails-to-retrieve-instance-id-on-oracle-cloud-infrastructure-oci-in-versions-after-8-12-0/375731>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [March 11, 2025, 7:27pm UTC](https://discuss.elastic.co/t/add-cloud-metadata-fails-to-retrieve-instance-id-on-oracle-cloud-infrastructure-oci-in-versions-after-8-12-0/375731 "2025-03-11T19:27:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel\_ferraz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_ferraz/32/141964_2.png) [@daniel\_ferraz](https://discuss.elastic.co/u/daniel_ferraz)\
**Post date:** [March 11, 2025, 7:27pm UTC](https://discuss.elastic.co/t/add-cloud-metadata-fails-to-retrieve-instance-id-on-oracle-cloud-infrastructure-oci-in-versions-after-8-12-0/375731/1 "2025-03-11T19:27:11Z")

</div>

I’m opening this discussion to address a regression in Metricbeat versions after `8.12.0`, particularly `8.12.2` and later, where instance IDs for OCI are no longer retrieved. In version 8.12.0, these were correctly fetched despite the cloud provider being misidentified as Huawei.

Steps to Reproduce

```
1. Deploy an OCI k8s cluster.
2. Install Metricbeat 8.12.0 with the add_cloud_metadata processor configured, and verify the instance ID is retrieved on the field cloud.instance.id.
3. Upgrade to 8.12.2 or later and observe the failure.

```

The expected output in 8.12.0 includes the cloud metadata with the instance ID (e.g., ocid1.instance.oc1...) under cloud.instance.id, while in later versions, the entire cloud section is absent.

Example from 8.12.0:

```JSON
{
    "@timestamp": "2025-03-11T15:24:56.064Z",
    "@metadata": {...},
    "cloud": {
        "provider": "huawei",
        "instance": {
            "id": "ocid1.instance.oc1.sa-saopaulo-1.antxeljr..."
        },
        "region": "",
        "availability_zone": "sa-saopaulo-1-ad-1",
        "service": {
            "name": "ECS"
        }
    },
    "metricset": {...},
        ...
}

```

This issue impacts, for example, users relying on instance ID for cost monitoring, and the request is to restore the 8.12.0 behavior. While fully implementing OCI support in the add\_cloud\_metadata processor would be great, it might not be as easy and fast as to simply make it work as before, which would already solve the problem.

---

<div class="post-metadata">

**Author:** ![Vinicius\_Hoffmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinicius_hoffmann/32/142002_2.png) [@Vinicius\_Hoffmann](https://discuss.elastic.co/u/Vinicius_Hoffmann)\
**Post date:** [March 12, 2025, 7:06pm UTC](https://discuss.elastic.co/t/add-cloud-metadata-fails-to-retrieve-instance-id-on-oracle-cloud-infrastructure-oci-in-versions-after-8-12-0/375731/2 "2025-03-12T19:06:33Z")

</div>

I have the same problem, please help
