Skip to content
This repository has been archived by the owner on Aug 26, 2020. It is now read-only.

Commit

Permalink
partition metric support
Browse files Browse the repository at this point in the history
  • Loading branch information
sundy-li committed Jan 24, 2019
1 parent 698a1b9 commit 08a1a35
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 342 deletions.
20 changes: 4 additions & 16 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (

type Config struct {
General struct {
ClientId string `json:"clientId"`
GroupBlacklist string `json:"groupBlacklist"`
Logconfig string `json:"logconfig"`
Pidfile string `json:"pidfile"`
ClientId string `json:"clientId"`
Logconfig string `json:"logconfig"`
Pidfile string `json:"pidfile"`

TopicFilter string `json:"topicFilter"`
GroupFilter string `json:"groupFilter"`
} `json:"general"`

Influxdb struct {
Expand All @@ -26,23 +26,14 @@ type Config struct {

Kafka map[string]*struct {
Brokers string `json:"brokers"`
Zookeepers string `json:"zookeepers"`
OffsetTopic string `json:"offsetTopic"`
ClientProfile string `json:"ClientProfile"`
OffsetsTopic string `gcfg:"offsetsTopic"`

Sasl struct {
Username string
Password string
}
} `json:"kafka"`

Zookeeper struct {
Hosts string `json:"hosts"`
Lock_path string `json:"lock-path"`
Timeout int `json:"timeout"`
} `json:"zookeeper"`

ClientProfile map[string]*Profile `json:"ClientProfile"`
}

Expand Down Expand Up @@ -78,9 +69,6 @@ func (cfg *Config) Init() {
}

for _, k := range cfg.Kafka {
if k.OffsetTopic == "" {
k.OffsetTopic = "__consumer_offsets"
}
if k.ClientProfile == "" {
k.ClientProfile = "default"
}
Expand Down
11 changes: 4 additions & 7 deletions config/server.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"logconfig": "config/logging.xml",
"pidfile": "burrowx.pid",
"clientId": "burrowx-lagchecker",
"groupBlacklist": "^(console-consumer-|python-kafka-consumer-).*$",


"@desc" : "topic filter regexes, separate by `,`, could be .* or empty string",
"topicFilter" : ".*",
"@desc" : "topic => consumer groups",
"topic2Consumers" : {
"topic_aa" : [ "consumer_a", "consumer_b"]
},

"@desc" : "client infos, such as tls",
"clientProfile" : {
Expand All @@ -29,9 +29,6 @@
"kafka": {
"local": {
"brokers": "localhost:9092",
"zookeepers": "localhost:2181",
"offsetsTopic": "__consumer_offsets",

"@desc" : "client info key to client infos",
"clientProfile": ""
}
Expand Down
Loading

0 comments on commit 08a1a35

Please sign in to comment.