Merge pull request #178 from safing/feature/remove-metrics-instance-name-on-export

Remove metrics instance name on export
This commit is contained in:
Daniel 2022-08-27 13:16:03 +02:00 committed by GitHub
commit ff88d9e486
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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