We are running logstash version 5.5.0 on a RHEL 6.10 fully patched host.
Oddly when I deploy the ELK stack all the other applications get init scripts put in /etc/init.d however logstash seems to put it's script in /usr/share/logstash/bin.
This has made automation via puppet difficult.
The online Elasticsearch documentation found hereseems to suggest that for a RHEL 6.10 system using /sbin/init to start/stop the process you would use /etc/init.d/logstash stop/start/status etc (service logstash command).
However this is where it gets weird, on my system logstash is responding to initctl commands which as far as I know are not used by RHEL 6.10.
When I tried to automate the deployment of logstash via puppet I get a message that upstart is not a provider on this host!! And yet the upstart commands work on the cmd-line.
I have built my own init script to set the boot level for the service as well as control it via /sbin/init which in turn has enabled me to automate the process via puppet.
However why is the installation of logstash not auto generating an init script as it does for the other elements of the ELK stack?
Well you are right there is a logstash.conf file within /etc/init however there are no other .conf files in here for the other services in the ELK stack.
They are in /etc/init.d
The problem is this..... inictl is an upstart thing.
In puppet if I specify the provider as upstart when puppet runs it just complains that the host isn't an upstart host.
Which is why I went down this route of creating a more traditional init style service by creating my own init script in /etc/init.d
It works..... I'm just confused why there seems to be a difference with logstash compared to the other elements of the ELK stack.
Hi,
In fact the rpm package does provide a daemon, but not in the same way that the older versions (If I remember well changes came in release 5.6).
You need first to select the init system to use (systemd, sysv, upstart..) and fill the /etc/logstash/startup.options that allows you tu customize a bit your logstash.
Then run the /usr/share/logstash/bin/system-install script and the daemon will be set with your custom values (and there will be a script in init.d)
You need to provide as arguments:
the path to startup.options file
the system you use among sysv, systemd or upstart.
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.