From a3f2809339381459ee9da8829d265f37a294f52c Mon Sep 17 00:00:00 2001 From: Jacky Wu Date: Tue, 14 Sep 2021 18:47:10 +0800 Subject: [PATCH] fix: correct meta host var name. --- .../processors/add_cloud_metadata/provider_huawei_cloud.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go b/libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go index b8308abe35a..01a87b19c15 100644 --- a/libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go +++ b/libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go @@ -45,7 +45,7 @@ var huaweiMetadataFetcher = provider{ Local: true, Create: func(_ string, c *common.Config) (metadataFetcher, error) { - huaweiCloudMetadataHost := "169.254.169.254" + metadataHost := "169.254.169.254" huaweiCloudMetadataJSONURI := "/openstack/latest/meta_data.json" huaweiCloudSchema := func(m map[string]interface{}) common.MapStr { @@ -55,7 +55,7 @@ var huaweiMetadataFetcher = provider{ return common.MapStr{"cloud": m} } - urls, err := getMetadataURLs(c, huaweiCloudMetadataHost, []string{ + urls, err := getMetadataURLs(c, metadataHost, []string{ huaweiCloudMetadataJSONURI, }) if err != nil {