Skip to content

Commit

Permalink
use correct compute metadata url to get folder-id (influxdata#9056)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-volkov authored Mar 26, 2021
1 parent fdde908 commit 61ea585
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = `
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 61ea585

Please sign in to comment.