Skip to content

Commit 517e068

Browse files
committed
set graphite ON by default
1 parent fd8d925 commit 517e068

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cluster/cluster_graphite.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (cluster *Cluster) NewClusterGraphite() {
4242
*/
4343
if _, err := os.Stat(cluster.Conf.WorkingDir + "/" + cluster.Name + "/whitelist.conf"); errors.Is(err, os.ErrNotExist) {
4444
//This will change the default to grafana
45-
if _, ok := cluster.Conf.ImmuableFlagMap["graphite-embedded"]; ok {
45+
if active, ok := cluster.Conf.ImmuableFlagMap["graphite-embedded"]; ok && active.(bool) {
4646
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGraphite, config.LvlWarn, "[Whitelist] failed to read file in cluster %s working dir, change template as grafana due to immutable graphite-embedded exists", cluster.Name)
4747
cluster.Conf.GraphiteWhitelistTemplate = config.ConstGraphiteTemplateGrafana
4848
}

server/server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,8 @@ func (repman *ReplicationManager) AddFlags(flags *pflag.FlagSet, conf *config.Co
656656
flags.IntVar(&conf.GraphiteCarbonPicklePort, "graphite-carbon-pickle-port", 2004, "Graphite Carbon Pickle port")
657657
flags.IntVar(&conf.GraphiteCarbonPprofPort, "graphite-carbon-pprof-port", 7007, "Graphite Carbon Pickle port")
658658
flags.StringVar(&conf.GraphiteCarbonHost, "graphite-carbon-host", "127.0.0.1", "Graphite monitoring host")
659-
flags.BoolVar(&conf.GraphiteMetrics, "graphite-metrics", false, "Enable Graphite monitoring")
660-
flags.BoolVar(&conf.GraphiteEmbedded, "graphite-embedded", false, "Enable Internal Graphite Carbon Server")
659+
flags.BoolVar(&conf.GraphiteMetrics, "graphite-metrics", true, "Enable Graphite monitoring")
660+
flags.BoolVar(&conf.GraphiteEmbedded, "graphite-embedded", true, "Enable Internal Graphite Carbon Server")
661661
flags.BoolVar(&conf.GraphiteWhitelist, "graphite-whitelist", true, "Enable Whitelist")
662662
flags.BoolVar(&conf.GraphiteBlacklist, "graphite-blacklist", false, "Enable Blacklist")
663663
flags.StringVar(&conf.GraphiteWhitelistTemplate, "graphite-whitelist-template", "minimal", "Graphite default template for whitelist (none | minimal | grafana | all)")

0 commit comments

Comments
 (0)