Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support zk string include chroot #168

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions kafka_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type kafkaOpts struct {
tlsInsecureSkipTLSVerify bool
kafkaVersion string
useZooKeeperLag bool
uriZookeeper []string
uriZookeeper string
labels string
metadataRefreshInterval string
}
Expand Down Expand Up @@ -183,7 +183,7 @@ func NewExporter(opts kafkaOpts, topicFilter string, groupFilter string) (*Expor
}

if opts.useZooKeeperLag {
zookeeperClient, err = kazoo.NewKazoo(opts.uriZookeeper, nil)
zookeeperClient, err = kazoo.NewKazooFromConnectionString(opts.uriZookeeper, nil)
}

interval, err := time.ParseDuration(opts.metadataRefreshInterval)
Expand Down Expand Up @@ -505,7 +505,7 @@ func main() {
kingpin.Flag("tls.insecure-skip-tls-verify", "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.").Default("false").BoolVar(&opts.tlsInsecureSkipTLSVerify)
kingpin.Flag("kafka.version", "Kafka broker version").Default(sarama.V1_0_0_0.String()).StringVar(&opts.kafkaVersion)
kingpin.Flag("use.consumelag.zookeeper", "if you need to use a group from zookeeper").Default("false").BoolVar(&opts.useZooKeeperLag)
kingpin.Flag("zookeeper.server", "Address (hosts) of zookeeper server.").Default("localhost:2181").StringsVar(&opts.uriZookeeper)
kingpin.Flag("zookeeper.server", "Address (hosts) of zookeeper server.").Default("localhost:2181").StringVar(&opts.uriZookeeper)
kingpin.Flag("kafka.labels", "Kafka cluster name").Default("").StringVar(&opts.labels)
kingpin.Flag("refresh.metadata", "Metadata refresh interval").Default("30s").StringVar(&opts.metadataRefreshInterval)

Expand Down Expand Up @@ -601,7 +601,7 @@ func main() {
consumergroupLagZookeeper = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "consumergroupzookeeper", "lag_zookeeper"),
"Current Approximate Lag(zookeeper) of a ConsumerGroup at Topic/Partition",
[]string{"consumergroup", "topic", "partition"}, nil,
[]string{"consumergroup", "topic", "partition"}, labels,
)

consumergroupLagSum = prometheus.NewDesc(
Expand Down