How to use Application Inspector
Was this helpful?
Was this helpful?
|
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.
In order to enable application inspector, you will need to do the following and run Pinpoint.
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.
The name of the streaming job is pinpoint-flink-job-{pinpoint.version}.jar
.
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.
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.
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 ๊ธฐ๋ฅ์ ๋์ ๋ฐ ๊ตฌ์กฐ๋ฅผ ๊ทธ๋ฆผ๊ณผ ํจ๊ป ๋ณด์.
application inspector ๊ธฐ๋ฅ์ ์คํํ๊ธฐ ์ํด์ ์๋์ ๊ฐ์ด ์ค์ ์ ๋ณ๊ฒฝํ๊ณ Pinpoint๋ฅผ ์คํํด์ผ ํ๋ค.
flink๋ฅผ cluster๋ก ๊ตฌ์ถํด์ ์ฌ์ฉํ๋ค๋ฉด _flink.StreamExecutionEnvironment_์๋ server๋ฅผ ์ค์ ํ๋ค.
flink๋ฅผ Standalone ํํ๋ก ์คํํ๋ค๋ฉด _flink.StreamExecutionEnvironment_์๋ local์ ์ค์ ํ๋ค.
streaming job ํ์ผ ์ด๋ฆ์ pinpoint-flink-job-{pinpoint.version}.jar
์ด๋ค.
๋ฐ๋์ ์คํ์ job์ด ์์์ ์ค์ ํ ์ค์ ํ์ผ์ ์ฐธ๊ณ ํ ์ ์๋๋ก job parameter๋ก spring.profiles.active release
or spring.profiles.active local
๋ฅผ ๋ฃ์ด์ฃผ์ผ ํ๋ค. job ๋ด๋ถ์์ spring profile ๊ธฐ๋ฅ์ ์ฌ์ฉํ์ฌ ์ค์ ํ์ผ์ ์ฐธ๊ณ ํ๊ณ ์๊ธฐ๋๋ฌธ์ ๋ฐ๋์ ์
๋ ฅํด์ผํ๋ค.
G. web์์ application inspector ๋ฒํผ์ ํ์ฑํ ํ๊ธฐ ์ํด์ ์ค์ ํ์ผ(pinpoint-web.properties)์ ์์ ํ๋ค.
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์ผ๋ก ๋ฑ๋กํ๋ฉด ๋๋ค.
Application inspector requires and . Please read on for more detail.
A. Run a streaming job on . 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.
A. Create ApplicationStatAggre table (refer to ), which stores application stat data.
B. Configure zookeeper address in 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 .
D. Configure hbase address in which will be used to store aggregated application data.
E. Build and run the streaming job file created under target directory on the flink server.
For details on how to run the job, please refer to the .
F. Configure zookeeper address in so that the Collector can connect to the flink server.
G. Enable application inspector in the web-ui by enabling the following configuration in .
For more details on how to install and operate flink, please refer to the .
application inspector ๊ธฐ๋ฅ์ ๋์์ํค๊ธฐ ์ํด์๋ ์ ๊ฐ ํ์ํ๊ณ , ๊ธฐ๋ฅ์ ๋์ ๊ตฌ์กฐ์ ๊ตฌ์ฑ ๋ฐ ์ค์ ๋ฐฉ๋ฒ์ ์๋ ์ค๋ช ํ๋ค.
A. ์ streaming job์ ์คํ์ํจ๋ค. B. job์ด ์คํ๋๋ฉด taskmanager ์๋ฒ์ ์ ๋ณด๊ฐ zookeeper์ ๋ฐ์ดํฐ ๋ ธ๋๋ก ๋ฑ๋ก์ด ๋๋ค. C. Collector๋ zookeeper์์ flink ์๋ฒ์ ์ ๋ณด๋ฅผ ๊ฐ์ ธ์์ flink ์๋ฒ์ tcp ์ฐ๊ฒฐ์ ๋งบ๊ณ agent stat ๋ฐ์ดํฐ๋ฅผ ์ ์กํ๋ค. D. flink ์๋ฒ์์๋ agent ๋ฐ์ดํฐ๋ฅผ ์ง๊ณํ์ฌ ํต๊ณ ๋ฐ์ดํฐ๋ฅผ hbase์ ์ ์ฅํ๋ค.
A. ํ์ฌ application ํต๊ณ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๋ ApplicationStatAggre ํ ์ด๋ธ์ ์์ฑํ๋ค.
B. flink ํ๋ก์ ํธ ์ค์ ํ์ผ()์ taskmanager ์๋ฒ ์ ๋ณด๋ฅผ ์ ์ฅํ๋ zookeeper ์ฃผ์๋ฅผ ์ค์ ํ๋ค.
C. flink ํ๋ก์ ํธ ์ค์ ํ์ผ()์ job์ ์คํ ๋ฐฉ๋ฒ๊ณผ Collector์์ ๋ฐ์ดํฐ๋ฅผ ๋ฐ๋ listener์ ๊ฐ์๋ฅผ ์ค์ ํ๋ค.
D. flink ํ๋ก์ ํธ ์ค์ ํ์ผ()์ ์ง๊ณ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๋ hbase ์ฃผ์๋ฅผ ์ค์ ํ๋ค.
E. ๋ฅผ ๋น๋ํ์ฌ target ํด๋ ํ์์ ์์ฑ๋ streaming job ํ์ผ์ flink ์๋ฒ์ job์ ์คํํ๋ค.
์คํ๋ฐฉ๋ฒ์ ๋ฅผ ์ฐธ์กฐํ๋ค.
F. Collector์์ flink์ ์ฐ๊ฒฐ์ ๋งบ์ ์ ์๋๋ก ์ค์ ํ์ผ()์ zookeeper ์ฃผ์๋ฅผ ์ค์ ํ๋ค.
์์ธํ flink ์ด์ ์ค์น์ ๋ํ ๋ด์ฉ์ ๋ฅผ ์ฐธ๊ณ ํ์.