Commands
#Kafka
#Starting the server
./kafka/bin/kafka-server-start.sh ~/kafka/config/kraft/server.properties
#Stop the server
./kafka/bin/kafka-server-stop.sh
#Listing all the topics
./kafka/bin/kafka-topics.sh --list --bootstrap-server localhost:9092
#Creating a topic
./kafka/bin/kafka-topics.sh --create --topic logstash_topic --bootstrap-server
localhost:9092
#Deleting a topic
./kafka/bin/kafka-topics.sh --delete --topic logstash_topic --bootstrap-server
localhost:9092
#Producing data/logs to a topic
./kafka/bin/kafka-console-producer.sh --bootstrap-server localhost:9092 --topic
logstash_topic
#Consuming logs from a topic
./kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic
logstash_topic --from-beginning
#Flink
#To start a flink cluster
./flink/bin/start-cluster.sh
#To stop a flink cluster
./flink/bin/stop-cluster.sh
#To run the flink job
./flink/bin/flink run -m localhost:8081
/mnt/c/Users/gchet/Downloads/projects/kafka-flink-demo/target/kafka-flink-demo-1.0-
SNAPSHOT.jar
#To check currently running jobs
./flink/bin/flink list -m localhost:8081
#To cancel the flink job
./flink/bin/flink cancel -m localhost:8081 <JOB_ID>
#Logstash
#To edit the configuration file of logstash
sudo nano /etc/logstash/conf.d/logstash.conf
#To edit the file which is fed into logstash
nano logstash_data/logstash_input.log
#To run logstash
/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf