LogStash 5.X Windows service creation

Elastic has changed the command line arguments of logstash. To create a new logstash 5 windows service you have to follow these steps -

$logstash_install_location represents the location of Logstash folder.
logstash is the service name
browse the $logstash_install_location folder and create two folders conf and logs
conf contains all configuration files of logstash. you dont have to change a single file, you can keep as many files you want. such as one for windows logs conf , one for java logs

Open command prompt and locate the folder where NSSM exe file is put. then issue the following commands one after another.

nssm install logstash $logstash_install_location\bin\logstash.bat
nssm set logstash AppParameters --path.config $logstash_install_location\conf
nssm set logstash AppDirectory $logstash_install_location\
nssm set logstash AppStdout $logstash_install_location\logs\sysout.log
nssm set logstash AppStderr $logstash_install_location\logs\syserr.log
nssm set logstash AppStdoutCreationDisposition 2 
nssm set logstash AppStderrCreationDisposition 2 
nssm set logstash AppStopMethodSkip 6

start the windows service and install chrome plug-in of POSTMAN.
Issue the following http methods 
http://localhost:9200/_cat/indices?v

It will show you if any index is created or not.

Comments

Popular posts from this blog

NSSM service eats 100% CPU

JPA Vs SpringJDBC

Ignite Running in Static IP multicast mode