Hi everyone!
I have a setup of the elk stack (I don't use any beats or other members of the elastic stack) that start and stop not via deamon or system ctl, rather directly from the respective bin and scripts.
When I start elastic or kibana, I need to find out what is the PID.
One way to achieve that is to use something like:
ps -ef | grep elasticsearch
ps -ef | grep kibana
The risk is that I assume that there are no folders/other processes with the words grep is looking for.
The second option I tried was to check the PID file. Both kibana and elastic generated PID file in this path ~/deployment/folder/path/logs/elastic(kibana).pid
But I noticed something strange:
Kibana updated its pid whenever I started/stoped it, and the pid was consistent between the first pid finding method and the second one.
In elastic, on the other hand, the pid file was not updated each time, the same number is stored in the file, and the ps method generated the correct pid.
Why does elastic does not update the pid file?
Is there a place I can configure elastic to update the pid file?
I use elastic/kibana v6.2 with the default yml files.
I read that on the elastic docs, but for some reason, no file is generated. Plus, I would need to run this script every time I start elastic, and I would rather that elastic will handle this automaticly.
With this setting, the file was created anew with the correct contents each time Elasticsearch was started, and removed when Elasticsearch stopped. I was using 7.3.0 but this looks to be quite an old feature.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.