feat(outputs.nebius_cloud_monitoring): Add 'service' configuration setting (#14658)

This commit is contained in:
Anton Brekhov 2024-02-22 10:17:24 +02:00 committed by GitHub
parent c475771993
commit 32b8ad5662
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import (
"fmt"
"io"
"net/http"
"os"
"time"
"github.com/influxdata/telegraf"
@ -86,6 +87,9 @@ func (a *NebiusCloudMonitoring) Init() error {
if a.service == "" {
a.service = "custom"
}
if service := os.Getenv("NEBIUS_SERVICE"); service != "" {
a.service = service
}
if a.metadataTokenURL == "" {
a.metadataTokenURL = defaultMetadataTokenURL
}

View File

@ -4,4 +4,4 @@
# timeout = "20s"
## Nebius.Cloud monitoring API endpoint. Normally should not be changed
# endpoint = "https://monitoring.api.il.nebius.cloud/monitoring/v2/data/write"
# endpoint = "https://monitoring.api.il.nebius.cloud/monitoring/v2/data/write"