티스토리 뷰
본 포스팅은 WildFly Monitoring 방법에 대한 가이드입니다.
타 벤더사 WAS를 많이 다뤄본 제가 느끼는 Wildfly Monitoring 부분은 매우 취약하다 할 수 있습니다.
다만 CLI를 다방면으로 활용할 수 있어 이를 모니터링 방법을 가이드 하고자 합니다.
먼저 ThreadPool 모니터링 방법입니다.
모니터링은 Shell Script, CLI, WebConsole 환경에서 각각 테스트를 수행하였습니다.
[확인방법]
Shell
jboss-cli.sh --controller=[IP]:[PORT] --connect --command="/core-service=platform-mbean/type=threading:read-resource(include-runtime=true,recursive-depth=10)"
EX)
/home/wildfly/wildfly-10.1.0.Final/bin/jboss-cli.sh --controller=10.40.64.51:9990 --connect --command="/core-service=platform-mbean/type=threading:read-resource(include-runtime=true,recursive-depth=10)"
CLI
- /core-service=platform-mbean/type=threading:read-resource(include-runtime=true, recursive=true, recursive-depth=10)
Web Console
- Server: Standalone Server => Monitor: JVM
[결과]
Shell & CLI
"thread-contention-monitoring-supported" => true,
"thread-cpu-time-supported" => true,
"current-thread-cpu-time-supported" => true,
"object-monitor-usage-supported" => true,
"synchronizer-usage-supported" => true,
"thread-contention-monitoring-enabled" => false,
"thread-cpu-time-enabled" => true,
"thread-count" => 69,
"peak-thread-count" => 125,
"total-started-thread-count" => 138L,
"daemon-thread-count" => 18,
"current-thread-cpu-time" => 0L,
"current-thread-user-time" => 0L,
"object-name" => "java.lang:type=Threading"
WebConsole
다음으로 ConnectionPool(datasource) 모니터링 방법입니다.
[확인방법]
Shell
jboss-cli.sh --controller=[IP]:[PORT] --connect --command="/subsystem=datasources/data-source=[JNDINAME]/statistics=pool:read-resource(recursive=true, include-runtime=true)"
EX)
/home/wildfly/wildfly-10.1.0.Final/bin/jboss-cli.sh --controller=10.40.64.51:9990 --connect --command="/subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(recursive=true, include-runtime=true)"
CLI
- /subsystem=datasources/data-source=epasds/statistics=pool:read-resource(recursive=true, include-runtime=true)
Web Console
- Server: Standalone Server => Monitor: Subsystems => Subsystem: Datasources
[결과]
Shell & CLI
"outcome" => "success",
"result" => {
"ActiveCount" => 0,
"AvailableCount" => 20,
"AverageBlockingTime" => 0L,
"AverageCreationTime" => 0L,
"AverageGetTime" => 0L,
"AveragePoolTime" => 0L,
"AverageUsageTime" => 0L,
"BlockingFailureCount" => 0,
"CreatedCount" => 0,
"DestroyedCount" => 0,
"IdleCount" => 0,
"InUseCount" => 0,
"MaxCreationTime" => 0L,
"MaxGetTime" => 0L,
"MaxPoolTime" => 0L,
"MaxUsageTime" => 0L,
"MaxUsedCount" => 0,
"MaxWaitCount" => 0,
"MaxWaitTime" => 0L,
"TimedOut" => 0,
"TotalBlockingTime" => 0L,
"TotalCreationTime" => 0L,
"TotalGetTime" => 0L,
"TotalPoolTime" => 0L,
"TotalUsageTime" => 0L,
"WaitCount" => 0,
"XACommitAverageTime" => 0L,
"XACommitCount" => 0L,
"XACommitMaxTime" => 0L,
"XACommitTotalTime" => 0L,
"XAEndAverageTime" => 0L,
"XAEndCount" => 0L,
"XAEndMaxTime" => 0L,
"XAEndTotalTime" => 0L,
"XAForgetAverageTime" => 0L,
"XAForgetCount" => 0L,
"XAForgetMaxTime" => 0L,
"XAForgetTotalTime" => 0L,
"XAPrepareAverageTime" => 0L,
"XAPrepareCount" => 0L,
"XAPrepareMaxTime" => 0L,
"XAPrepareTotalTime" => 0L,
"XARecoverAverageTime" => 0L,
"XARecoverCount" => 0L,
"XARecoverMaxTime" => 0L,
"XARecoverTotalTime" => 0L,
"XARollbackAverageTime" => 0L,
"XARollbackCount" => 0L,
"XARollbackMaxTime" => 0L,
"XARollbackTotalTime" => 0L,
"XAStartAverageTime" => 0L,
"XAStartCount" => 0L,
"XAStartMaxTime" => 0L,
"XAStartTotalTime" => 0L,
"statistics-enabled" => true
다음으로 Session 모니터링 방법입니다.
[확인방법]
Shell
jboss-cli.sh --controller=[IP]:[PORT] --connect --command="/deployment=[APPLICATIONNAME]/subsystem=undertow:read-resource(include-runtime=true, recursive=true, recursive-depth=10)"
EX)
/home/wildfly/wildfly-10.1.0.Final/bin/jboss-cli.sh --controller=10.40.64.51:9990 --connect --command="/deployment=mes/subsystem=undertow:read-resource(include-runtime=true, recursive=true, recursive-depth=10)"
CLI
/deployment=blog/subsystem=undertow:read-resource(include-runtime=true, recursive=true, recursive-depth=10)
Web Console (Configuration / statistics / infinispan Enable)
Deployment: blog => Subsystem => Undertow
[결과]
Shell & CLI
"outcome" => "success",
"result" => {
"active-sessions" => 1,
"context-root" => "/warblog",
"expired-sessions" => 1,
"max-active-sessions" => -1,
"rejected-sessions" => 0,
"server" => "default-server",
"session-avg-alive-time" => 0,
"session-max-alive-time" => 1815374,
"sessions-created" => 2,
"virtual-host" => "default-host",
"servlet" => undefined,
"websocket" => undefined
}
WebConsole
마지막으로 Request 모니터링 방법입니다.
[확인방법]
CLI
"outcome" => "success",
"result" => {
"allow-encoded-slash" => false,
"allow-equals-in-cookie-value" => false,
"always-set-keep-alive" => true,
"buffer-pipelined-data" => false,
"buffer-pool" => "default",
"bytes-received" => 6349L,
"bytes-sent" => 13947L,
"certificate-forwarding" => false,
"decode-url" => true,
"disallowed-methods" => ["TRACE"],
"enable-http2" => true,
"enabled" => true,
"error-count" => 0L,
"http2-enable-push" => true,
...
"redirect-socket" => "https",
"request-count" => 18L,
"request-parse-timeout" => undefined,
...
WebConsole
WildFly or JBoss의 경우 다소 모니터링에 취약점이 있으나, 반드시 모니터링 해야 하는 최소한의 요소들은 구현되어 있다는 것을 참고해야 겠습니다.
다음시간에 뵙겠습니다.
고맙습니다.
'④ 미들웨어 > ⓦ WildFly' 카테고리의 다른 글
[WildFly] 2PC Commit Test Senario (0) | 2018.08.06 |
---|---|
[wildfly] apache 연동 가이드 (0) | 2018.07.17 |
[Wildfly] Clustering in Domain Mode (1) | 2018.07.12 |
[Wildfly] Clustering in Standalone Mode (1) | 2018.07.12 |
[WildFly] First Install & follow-symlink (0) | 2018.07.11 |
- Total
- Today
- Yesterday
- SWA
- Da
- 쿠버네티스
- webtob
- JBoss
- git
- API Gateway
- node.js
- 오픈스택
- Docker
- JEUS6
- openstack token issue
- k8s
- 아키텍처
- SA
- apache
- aws
- nodejs
- wildfly
- 마이크로서비스
- aa
- TA
- OpenStack
- kubernetes
- jeus
- Architecture
- MSA
- 마이크로서비스 아키텍처
- JEUS7
- openstack tenant
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |