fuse,camel jolokia + metricbeat 설정
- module: jolokia
metricsets: ["jmx"]
period: 10s
hosts: ["192.168.1.229:9991","192.168.1.229:9992","192.168.1.229:9993"]
namespace: "jolokia-fuse"
path: "/jolokia"
#path: "/jolokia/?ignoreErrors=true&canonicalNaming=false"
#username: "user"
#password: "secret"
jmx.mappings:
# - mbean: 'java.lang:type=Runtime'
# attributes:
# - attr: Uptime
# field: uptime
# - mbean: 'java.lang:type=Memory'
# attributes:
# - attr: HeapMemoryUsage
# field: memory.heap_usage
# - attr: NonHeapMemoryUsage
# field: memory.non_heap_usage
# GC Metrics - this depends on what is available on your JVM
#- mbean: 'java.lang:type=GarbageCollector,name=ConcurrentMarkSweep'
# attributes:
# - attr: CollectionTime
# field: gc.cms_collection_time
# - attr: CollectionCount
# field: gc.cms_collection_count
- mbean: 'org.apache.camel:type=routes,name=*,context=*'
attributes:
- attr: CamelId
field: camel.camel_id
event: camel
- attr: RouteId
field: camel.route_id
event: camel
- attr: Uptime
field: camel.uptime
event: camel
- attr: ExchangesCompleted
field: camel.exchanges_completed
event: camel
- attr: ExchangesFailed
field: camel.exchanges_failed
event: camel
- attr: LastProcessingTime
field: camel.last_processing_time
event: camel
- attr: State
field: camel.state
event: camel
jmx.application:
jmx.instance:
[root@project-kal metricbeat]# /apps/metricbeat/metricbeat -e
테스트 해보고 정상이면 sh 만들어서 background로 실행하거나 service로 등록이 되어 있을 경우 systemctl start metricbeat 으로 실행
테스트 할때는 로그를 봐야 할 필요가 있어 그냥 /apps/metricbeat/metricbeat -e 로 실행해 보는것이 좋음.
* 핵심사항
- metricbeat에서 multirow/dynamic 하게 조회되는 bean에 대하여 metric 구성시 mbean에 *를 활용하여 처리함.
- 다중행이 리턴되는 쿼리의 경우 아래처럼 동적 복합키가 생성되는데 metricbeat의 jolokia mbean 설정에서 위의 예제와 같이 * 로 처리
참고로 - mbean: 'org.apache.camel:type=routes,*' 식으로 조회하면 안됨.
{"request":{"mbean":"org.apache.camel:context=*,name=*,type=routes","type":"read"},"value":{"org.apache.camel:context=ke-test-eg001,name=\"IF_TEST_101\",type=routes":{"StatisticsEnabled":true,"EndpointUri":"timer:\/\/TIMER_101?period=10000","CamelManagementName":"ke-test-eg001","ExchangesCompleted":1848,"LastProcessingTime":0,"ExchangesFailed":0,"Description":null,
최근 덧글