Remove metrics instance name on export

This commit is contained in:
Daniel 2022-08-05 14:53:13 +02:00
parent 866cd484c4
commit e393dac9c3

View file

@ -75,6 +75,14 @@ func start() error {
}
func exportConfigCmd() error {
// Reset the metrics instance name option, as the default
// is set to the current hostname.
// Config key copied from metrics.CfgOptionInstanceKey.
option, err := GetOption("core/metrics/instance")
if err == nil {
option.DefaultValue = ""
}
data, err := json.MarshalIndent(ExportOptions(), "", " ")
if err != nil {
return err