Skip to content

Commit

Permalink
Fix Kafka configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredscheib authored and desa committed May 4, 2018
1 parent 761f380 commit ce0597a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etc/kapacitor/kapacitor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,13 @@ default-retention-policy = ""
brokers = []
# Timeout on network operations with the brokers.
# If 0 a default of 10s will be used.
timeout = 10s
timeout = "10s"
# BatchSize is the number of messages that are batched before being sent to Kafka
# If 0 a default of 100 will be used.
batch-size = 100
# BatchTimeout is the maximum amount of time to wait before flushing an incomplete batch.
# If 0 a default of 1s will be used.
batch-timeout = 1s
batch-timeout = "1s"
# Use SSL enables ssl communication.
# Must be true for the other ssl options to take effect.
use-ssl = false
Expand Down
1 change: 1 addition & 0 deletions server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func NewConfig() *Config {

c.Alerta = alerta.NewConfig()
c.HipChat = hipchat.NewConfig()
c.Kafka = kafka.Configs{kafka.NewConfig()}
c.MQTT = mqtt.Configs{mqtt.NewConfig()}
c.OpsGenie = opsgenie.NewConfig()
c.OpsGenie2 = opsgenie2.NewConfig()
Expand Down
6 changes: 6 additions & 0 deletions services/kafka/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ type Config struct {
InsecureSkipVerify bool `toml:"insecure-skip-verify" override:"insecure-skip-verify"`
}

func NewConfig() Config {
return Config{
Enabled: false,
}
}

func (c Config) Validate() error {
if !c.Enabled {
return nil
Expand Down

0 comments on commit ce0597a

Please sign in to comment.