diff --git a/modules/agent/g/cfg.go b/modules/agent/g/cfg.go index 03cc4afd4..c3e01818b 100644 --- a/modules/agent/g/cfg.go +++ b/modules/agent/g/cfg.go @@ -72,6 +72,11 @@ func Hostname() (string, error) { return hostname, nil } + if os.Getenv("FALCON_ENDPOINT") != "" { + hostname = os.Getenv("FALCON_ENDPOINT") + return hostname, nil + } + hostname, err := os.Hostname() if err != nil { log.Println("ERROR: os.Hostname() fail", err)