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

Install and configure KafkaT #2

Open
dazza-codes opened this issue Aug 25, 2017 · 0 comments
Open

Install and configure KafkaT #2

dazza-codes opened this issue Aug 25, 2017 · 0 comments

Comments

@dazza-codes
Copy link
Owner

dazza-codes commented Aug 25, 2017

https://github.com/airbnb/kafkat

KafkaT is from Airbnb - it makes it easier to view details about a Kafka cluster and also perform a few administrative tasks from the command line.

Install

As it is a Ruby gem, you need Ruby to use it. You will also need the build-essential package to be able to build the other gems it depends on. Install them using apt-get:

sudo apt-get install ruby ruby-dev build-essential

You can now install KafkaT using the gem command:

sudo gem install kafkat --source https://rubygems.org --no-ri --no-rdoc

Configure

Use vi to create a new file in ~/.kafkatcfg and/or /etc/kafkatcfg.

vi ~/.kafkatcfg

This is a configuration file which KafkaT uses to determine the installation and log directories of your Kafka server. It should also point KafkaT to your ZooKeeper instance. Accordingly, add the following lines to it:

# ~/.kafkatcfg or /etc/kafkatcfg
{
  "kafka_path": "~/kafka",
  "log_path": "/tmp/kafka-logs",
  "zk_path": "localhost:2181"
}

Another example:

{
  "kafka_path": "/srv/kafka/kafka_2.10-0.8.1.1",
  "log_path": "/mnt/kafka-logs",
  "zk_path": "zk0.foo.ca:2181,zk1.foo.ca:2181,zk2.foo.ca:2181/kafka"
}

Use

You are now ready to use KafkaT. For a start, here's how you would use it to view details about all Kafka partitions:

$ kafkat partitions
output of kafkat partitions
Topic           Partition   Leader      Replicas        ISRs    
TutorialTopic   0             0           [0]           [0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant