|
|
@ -171,6 +171,7 @@ var ( |
|
|
|
prometheusIPFlag, |
|
|
|
prometheusIPFlag, |
|
|
|
prometheusPortFlag, |
|
|
|
prometheusPortFlag, |
|
|
|
prometheusGatewayFlag, |
|
|
|
prometheusGatewayFlag, |
|
|
|
|
|
|
|
prometheusEnablePushFlag, |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -1211,6 +1212,11 @@ var ( |
|
|
|
Usage: "prometheus pushgateway URL", |
|
|
|
Usage: "prometheus pushgateway URL", |
|
|
|
DefValue: defaultConfig.Prometheus.Gateway, |
|
|
|
DefValue: defaultConfig.Prometheus.Gateway, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
prometheusEnablePushFlag = cli.BoolFlag{ |
|
|
|
|
|
|
|
Name: "prometheus.push", |
|
|
|
|
|
|
|
Usage: "enable prometheus pushgateway", |
|
|
|
|
|
|
|
DefValue: defaultConfig.Prometheus.EnablePush, |
|
|
|
|
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func applyPrometheusFlags(cmd *cobra.Command, config *harmonyConfig) { |
|
|
|
func applyPrometheusFlags(cmd *cobra.Command, config *harmonyConfig) { |
|
|
@ -1234,4 +1240,7 @@ func applyPrometheusFlags(cmd *cobra.Command, config *harmonyConfig) { |
|
|
|
if cli.IsFlagChanged(cmd, prometheusGatewayFlag) { |
|
|
|
if cli.IsFlagChanged(cmd, prometheusGatewayFlag) { |
|
|
|
config.Prometheus.Gateway = cli.GetStringFlagValue(cmd, prometheusGatewayFlag) |
|
|
|
config.Prometheus.Gateway = cli.GetStringFlagValue(cmd, prometheusGatewayFlag) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if cli.IsFlagChanged(cmd, prometheusEnablePushFlag) { |
|
|
|
|
|
|
|
config.Prometheus.EnablePush = cli.GetBoolFlagValue(cmd, prometheusEnablePushFlag) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|