You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scouter.document/main/Plugin-Guide.md
+67-53Lines changed: 67 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,20 @@
3
3
4
4
This article explains plugin funtion which enables scouter's extensibility.
5
5
6
-
With the plugin fuction of Scouter collector sever, data collected by scouter can be modified and can be shared to other softwares. With agent plugin, certain types of data can be modified (선 처리의 개념이 모호하여 modifed 로 번역 하였으나 의미에 따라 pre-handled 등으로 변경 해야 할 수 도 있음.) and other business-meaningful data can be added data to XLog or profile.
6
+
With the plugin fuction of Scouter collector sever, data collected by scouter can be pre-handled and can be shared to other softwares.
7
+
With agent plugin, certain types of data can be modified and other business-meaningful data can be added data to XLog or profile.
7
8
8
-
> With Scouter plugin, configuration and extension can be done to enable collarboaration with other open source.
9
+
> With Scouter plugin, configuration and extension can be done to enable collaboration with other open source.
9
10
10
-
Scouter's profiles has two parts. **server plug-in** is for to collector server and **agent Plugin** is for to Java agent. server plugin has two parts including **scripting plugin** and **built-in plugin**.
11
-
Currently, scripting plugin is only one available plugin for java agent.
11
+
Scouter has 2 type of plugins - server plugin and an agent plugin.
12
+
**server plug-in** is for to collector server
13
+
and **agent Plugin** is for to Java agent.
14
+
Server plugin has 2 type plugins including **scripting plugin**, **built-in-type plugin**.
12
15
13
16
## List of available plugins
14
17
Below are the list of official plugins from scouter project and from contributors.
15
18
16
-
#### 1. server plugins
19
+
#### 1. server plugins (built-in type)
17
20
***[scouter-plugin-server-null](https://github.com/scouter-project/scouter-plugin-server-null)** : sample plugin prints out data collected
18
21
***[scouter-plugin-server-email](https://github.com/scouter-project/scouter-plugin-server-alert-email)** : emails alters from Scouter
19
22
***[scouter-plugin-server-telegram](https://github.com/scouter-project/scouter-plugin-server-alert-telegram)** : transfer altert from Scouter to telegram
@@ -23,35 +26,49 @@ Below are the list of official plugins from scouter project and from contributor
23
26
#### 2. agent plugins
24
27
* TBD
25
28
26
-
## Server Plugin 설명
27
-
**Scripting plugin은 코드 변경이 동적으로 load 및 compile되어 runtime에 즉시 반영되므로 debugging등에도 활용될 수 있다.**
29
+
## Server Plugin - How to
28
30
29
31
### 1. Scripting Plugin
30
-
Scripting plugin은 scouter DB에 수집데이터가 저장되기전 호출된다.
31
-
간단히 java 문법을 사용한 script를 사용하여 처리가 가능하며 특별한 옵션을 지정하지 않은 경우는 server를 실행한 directory의 **./plugin** 디렉토리에 plugin 파일을 작성할 수 있다.
32
-
Scouter의 설치본에는 이에 대한 샘플이 포함되어 있으며 해당 파일명으로 로드되므로 파일명을 수정할 수는 없다.
33
-
현재 제공되는 server plugin은 7가지 종류이며 각 파일명은 아래와 같다.
34
-
***alert.plug** - alert에 대한 전처리 plugin
35
-
***counter.plug** - 성능카운터 정보에 대한 전처리 plugin
36
-
***object.plug** - object 정보에 대한 전처리 plugin
37
-
***summary.plug** - 성능 summary 정보에 대한 전처리 plugin
38
-
***xlog.plug** - xlog data에 대한 전처리 plugin
39
-
***xlogdb.plug** - xlog를 db에 저장히기 직전 상태에 호출되는 plugin
40
-
***xlogprofile.plug** - 상세 profile 정보에 대한 전처리 plugin
41
-
42
-
이에 대한 상세 내용은 **[Scripting plugin Server API 설명 페이지](Server-Plugin-Scripting.md)**를 참고한다.
32
+
A scripting plugin is called right before xlog data is stored in a repository.
33
+
You can add simple script for manipulate some data on the plugin files which are located in the directory **[server_runnig_dir]/plugin** by default.
34
+
35
+
Scouter distribution has the samples and the file name can not be modified.
36
+
Currently 6 types of scripting plugins are supported.
37
+
***alert.plug** - for pre-handling alert
38
+
***counter.plug** - for pre-handling performance metrics(counters)
39
+
***object.plug** - for pre-handling moitoring objects(instnats)
40
+
***summary.plug** - for pre-handling performance summary data
41
+
***xlog.plug** - for pre-handling xlog data
42
+
***xlogprofile.plug** - for pre-handling xlog profile
43
+
44
+
refer to the link for details.
45
+
**[Scripting plugin Server API](Server-Plugin-Scripting.md)**를 참고한다.
43
46
44
47
### 2. Built-in Plugin
45
-
Scripting plugin은 간편하게 작성하고 바로 반영해 볼 수 있다는 장점이 있는 반면 영구적으로 사용해야 하는 Plugin이 필요한 경우는 오히려 쉽게 수정 가능한 text 파일 형태로 유지하는 것이 불편할 수 도 있다.
46
-
이를 위해 특정한 방식으로 미리 제작해 놓은 plugin을 삽입할 수 있는 방식을 제공하며 이를 **Built-in Plugin**이라고 부른다.
47
-
Scouter에서 미리 제공하는 **annotation**을 사용하여 개발한 후 해당 library를 scouter server의 library 경로에 넣어 놓기만 하면 자동으로 로딩되어 실행된다.
48
-
(기본 설정으로는 **./lib** 디렉토리이며 동적로딩이 되지 않으므로 library 변경시 재시작이 필요하다.)
48
+
Builing scripting plugin is very simple and can be dynamically loaded on runtime environment.
49
+
On the other hand if you need the function permanently, it's too easy to fragile.
50
+
So scouter provides another plugin type which allow you can attach pre-built compiled plugin and it's called as **Built-in Plugin**.
49
51
50
-
#### 2.1 Server Built-in Plugin 개발 가이드
52
+
Scouter load the plugins on startup, if the plugins are located in scouter server's library directory.(default:**[server_runnig_dir]/lib**)
**ScriptingPlugin은 코드 변경이 동적으로 Load 및 Compile되어 Runtime에 즉시 반영되므로 Debugging등에도 활용될 수 있다.**
95
-
특히 특정 method의 파라미터 정보를 확인하거나 해당 위치에서 StackTrace를 유발시켜 호출 경로를 확인해 본다던지 다양한 방식으로 활용이 가능하다.
96
-
97
-
ScriptingPluging은 응용 어플리케이션의 중요한 몇가지 point에서 각 plugin이 호출이 된다.
98
-
간단히 Java 문법을 사용한 Script를 사용하여 처리가 가능하며 특별한 옵션을 지정하지 않은 경우는 **./plugin** 디렉토리에 plugin 파일을 작성할 수 있다.
99
-
Scouter의 설치본에는 이에 대한 샘플이 포함되어 있으며 해당 파일명으로 로드되므로 파일명을 수정할 수는 없다.
100
-
현재 제공되는 server plugin은 5가지 종류이며 각 파일명은 아래와 같다.
101
-
102
-
|파일명 | 설명 |
111
+
**Scripting plugin can be loaded dynamically on runtime so it is used for debugging also**
112
+
It's very useful to print some method's parameters or stacktrace on specific point and also can add additional (user-defined) profile information to the xlog or xlog profile.
113
+
The scripting plugin is invoked at some important points and the default location of the plugin file is **./plugin**.
114
+
Scouter distribution includes sample plugin files and the file name can not be modified.
115
+
116
+
|filename | desc |
103
117
|-------------------|-------------------------|
104
-
|**httpservice.plug**|HttpService 시작점, HttpService이 종료시점에 호출됨. 특정 Service는 사용자가 정의한 조건에 따라 reject할 수 있는 기능을 제공|
105
-
|**service.plug**|Service의 시작점, 종료 시점에 호출됨 (```hook_service_patterns```를 통해 설정된 서비스가 대상이 됨) |
106
-
|**httpcall.plug**|HttpClient등을 통해 http call을 사용하는 시점에 호출됨 |
107
-
|**capture.plug**| ```hook_method_patterns```나 ```hook_constructor_patterns```등을 통해 설정됨 method에 대해 해당 method의 시작 시점, 종료시점, Constructor 생성 시점에 호출됨|
108
-
|**jdbcpoolplug**|DB connection URL 요청 시점에 호출됨|
118
+
|**httpservice.plug**|Invoked at begin and end of http service.|
119
+
|**service.plug**|Invoked at begin and end of user defined service. (The services are set by ```hook_service_patterns``` option) |
120
+
|**httpcall.plug**|Invoked at calling to another service using httpclients library|
121
+
|**capture.plug**|Invoked at init, start, end of methods that are set by options ```hook_method_patterns``` or ```hook_constructor_patterns```|
122
+
|**jdbcpoolplug**|Invoked at calling DB connection URL|
109
123
110
-
이에 대한 상세 내용은 **[Scripting plugin java agent API 설명 페이지](JavaAgent-Plugin-Scripting.md)**를 참고한다.
124
+
Refer to the link for details **[Scripting plugin java agent API](JavaAgent-Plugin-Scripting.md)**를 참고한다.
0 commit comments