How to use Application Inspector
Application Inspector
1. Introduction
Application inspector provides an aggregate view of all the agent's resource data (cpu, memory, tps, datasource connection count, etc) registered under the same application name. A separate view is provided for the application inspector with stat charts similar to the agent inspector.
To access application inspector, click on the application inspector menu on the left side of the screen.
1 : application inspector menu, 2 : application stat data
The Heap Usage chart above for example, shows the average(Avg), smallest(Min), greatest(Max) heap usage of the agents registered under the same application name along with the id of the agent that had the smallest/greatest heap usage at a certain point in time. The application inspector also provides other statistics found in the agent inspector in a similar fashion.
Application inspector requires flink and zookeeper. Please read on for more detail.
2. Architecture
A. Run a streaming job on flink. B. The taskmanager server is registered to zookeeper as a data node once the job starts. C. The Collector obtains the flink server info from zookeeper to create a tcp connection with it and starts sending agent data. D. The flink server aggregates data sent by the Collector and stores them into hbase.
3. Configuration
In order to enable application inspector, you will need to do the following and run Pinpoint.
A. Create ApplicationStatAggre table (refer to create table script), which stores application stat data.
B. Configure zookeeper address in Pinpoint-flink.properties which will be used to store flink's taskmanager server information.
C. Configure job execution type and the number of listeners to receive data from the Collector in Pinpoint-flink.properties.
If you are running a flink cluster, set flink.StreamExecutionEnvironment to server.
If you are running flink as a standalone, set flink.StreamExecutionEnvironment to local.
D. Configure hbase address in hbase.properties which will be used to store aggregated application data.
E. Build Pinpoint-flink and run the streaming job file created under target directory on the flink server.
The name of the streaming job is
pinpoint-flink-job-{pinpoint.version}.jar
.For details on how to run the job, please refer to the flink website.
You must put
spring.profiles.active release
orspring.profiles.active local
as the job parameter so that the job can refer to the configuration file configured above when running. It must be entered because it uses the spring profile function inside the job to refer to the configuration file.
F. Configure zookeeper address in Pinpoint-Collector.properties so that the Collector can connect to the flink server.
G. Enable application inspector in the web-ui by enabling the following configuration in pinpoint-web.properties.
4. Monitoring Streaming Jobs
There is a batch job that monitors how Pinpoint streaming jobs are running. To enable this batch job, configure the following files for Pinpoint-web.
batch.properties
applicationContext-batch-schedule.xml
If you would like to send alarms in case of batch job failure, you must implement com.navercorp.pinpoint.web.batch.JobFailMessageSender class
and register it as a Spring bean.
5. Others
For more details on how to install and operate flink, please refer to the flink website.
Application Inspector
1. κΈ°λ₯ μ€λͺ
application inspector κΈ°λ₯μ agentλ€μ 리μμ€ λ°μ΄ν°(stat : cpu, memory, tps, datasource connection count)λ₯Ό μ§κ³νμ¬ λ°μ΄ν°λ₯Ό 보μ¬μ£Όλ κΈ°λ₯μ΄λ€. μ°Έκ³ λ‘ applicationμ agentμ κ·Έλ£ΉμΌλ‘ μ΄λ€μ§λ€. κ·Έλ¦¬κ³ agentμ 리μμ€ λ°μ΄ν°λ agent inspector νλ©΄μμ μμ λ³Ό μ μλ€. application inspector κΈ°λ₯ λν λ³λμ νλ©΄μμ νμΈν μ μλ€.
inspector νλ©΄ μΌμͺ½ λ©λ΄μ λ§ν¬λ₯Ό ν΄λ¦νλ©΄ application inspector λ²νΌμ ν΄λ¦νκ³ λ°μ΄ν°λ₯Ό λ³Ό μ μλ€.
1 : application inspector menu, 2: application stat data
μλ₯Όλ€λ©΄ AλΌλ applicationμ ν¬ν¨λ agentλ€μ heap μ¬μ©λμ λͺ¨μμ heap μ¬μ©λ νκ· κ° , heap μ¬μ©λμ νκ· κ°, heap μ¬μ©λμ΄ κ°μ₯ λμ agentidμ μ¬μ©λ, heap μ¬μ©λμ΄ κ°μ₯ μ μ agentidμ μ¬μ©λμ 보μ¬μ€λ€. μ΄μΈμλ agent inspector μμ μ 곡νλ λ€λ₯Έ λ°μ΄ν°λ€λ μ§κ³νμ¬ application inspectorμμ μ 곡νλ€.
application inspector κΈ°λ₯μ λμμν€κΈ° μν΄μλ flinkμ zookeeperκ° νμνκ³ , κΈ°λ₯μ λμ ꡬ쑰μ κ΅¬μ± λ° μ€μ λ°©λ²μ μλ μ€λͺ νλ€.
2. λμ ꡬ쑰
application inspector κΈ°λ₯μ λμ λ° κ΅¬μ‘°λ₯Ό κ·Έλ¦Όκ³Ό ν¨κ» 보μ.
A. flinkμ streaming jobμ μ€νμν¨λ€. B. jobμ΄ μ€νλλ©΄ taskmanager μλ²μ μ λ³΄κ° zookeeperμ λ°μ΄ν° λ Έλλ‘ λ±λ‘μ΄ λλ€. C. Collectorλ zookeeperμμ flink μλ²μ μ 보λ₯Ό κ°μ Έμμ flink μλ²μ tcp μ°κ²°μ λ§Ίκ³ agent stat λ°μ΄ν°λ₯Ό μ μ‘νλ€. D. flink μλ²μμλ agent λ°μ΄ν°λ₯Ό μ§κ³νμ¬ ν΅κ³ λ°μ΄ν°λ₯Ό hbaseμ μ μ₯νλ€.
3. κΈ°λ₯ μ€ν λ°©λ²
application inspector κΈ°λ₯μ μ€ννκΈ° μν΄μ μλμ κ°μ΄ μ€μ μ λ³κ²½νκ³ Pinpointλ₯Ό μ€νν΄μΌ νλ€.
A. ν μ΄λΈ μμ± μ€ν¬λ¦½νΈλ₯Ό μ°Έμ‘°νμ¬ application ν΅κ³ λ°μ΄ν°λ₯Ό μ μ₯νλ ApplicationStatAggre ν μ΄λΈμ μμ±νλ€.
B. flink νλ‘μ νΈ μ€μ νμΌ(Pinpoint-flink.properties)μ taskmanager μλ² μ 보λ₯Ό μ μ₯νλ zookeeper μ£Όμλ₯Ό μ€μ νλ€.
C. flink νλ‘μ νΈ μ€μ νμΌ(Pinpoint-flink.properties)μ jobμ μ€ν λ°©λ²κ³Ό Collectorμμ λ°μ΄ν°λ₯Ό λ°λ listenerμ κ°μλ₯Ό μ€μ νλ€.
flinkλ₯Ό clusterλ‘ κ΅¬μΆν΄μ μ¬μ©νλ€λ©΄ _flink.StreamExecutionEnvironment_μλ serverλ₯Ό μ€μ νλ€.
flinkλ₯Ό Standalone ννλ‘ μ€ννλ€λ©΄ _flink.StreamExecutionEnvironment_μλ localμ μ€μ νλ€.
D. flink νλ‘μ νΈ μ€μ νμΌ(hbase.properties)μ μ§κ³ λ°μ΄ν°λ₯Ό μ μ₯νλ hbase μ£Όμλ₯Ό μ€μ νλ€.
E. flink νλ‘μ νΈλ₯Ό λΉλνμ¬ target ν΄λ νμμ μμ±λ streaming job νμΌμ flink μλ²μ jobμ μ€ννλ€.
streaming job νμΌ μ΄λ¦μ
pinpoint-flink-job-{pinpoint.version}.jar
μ΄λ€.μ€νλ°©λ²μ flink μ¬μ΄νΈλ₯Ό μ°Έμ‘°νλ€.
λ°λμ μ€νμ jobμ΄ μμμ μ€μ ν μ€μ νμΌμ μ°Έκ³ ν μ μλλ‘ job parameterλ‘
spring.profiles.active release
orspring.profiles.active local
λ₯Ό λ£μ΄μ£ΌμΌ νλ€. job λ΄λΆμμ spring profile κΈ°λ₯μ μ¬μ©νμ¬ μ€μ νμΌμ μ°Έκ³ νκ³ μκΈ°λλ¬Έμ λ°λμ μ λ ₯ν΄μΌνλ€.
F. Collectorμμ flinkμ μ°κ²°μ λ§Ίμ μ μλλ‘ μ€μ νμΌ(Pinpoint-Collector.properties)μ zookeeper μ£Όμλ₯Ό μ€μ νλ€.
G. webμμ application inspector λ²νΌμ νμ±ν νκΈ° μν΄μ μ€μ νμΌ(pinpoint-web.properties)μ μμ νλ€.
4. streaming job λμ νμΈ λͺ¨λν°λ§ batch
Pinpoint streaming jobμ΄ μ€νλκ³ μλμ§ νμΈνλ batch jobμ΄ μλ€. batch jobμ λμ μν€κ³ μΆλ€λ©΄ Pinpoint web νλ‘μ νΈμ μ€μ νμΌμ μμ νλ©΄ λλ€.
batch.properties
applicationContext-batch-schedule.xml
batch jobμ΄ μ€ν¨ν κ²½μ° μλμ΄ μ μ‘λλλ‘ κΈ°λ₯μ μΆκ° νκ³ μΆλ€λ©΄ com.navercorp.pinpoint.web.batch.JobFailMessageSender class
ꡬν체λ₯Ό λ§λ€κ³ beanμΌλ‘ λ±λ‘νλ©΄ λλ€.
5. κΈ°ν
μμΈν flink μ΄μ μ€μΉμ λν λ΄μ©μ flink μ¬μ΄νΈλ₯Ό μ°Έκ³ νμ.
Last updated