mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
Remove metrics instance name on export
This commit is contained in:
parent
866cd484c4
commit
e393dac9c3
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