td-agent 3 beta를 Windows에서 시도했습니다.

3759 단어 Fluentd

td-agent 3의 beta가 출시되었으므로 Windows에서 시도했습니다.



검증 환경은 다음과 같습니다.





Treasure Agent 3 has been released!



Windows 버전 사용



td-agent 3는 Windows를 지원하므로 조속히 시도했습니다!
우선은 공식 가이드를 따라 도입해 보겠습니다.
htp : // cs. f 엔 td. 오 rg / v0.

Step1: Install td-agent



링크에서 설치 프로그램을 다운로드합니다.
h tps : // td-Agen t-pa c ka-b w wr. 어리석은 p. 코 m / 3 / 우동 ws


설치 프로그램을 실행합니다.


기본값은 C:\opt\에 설치된 것 같습니다.


부드럽게 설치되었습니다!

Step2: Run td-agent from Command Prompt



테스트용 구성을 준비하고 다음 이름으로 저장합니다.
c:\opt\td-agent\conf\td-agent.conf
<source>
  @type forward
</source>
<match test.**>
  @type stdout
</match>

[시작 메뉴] [모든 프로그램] [Td-agent] [Td-agent Command Prompt]를 시작합니다.
> fluentd -c conf\td-agent.conf

Td-agent Command Prompt에서 메시지를 보냅니다.
> echo {"message":"hello"} | fluent-cat test.event



움직였습니다!

Step3: Register td-agent to Windows service



서비스 등록은 이전과 동일한 명령이었습니다.
> fluentd --reg-winsvc i
> fluentd --reg-winsvc-fluentdopt '-c C:/opt/td-agent/conf/td-agent.conf -o C:/opt/td-agent/td-agent.log'

※관리자 권한으로 Td-agent Command Prompt를 기동하지 않으면 권한의 에러 「Input/Output error - OpenSCManager: Access is denied.」가 나왔습니다.


※ 이미 fluentd가 서비스에 등록되어 있는 경우는 「The specified service already exists.」가 나옵니다.
내 환경에는 이전에 설치했기 때문에 출력되어 버렸습니다.


이 경우, 다음의 순서로 한번 서비스에서 삭제한 후 다시 등록을 함으로써 등록할 수 있었습니다.
> fluentd --reg-winsvc u
> fluentd --reg-winsvc i

Step4: Run td-agent as Windows service



여기에서는 서비스에서 Fluentd Windows Service를 선택하여 자동 시작하거나 서비스를 시작합니다.


Step5: Install Plugins



그리고는 좋아하는 플러그인을 넣어 사용합시다!

요약



지금까지 Windows에서 fluentd를 움직이는 경우는, ruby나 git를 인스톨 하거나, fluentd를 컴파일 하는 등 여러가지 번거로웠습니다만, 놀랍도록 간단하게 사용할 수 있게 되어 감동했습니다!
시도뿐만 아니라 제대로 사용하여 뭔가 커뮤니티에 피드백할 수 있다고 생각합니다.

좋은 웹페이지 즐겨찾기