Add_cloud_metadata fails to retrieve instance ID on Oracle Cloud Infrastructure (OCI) in versions after 8.12.0

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:

{
    "@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.

3 Likes

I have the same problem, please help