Description
I am running a large number of instances in AWS which have multiple beat agents running on them (metricbeat, winlogbeat and filebeat). A small percentage of instances are starting up and detecting that they are running on 'openstack' instead of 'ec2' (ie, meta.cloud.provider=openstack
).
Looking through the code and the way the cloud platform is detected, it's not very surprising that this is occurring as it looks like the endpoints/paths used by EC2 and Openstack both collide with each other. This appears to be have been briefly discussed as a potential issue in the original pull request that added Openstack as a cloud provider: #7663 (comment) but it doesn't look like the concern was addressed.
Perhaps using the non-ec2 compatible Openstack metadata endpoint would be a simple solution to avoid this?
https://docs.openstack.org/nova/latest/user/metadata.html#metadata-openstack-format
Version:
libbeat v6.8.2
Operating System:
Experienced on Windows but would affect all.
Discuss Forum URL:
Not created by me but a pre-existing one:
https://discuss.elastic.co/t/add-cloud-metadata-wrong-provider/189780
Steps to reproduce:
Starting beat on AWS EC2 instances can sometimes result in openstack
being identified as the provider
:
INFO add_cloud_metadata/add_cloud_metadata.go:323 add_cloud_metadata: hosting provider type detected as openstack, metadata={"availability_zone":"ap-southeast-2a","instance_id":"i-xxxxxxxxxxxxxxx","instance_name":"ip-10-xx-xx-xx","machine_type":"r5d.2xlarge","provider":"openstack"}