feat(outputs.nebius_cloud_monitoring): Add 'service' configuration setting (#14658)
This commit is contained in:
parent
c475771993
commit
32b8ad5662
|
|
@ -8,6 +8,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/influxdata/telegraf"
|
"github.com/influxdata/telegraf"
|
||||||
|
|
@ -86,6 +87,9 @@ func (a *NebiusCloudMonitoring) Init() error {
|
||||||
if a.service == "" {
|
if a.service == "" {
|
||||||
a.service = "custom"
|
a.service = "custom"
|
||||||
}
|
}
|
||||||
|
if service := os.Getenv("NEBIUS_SERVICE"); service != "" {
|
||||||
|
a.service = service
|
||||||
|
}
|
||||||
if a.metadataTokenURL == "" {
|
if a.metadataTokenURL == "" {
|
||||||
a.metadataTokenURL = defaultMetadataTokenURL
|
a.metadataTokenURL = defaultMetadataTokenURL
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,4 @@
|
||||||
# timeout = "20s"
|
# timeout = "20s"
|
||||||
|
|
||||||
## Nebius.Cloud monitoring API endpoint. Normally should not be changed
|
## 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"
|
||||||
Loading…
Reference in New Issue