mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
Merge pull request #178 from safing/feature/remove-metrics-instance-name-on-export
Remove metrics instance name on export
This commit is contained in:
commit
ff88d9e486
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue