Created
October 12, 2021 20:53
-
-
Save ryanvgates/facd3c996b637ab18a5dd8a06e2c0058 to your computer and use it in GitHub Desktop.
Monit for ElasticSearch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt install monit && \ | |
sudo systemctl enable monit && \ | |
echo ' | |
check process elasticsearch with pidfile /var/run/elasticsearch/elasticsearch.pid | |
start program = "/bin/systemctl start elasticsearch.service" | |
stop program = "/bin/systemctl stop elasticsearch.service"' | sudo tee /etc/monit/conf.d/elasticsearch-monitrc && \ | |
sudo systemctl stop monit.service && \ | |
sudo systemctl start monit.service && \ | |
sudo systemctl status monit.service && \ | |
sudo systemctl status elasticsearch.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment