From e393dac9c370e62ac7466f4eb87de3c24b3e0fe0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 5 Aug 2022 14:53:13 +0200 Subject: [PATCH] Remove metrics instance name on export --- config/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/main.go b/config/main.go index ac2881d..ea55a18 100644 --- a/config/main.go +++ b/config/main.go @@ -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