2015-02-04 1 views

답변

1

Non-Sucking Service Manager을 사용하여 logstash를 Windows 서비스로 설치하십시오. 활성 사용자 로그인없이 부팅 할 때 서비스를 시작할 수 있습니다.

+0

안녕하세요, Frank. 도와 주셔서 감사합니다. 그러나 NSSM은 시작되지 않았습니다. START 제어에 대한 응답으로 예기치 않은 상태 SERVICE_STOPPED. 인수 필드에 logstash start 명령 (logstash 에이전트 -f 웹)을 지정했습니다. –

0

Windows 서비스 래퍼 (https://github.com/kohsuke/winsw)를 사용할 수 있습니다.

단순한 wsw.exe를 logstash bin 디렉토리에 놓고 logstash.exe로 이름을 바꾼 다음 구성 xml 파일에 대해 동일한 작업을 수행하십시오. 따라서 logstash.exe 및 logstash.xml 파일은 logstash의 bin 디렉토리에 있습니다.

이제 xml 파일을 약간 조정해야합니다. 광산이 (당신의 필요에 맞게 조정할)처럼 보이는 : 그런 다음

<configuration> 
    <id>logstash</id> 
    <name>Logstash</name> 
    <description>Logstash from elastic.co</description> 
    <executable>D:\logstash\bin\logstash.bat</executable> 
    <arguments></arguments> 
    <serviceaccount> 
    <domain>local</domain> 
    <user>waffel</user> 
    <password>XXX</password>--> 
    </serviceaccount> 
    <onfailure action="restart" delay="10 sec"/> 
    <onfailure action="restart" delay="20 sec"/> 
    <onfailure action="none" /> 
    <resetfailure>1 hour</resetfailure> 
    <priority>Normal</priority> 
    <stoptimeout>15 sec</stoptimeout> 
    <stopparentprocessfirst>false</stopparentprocessfirst> 
    <startmode>Automatic</startmode> 
    <waithint>15 sec</waithint> 
    <sleeptime>1 sec</sleeptime> 
    <logpath>D:\logstash\logs</logpath> 
    <log mode="append"/> 
    <env name="JAVA_HOME" value="D:\jdk8x64" /> 
</configuration> 

할 수 있습니다

logstash.exe test 

(관리자) 또는 서비스

logstash.exe install 

를 설치하는 cmd를에서 간단한 히트 cmd (또는 서비스 관리)에서 실행할 수 있습니다.

logstash.exe start 
logstash.exe stop 

잠재적 인 오류에 대한 로그 파일을 hatch 할 수 있습니다. Logstash 5.5.1에서 잘 작동합니다.

관련 문제