From 61ea585533aeba837d22e38714fa853d299917c3 Mon Sep 17 00:00:00 2001 From: peter-volkov Date: Fri, 26 Mar 2021 20:27:53 +0300 Subject: [PATCH] use correct compute metadata url to get folder-id (#9056) --- .../outputs/yandex_cloud_monitoring/yandex_cloud_monitoring.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/outputs/yandex_cloud_monitoring/yandex_cloud_monitoring.go b/plugins/outputs/yandex_cloud_monitoring/yandex_cloud_monitoring.go index 95b0bda0f44ea..b3578be904da0 100644 --- a/plugins/outputs/yandex_cloud_monitoring/yandex_cloud_monitoring.go +++ b/plugins/outputs/yandex_cloud_monitoring/yandex_cloud_monitoring.go @@ -60,7 +60,7 @@ const ( defaultRequestTimeout = time.Second * 20 defaultEndpointURL = "https://monitoring.api.cloud.yandex.net/monitoring/v2/data/write" defaultMetadataTokenURL = "http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/token" - defaultMetadataFolderURL = "http://169.254.169.254/computeMetadata/v1/instance/attributes/folder-id" + defaultMetadataFolderURL = "http://169.254.169.254/computeMetadata/v1/yandex/folder-id" ) var sampleConfig = ` @@ -235,6 +235,7 @@ func (a *YandexCloudMonitoring) send(body []byte) error { req.Header.Set("Authorization", "Bearer "+a.IAMToken) a.Log.Debugf("sending metrics to %s", req.URL.String()) + a.Log.Debugf("body: %s", body) resp, err := a.client.Do(req) if err != nil { return err