본문 바로가기
빅데이터/flume

[flume] HTTP로 플룸 모니터링 설정하는 방법

by hs_seo 2020. 6. 3.

Flume 에이전트는 HTTP를 이용한 REST API로 플룸 작업 모니터링을 위한 방법을 제공합니다. 기본적으로 JMX, Ganglia, JSON 모니터링과 사용자 커스텀 모니터링 방법을 제공합니다. 여기서는 JSON 모니터링 방법을 알아보겠습니다.

HTTP 모니터링 설정

JSON 모니터링은 에이전트를 실행할 때 flume.monitoring.type, flume.monitoring.port를 설정하는 것으로 간단하게 설정할 수 있습니다. 에이전트를 실행할 때 모니터링 옵션을 설정하여 실행하고, 아래와 같이 curl 명령으로 현재 플룸 에이전트의 상태를 간단하게 모니터링 할 수 있습니다.

# 모니터링 설정 
$ bin/flume-ng agent --conf-file conf/example.conf --name a1 -Dflume.monitoring.type=http -Dflume.monitoring.port=34545

# 모니터링 확인 
$ curl -s http://$(hostname -f):34545/metrics | jq
{
  "CHANNEL.c1": {
    "ChannelCapacity": "1000",
    "ChannelFillPercentage": "0.0",
    "Type": "CHANNEL",
    "ChannelSize": "0",
    "EventTakeSuccessCount": "0",
    "EventTakeAttemptCount": "23",
    "StartTime": "1591148126276",
    "EventPutAttemptCount": "0",
    "EventPutSuccessCount": "0",
    "StopTime": "0"
  }
}

참고

반응형

'빅데이터 > flume' 카테고리의 다른 글

[flume] ChannelFullException 오류 확인  (0) 2020.06.02
[flume] 플룸 구조, 특징  (0) 2019.07.26