New Inspector
1 Overview
There has been changes in inspector in v3.0.0. The newly renewed inspector will be referred to as 'New Inspector' below, while the previous version will be referred to as 'Legacy Inspector' (Legacy Application Inspector).
Although users won't see significant changes on front-end, but the whole architecture has been rebuilt from the scratch. The data storage has been changed from HBase to Pinot. And the APIs have been improved so that it is more easily extenable and their responses more clear to understand.
2 Installation and Configuration
2.1 Install and Run Kafka
Kafka enables real-time streaming of inspector data from Pinpoint collector to Pinot.
2.1.A Set Up Kafka
Refer to this document to download Kafka and start the Kafka environment.
If you have already set up Kafka for Pinpoint System Metric, please skip this step.
2.1.B Create Kafka Topics for New Inspector
Create 2 topics with the names below:
inspector-stat-agent-00
inspector-stat-app
2.2 Set Up Pinot
2.2.A Install Pinot
Install Pinot according to Pinot Getting Started guide.
If you have already set up Pinot for Pinpoint System Metric, please skip this step.
2.2.B Create Pinot Tables
Create 2 tables with the snames below:
inspectorStatAgent00: This table stores agent inspector data. The script file to create the table is provided in our github repository.
inspectorStatApp: This table stores application inspector data.
Refer to the github repository for table schema and configuration settings.
2.3 Configure and Run Pinpoint Collector, Web, and Batch with New Inspector
Related options and settings are already enabled by default, so there is no need to modify any settings from what is provided in our github repository.
When upgrading from Pinpoint version below 3.0 to version 3.0.0 or above, some of the options may be missing in the configuration properties files you have been using. Please refer to the related configurations in the following section to check if any changes are needed in your settings.
3 Related Settings of Pinpoint Components
The following configurations are already set by default in Pinpoint version 3.0.
When upgrading from Pinpoint version below 3.0 to version 3.0.0 or above and when you wish to continue using customized configuration files you have been using, please check if below mentioned configurations are well set in your files.
Pinpoint Collector
application.yml
file incollector-starter
module:
pinpoint:
modules:
collector:
inspector:
enabled: true
Pinpoint Web
application.yml
file inweb-starter
module:
pinpoint:
modules:
web:
inspector:
enabled: true
Pinpoint Batch
batch-root.properties
file inbatch
module:
alarm.collector.version=2
4 Q&A
A Can we still use the Legacy Inspector to save the data to HBase?
Yes, but Legacy Inspector will be deprecated in v3.0.1 so we recommended you to use the New Inspector.
To use Legacy Inspector with v3.0.0, you need to add the following settings to the Pinpoint components:
Modify application.yml
file in collector-starter
module OR add java vm option when running Pinpoint Collector.
application.yml
pinpoint:
modules:
collector:
inspector:
hbase:
enabled: true
java vm option
-Dpinpoint.modules.collector.inspector.hbase.enabled=true
Modify batch-root.properties
file in batch
module OR add java vm option when running Pinpoint Batch.
batch-root.properties
alarm.collector.version=1
java vm option
-Dalarm.collector.version=1
B Why change database to Pinot when there are no additional features provided to users?
New Inspector saves and retrieves the data faster than the Legacy Inspector thanks to Pinot. As Pinot project gets mature over time, there can be further improvements on performance or additional features can be introduced to Pinpoint Inpsector as well.
C Reading inspector-stat-agent table becomes slow as more data is being stored.
You can improve performance by distributing the data across multiple tables. Follow the steps below to create multiple Kafka topics and Pinot tables. Then, add settings to Pinpoint components to read and write data from multiple Pinot tables.
Create More Kafka Topics
Create N Kafka topics. (From 00 to N-1)
The format of the topics is as follows:
inspector-stat-agent-00
inspector-stat-agent-01
...
inspector-stat-agent-99
Create More Pinot Tables
Create N Pinot tables. (From 00 to N-1)
The script file creating multiple Pinot tables is provided in our github repository.
The format of the table names and schema names is as follows:
inspectorStatAgent00
inspectorStatAgent01
...
inspectorStatAgent99
Modify application.yml
file in collector-starter
module OR add java vm option when running Pinpoint Collector
application.yml
kafka:
inspector:
agent:
table:
count: N
java vm option
-Dkafka.inspector.agent.topic.count=N
Modify application.yml
file in web-starter
module OR add java vm option when running Pinpoint Web
application.yml
pinot:
inspector:
agent:
table:
count: N
java vm option
-Dpinot.inspector.agent.topic.count=N
Modify batch-root.properties
file in batch
module OR add java vm option when running Pinpoint Batch
batch-root.properties
job.alarm.agent.inspector.stat.table.count=N
java vm option
-Djob.alarm.agent.inspector.stat.table.count=N
1 ๊ฐ์
inspector๊ฐ Pinpoint v3.0.0์์ ์๋ก์์ก์ต๋๋ค. ์ดํ ์๋ก์์ง inspector๋ฅผ 'New Inspector'์ด๋ผ๊ณ ๋ถ๋ฅด๊ณ ๊ณผ๊ฑฐ์ inspector๋ 'Legacy Inspector'๋ผ๊ณ ์นญํฉ๋๋ค (Legacy Application Inspector).
New Inspector์์ ์ฌ์ฉ์๊ฐ ๋ณด๋ ํ๋ฉด์ ํฌ๊ฒ ๋ฌ๋ผ์ง ๊ฑด์ ์์ต๋๋ค. ๊ทธ๋ฌ๋ ๋ด๋ถ์ ์ผ๋ก ๋ง์ ๋ณํ๊ฐ ์์์ต๋๋ค. ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๋ ์ ์ฅ์๊ฐ HBase์์ Pinot๋ก ๋ณ๊ฒฝ์ด ๋์์ต๋๋ค. api๋ฅผ ์ฝ๊ฒ ํ์ฅํ ์ ์๊ณ , response๋ฅผ ๋ช ํํ ํ์์ผ๋ก ๊ฐํธํ์ต๋๋ค. ์ฆ inspector ๊ธฐ๋ฅ์ ์ถ๊ฐํ๊ณ ํ์ฅํ๊ธฐ ์ฝ๊ฒ ๊ฐ์ ๋์์ต๋๋ค.
2 ์ค์น/์ค์ ๋ฐฉ๋ฒ
2.1 Kafka ์ค์น ๋ฐ ์คํ
์ค์๊ฐ์ผ๋ก collector์์ ๋ฐ์ดํฐ๋ฅผ ์ ๋ฌ๋ฐ์ Pinot์ ์ ์ฅํ๊ธฐ ์ํด์ Kafka๋ฅผ ์ค์นํด์ผ ํฉ๋๋ค.
2.1.A Kafka ์ค์น
์ค์น ๊ฐ์ด๋ ๋งํฌ๋ฅผ ๋ณด๊ณ Kafka๋ฅผ ๋ค์ด ๋ฐ์ ์คํํฉ๋๋ค.
2.1.B topic ์์ฑ
์๋ 2๊ฐ Kafka topic์ ์์ฑํฉ๋๋ค.
inspector-stat-agent-00
inspector-stat-app
2.2 Pinot ์ค์น ๋ฐ ์คํ
2.1.A Pinot ์ค์น
Pinot ์ฌ์ดํธ์์ ์ค์น ๋ฐฉ๋ฒ ๊ฐ์ด๋๋ฅผ ์ฐธ๊ณ ํ์ฌ Pinot๋ฅผ ์ค์นํฉ๋๋ค.
2.1.B Pinot table ์์ฑ
์๋ 2๊ฐ ํ ์ด๋ธ์ ์์ฑํฉ๋๋ค.
inspectorStatAgent00: ์ด ํ ์ด๋ธ์ agent inspector data๋ฅผ ์ ์ฅํฉ๋๋ค. ์คํฌ๋ฆฝํธ๋ก ์์ฑ์ด ๊ฐ๋ฅํฉ๋๋ค.
inspectorStatApp: ์ด ํ ์ด๋ธ์ application inspector data๋ฅผ ์ ์ฅํฉ๋๋ค.
table schema์ configuration์ github repository๋ฅผ ์ฐธ๊ณ ํด์ฃผ์ธ์.
2.3 Pinpoint Collector, batch, Web์ New Inspector ๊ธฐ๋ฅ ํ์ฑํ
๊ด๋ จ ์ต์ ๋ฐ ์ค์ ์ ๊ธฐ๋ณธ์ ์ผ๋ก ํ์ฑํ๋์ด ์์ผ๋ฏ๋ก ์ถ๊ฐ๋ก ์ค์ ํ ํ์๊ฐ ์์ต๋๋ค.
Pinpoint 3.0 ๋ฏธ๋ง๋ฒ์ ์์ 3.0.0 ์ด์๋ฒ์ ์ผ๋ก ์ ๊ทธ๋ ์ด๋ ์ ์ผ๋ถ ์ต์ ์ด ๋๋ฝ๋๋๊ฒฝ์ฐ ์๋ ๊ด๋ จ ์ต์ ์ค๋ช ์ ์ฐธ๊ณ ํด์ฃผ์ธ์.
3 Pinpoint ์ปดํฌ๋ํธ์ ๊ด๋ จ ์ค์
์๋ ์ค์ ๋ค์ Pinpoint 3.0 ๋ฒ์ ์์ ๊ธฐ๋ณธ์ ์ผ๋ก ์ค์ ๋์ด์์ต๋๋ค.
Pinpoint ๋ฒ์ ์ 3.0์ผ๋ก ์ ๊ทธ๋ ์ด๋ํ๋๊ฒฝ์ฐ ์ผ๋ถ ์ค์ ์ด ๋๋ฝ๋๋ ๊ฒฝ์ฐ ์ฐธ๊ณ ํ๊ธฐ ์ํด์ ์ค์ ์ ๋ช ์ํด๋์ต๋๋ค.
Pinpoint Collector
collector-starter
๋ชจ๋์application.yml
ํ์ผ:
pinpoint:
modules:
collector:
inspector:
enabled: true
Pinpoint Web
web-starter
๋ชจ๋์application.yml
ํ์ผ:
pinpoint:
modules:
web:
inspector:
enabled: true
Pinpoint Batch
batch
๋ชจ๋์batch-root.properties
ํ์ผ:
alarm.collector.version=2
4 Q&A
A HBase์ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๋ Legacy Inspector๋ฅผ ์ฌ์ฉํ ์ ์๋์?
๊ฐ๋ฅํฉ๋๋ค. ๊ทธ๋ฌ๋ 3.0.1 ๋ฒ์ ์ด์ ๋ถํฐ๋ Legacy Inspector๋ฅผ ์ญ์ ํ ์์ ์ด๋ฏ๋ก Pinpoint ๋ฒ์ ์ด ์ฌ๋ผ๊ฐ์๋ก ๊ธฐ๋ฅ์ ์ฌ์ฉํ ์ ์์ผ๋ฏ๋ก New Inspector๋ฅผ ์ฌ์ฉํ๋๊ฒ์ ๊ถ์ฅํฉ๋๋ค. ๊ธฐ๋ฅ์ ์ฌ์ฉํ๋ ค๋ฉด Pinpoint ์ปดํฌ๋ํธ๋ค์ ์๋ ์ค์ ์ ์ถ๊ฐํด์ผํฉ๋๋ค.
collector-starter ํ๋ก์ ํธ์ application.yml ํ์ผ์ด๋ java vm option์ ์๋ ์ค์ ์ ์ถ๊ฐํด์ฃผ์ธ์.
application.yml
pinpoint:
modules:
collector:
inspector:
hbase:
enabled: true
java vm option
-Dpinpoint.modules.collector.inspector.hbase.enabled=true
batch ํ๋ก์ ํธ์์ batch-root.properties ํ์ผ์ด๋ java vm option์ ์๋ ์ค์ ์ ์ถ๊ฐํด์ฃผ์ธ์.
batch-root.properties
alarm.collector.version=1
java vm option
-Dalarm.collector.version=1
B ์ฌ์ฉ์์๊ฒ ์ ๊ณต๋๋ ๊ธฐ๋ฅ์ ๋น์ทํ๋ฐ Pinot๊ธฐ๋ฐ์ผ๋ก inspector๋ฅผ ๊ฐ์ ํ ์ด์ ๋ ๋ญ๊น์?
๋ค์ํ ๋ฐ์ดํฐ๋ฅผ ๋น ๋ฅด๊ฒ ์ ์ฅํ๊ณ ํ์ธํ๊ณ ์ํด์ Pinot๋ก ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๋๋ก ๊ฐ์ ๋์๊ณ ์์ง ๋ถ์กฑํ ๊ธฐ๋ฅ์ด ๋ง์ง๋ง Pinot์ ๋ฐ์ ์ ๋ง์ถฐ์ ๊ธฐ๋ฅ์ ๋ณด์ํ๋๋ก ํ๊ฒ ์ต๋๋ค.
C inspector-stat-agent ํ
์ด๋ธ์ ๋ฐ์ดํฐ๊ฐ ๋ง์์ ์ฝ๊ธฐ ์๋๊ฐ ๋๋ ค์ง๋๋ค.
์ฌ๋ฌ ๊ฐ์ ์ฒด์ด๋ธ์ ๋ฐ์ดํฐ๋ฅผ ๋๋์ด ์ ์ฅํด์ ์ฑ๋ฅ ํฅ์์ ์ป์ ์ ์์ต๋๋ค. ์๋๋ฅผ ๋จ๊ณ๋ฅผ ๋ฐ๋ผ ์ ์ฒด N ๊ฐ์ Kafka topic๊ณผ Pinot table์ ์์ฑํ๊ณ , Pinpoint ์ปดํฌ๋ํธ๋ค์ ์ค์ ์ ์ถ๊ฐํด์ data๋ฅผ ์์ง/์กฐํํฉ๋๋ค.
Kafka topic ์์ฑ
N๊ฐ Kafka topic์ ์์ฑํฉ๋๋ค. (00์์ N-1๊น์ง)
topic์ ํ์์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
inspector-stat-agent-00
inspector-stat-agent-01
...
inspector-stat-agent-99
Pinot table ์์ฑ
N๊ฐ Pinot table์ ์์ฑํฉ๋๋ค. (00์์ N-1๊น์ง)
์คํฌ๋ฆฝํธ๋ก ๋ค์์ ํ ์ด๋ธ ์์ฑ์ด ๊ฐ๋ฅํฉ๋๋ค.
table name๊ณผ schema name์ ํ์์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
insepctorStatAgent00
insepctorStatAgent01
...
insepctorStatAgent99
collector-starter
๋ชจ๋์ application.yml
ํ์ผ์ด๋ java vm option์ ์๋ ์ค์ ์ ์ถ๊ฐํด ์ฃผ์ธ์.
application.yml
kafka:
inspector:
agent:
table:
count: N
java vm option
-Dkafka.inspector.agent.topic.count=N
web-starter
๋ชจ๋์ application.yml
ํ์ผ์ด๋ java vm option์ ์๋ ์ค์ ์ ์ถ๊ฐํด ์ฃผ์ธ์.
application.yml
pinot:
inspector:
agent:
table:
count: N
java vm option
-Dpinot.inspector.agent.topic.count=N
batch
๋ชจ๋์ batch-root.properties
ํ์ผ์ด๋ java vm option์ ์๋ ์ค์ ์ ์ถ๊ฐํด ์ฃผ์ธ์.
batch-root.properties
job.alarm.agent.inspector.stat.table.count=N
java vm option
-Djob.alarm.agent.inspector.stat.table.count=N
Last updated
Was this helpful?