Created
May 13, 2015 10:53
-
-
Save elvarb/d7393e041f4ce7e7bff4 to your computer and use it in GitHub Desktop.
Logstash on Windows
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
Download the following | |
* Logstash https://www.elastic.co/downloads/logstash | |
* Java JDK http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | |
* NSSM https://nssm.cc/ | |
Create this folder structure | |
\Logstash | |
\Logstash\config | |
\Logstash\java | |
Extract the Logstash version under \Logstash so that it creates for example \Logstash\logstash-1.4.2 | |
Extract the JDK under \Logstash\java so it creates for example \Logstash\java\jdk1.8.0_31 | |
Extract nssm.exe to \Logstash | |
Create \Logstash\Logstash.bat | |
set ES_MIN_MEM=256m | |
set ES_MAX_MEM=1g | |
set JAVA_HOME=C:\Logstash\java\jdk1.8.0_31 | |
cd C:\Logstash\logstash-1.4.2 | |
C:\Logstash\logstash-1.4.2\bin\logstash.bat agent --config config --log logstash.log | |
Logstash will use Java from \Logstash\java\, read all config files in \Logstash\config and log to \Logstash\logstash.log | |
Run nssm.exe to create a service that points to your bat file. | |
Upgrading Java is done by extracting a new JDK version into the java folder, modify the bat file and restarting the service. | |
Upgrading Logstash is the same process. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment