Record-linux installation supervisor to monitor Elasticsearch

Source: Internet
Author: User
Tags log log

1. Installing Supervisor

Easy_install Supervisor

2. Configure Supervisor

Mkdir/etc/supervisor
echo_supervisord_conf >/etc/supervisor/supervisord.conf
cd/etc/supervisor/
mkdir CONF.D
CD conf.d/
Touch elastic.conf
Vim elastic.conf

Then enter the contents below to save the exit

[Program:elastic]
command= sh/home/qukan/elasticsearch-5.5.3/bin/elasticsearch; command to run the program
Autorestart=true; Program quits unexpectedly if auto-restart
Autostart=true; Whether to start automatically
Stderr_logfile=/var/log/elastic.err.log; Error log file
Stdout_logfile=/var/log/elastic.out.log; Output log file
environment=java_home=/usr/lib/java/jdk1.8.0_144; Process Environment variables
User=qukan; User identity for Process execution
Startsecs=1; Automatic restart Interval

Description

User-specified to start with

Environment specify Java_home, I did not specify this environment variable to cause startup failure, by viewing the/var/log/elastic.out.log log file found could not find Java; Set Java_home or ensure JAVA is in PATH, so setting environment variables here

Then modify the/etc/supervisor/supervisord.conf file to put the final

; [include]
; files = Relative/directory/*.ini

Switch

[include]
Files = conf.d/*.conf

Include the above configuration file in

3. Run the command to start supervisor

sudo supervisord-c/etc/supervisor/supervisord.conf

4. Run the command to view the managed process

Supervisorctl status

As shown

All right, perfect!

More details, explore for yourself!

Resources:

Https://www.cnblogs.com/zhoujinyi/p/6073705.html

Https://www.cnblogs.com/Hai--D/p/5820718.html

http://blog.51cto.com/lixcto/1539136

Record-linux installation supervisor to monitor Elasticsearch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.