Add hostname to configuration
parent
8421316374
commit
8b3b1d42ca
|
@ -1,5 +1,10 @@
|
|||
# Welcome to the InfluxDB configuration file.
|
||||
|
||||
# If hostname (on the OS) doesn't return a name that can be resolved by the other
|
||||
# systems in the cluster, you'll have to set the hostname to an IP or something
|
||||
# that can be resovled here.
|
||||
# hostname = ""
|
||||
|
||||
[logging]
|
||||
# logging level can be one of "debug", "info", "warn" or "error"
|
||||
# level = "info"
|
||||
|
|
|
@ -46,6 +46,7 @@ func parseTomlConfiguration(filename string) (*Configuration, error) {
|
|||
protobufPort := configSet.Int("cluster.protobuf_port", 8099)
|
||||
logFile := configSet.String("logging.file", "influxdb.log")
|
||||
logLevel := configSet.String("logging.level", "info")
|
||||
hostname := configSet.String("hostname", "")
|
||||
|
||||
if err := configSet.Parse(filename); err != nil {
|
||||
return nil, err
|
||||
|
@ -61,6 +62,7 @@ func parseTomlConfiguration(filename string) (*Configuration, error) {
|
|||
DataDir: *dataDir,
|
||||
LogFile: *logFile,
|
||||
LogLevel: *logLevel,
|
||||
Hostname: *hostname,
|
||||
}
|
||||
|
||||
servers := strings.Split(*seedServers, ",")
|
||||
|
|
Loading…
Reference in New Issue