Skip to content

Commit

Permalink
fix(plugins/ecs): ECS v3 endpoint environment var is documented with …
Browse files Browse the repository at this point in the history
…debug info

Fix ECS plugin to inform user when v3 endpoint is unavailable (no found
environment variable)

issue #CIRC-8361

* Tags: ecs input plugin v3 env
  • Loading branch information
aesca1er committed Jun 3, 2022
1 parent 31c4c17 commit 53f6a7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/inputs/ecs/ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package ecs
import (
"context"
"fmt"
"log"
"os"
"strings"
"time"
Expand Down Expand Up @@ -163,6 +164,8 @@ func resolveEndpoint(ecs *Ecs) {
return
}

log.Print("I! ECS_CONTAINER_METADATA_URI Environment var is unset, using v2 ecs endpoint")

// Use v2 endpoint if nothing else is available.
ecs.EndpointURL = v2Endpoint
ecs.metadataVersion = 2
Expand Down

0 comments on commit 53f6a7e

Please sign in to comment.