Hi all, I was just trying to create a monitoring service of my own for Kafka. I wanted to know if Kafka provides any sort of functionality for pid files which I can see to check if Kafka is up or not.
My scenario is:
I will have 2 Kafka instances running on same machine with different configurations i.e. their home directories will be different. I want to start a specific Kafka instance if any one of the two gets killed. So I wanted to know which Kafka instance is down. So, how I can I get the PID of a particular Kafka instance ?
On linux, "echo $! > pid.txt" will save the PID of the previous background job to a file. If you run java to launch kafka directly rather than using the provided scripts, it can save process pid into the file.
NEW: Monitor These Apps!
Apache Lucene, Apache Solr and all other Apache Software Foundation project and their respective logos are trademarks of the Apache Software Foundation.
Elasticsearch, Kibana, Logstash, and Beats are trademarks of Elasticsearch BV, registered in the U.S. and in other countries. This site and Sematext Group is in no way affiliated with Elasticsearch BV.
Service operated by Sematext