Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
ce6d4c8d
S
SkyWalking
项目概览
山不在高_有仙则灵
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
12
Star
0
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ce6d4c8d
编写于
9月 09, 2017
作者:
wu-sheng
提交者:
GitHub
9月 09, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #405 from wu-sheng/feature/package
Feature/package
上级
03a5db8e
1249c04a
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
230 addition
and
23 deletion
+230
-23
apm-collector/apm-collector-agentserver/src/main/java/org/skywalking/apm/collector/agentserver/jetty/AgentServerJettyModuleDefine.java
...ector/agentserver/jetty/AgentServerJettyModuleDefine.java
+2
-0
apm-collector/apm-collector-agentserver/src/main/java/org/skywalking/apm/collector/agentserver/jetty/handler/UIJettyServerHandler.java
...ector/agentserver/jetty/handler/UIJettyServerHandler.java
+1
-1
apm-collector/apm-collector-boot/bin/collector-service.bat
apm-collector/apm-collector-boot/bin/collector-service.bat
+20
-0
apm-collector/apm-collector-boot/bin/collector-service.sh
apm-collector/apm-collector-boot/bin/collector-service.sh
+37
-0
apm-collector/apm-collector-boot/bin/startup.bat
apm-collector/apm-collector-boot/bin/startup.bat
+5
-0
apm-collector/apm-collector-boot/bin/startup.sh
apm-collector/apm-collector-boot/bin/startup.sh
+7
-0
apm-collector/apm-collector-boot/pom.xml
apm-collector/apm-collector-boot/pom.xml
+76
-0
apm-collector/apm-collector-boot/src/main/assembly/assembly.xml
...llector/apm-collector-boot/src/main/assembly/assembly.xml
+42
-0
apm-collector/apm-collector-boot/src/main/resources/application.yml
...tor/apm-collector-boot/src/main/resources/application.yml
+25
-18
apm-collector/apm-collector-boot/src/main/resources/logback.xml
...llector/apm-collector-boot/src/main/resources/logback.xml
+11
-0
apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/util/DefinitionLoader.java
.../skywalking/apm/collector/core/util/DefinitionLoader.java
+4
-2
apm-collector/apm-collector-ui/src/main/java/org/skywalking/apm/collector/ui/jetty/UIJettyModuleDefine.java
...kywalking/apm/collector/ui/jetty/UIJettyModuleDefine.java
+0
-2
未找到文件。
apm-collector/apm-collector-agentserver/src/main/java/org/skywalking/apm/collector/agentserver/jetty/AgentServerJettyModuleDefine.java
浏览文件 @
ce6d4c8d
...
...
@@ -6,6 +6,7 @@ import org.skywalking.apm.collector.agentserver.AgentServerModuleDefine;
import
org.skywalking.apm.collector.agentserver.AgentServerModuleGroupDefine
;
import
org.skywalking.apm.collector.agentserver.jetty.handler.AgentStreamGRPCServerHandler
;
import
org.skywalking.apm.collector.agentserver.jetty.handler.AgentStreamJettyServerHandler
;
import
org.skywalking.apm.collector.agentserver.jetty.handler.UIJettyServerHandler
;
import
org.skywalking.apm.collector.core.cluster.ClusterDataListener
;
import
org.skywalking.apm.collector.core.framework.Handler
;
import
org.skywalking.apm.collector.core.module.ModuleConfigParser
;
...
...
@@ -52,6 +53,7 @@ public class AgentServerJettyModuleDefine extends AgentServerModuleDefine {
List
<
Handler
>
handlers
=
new
LinkedList
<>();
handlers
.
add
(
new
AgentStreamGRPCServerHandler
());
handlers
.
add
(
new
AgentStreamJettyServerHandler
());
handlers
.
add
(
new
UIJettyServerHandler
());
return
handlers
;
}
}
apm-collector/apm-collector-
ui/src/main/java/org/skywalking/apm/collector/ui
/jetty/handler/UIJettyServerHandler.java
→
apm-collector/apm-collector-
agentserver/src/main/java/org/skywalking/apm/collector/agentserver
/jetty/handler/UIJettyServerHandler.java
浏览文件 @
ce6d4c8d
package
org.skywalking.apm.collector.
ui
.jetty.handler
;
package
org.skywalking.apm.collector.
agentserver
.jetty.handler
;
import
com.google.gson.JsonArray
;
import
com.google.gson.JsonElement
;
...
...
apm-collector/apm-collector-boot/bin/collector-service.bat
0 → 100755
浏览文件 @
ce6d4c8d
@echo
off
setlocal
set
COLLECOTR_PROCESS_TITLE
=
Skywalking
-Collector
set
COLLECTOR_BASE_PATH
=
%~dp0
%
..
set
COLLECTOR_RUNTIME_OPTIONS
=
"-Xms256M -Xmx512M"
set
CLASSPATH
=
%COLLECTOR_BASE_PATH%
\config
;
SET
CLASSPATH
=
%COLLECTOR_BASE_PATH%
\libs\
*;
%CLASSPATH%
if
""
%JAVA_HOME%
""
==
""""
(
set
_EXECJAVA
=
java
)
else
(
set
_EXECJAVA
=
"
%JAVA_HOME%
"
/bin/java
)
start
/MIN
"
%COLLECOTR_PROCESS_TITLE%
"
%_EXECJAVA%
"
%COLLECTOR_RUNTIME_OPTIONS%
"
-cp
"
%CLASSPATH%
"
org
.skywalking.apm.collector.boot.CollectorBootStartUp
&
echo
Collector
started
successfully
!
endlocal
\ No newline at end of file
apm-collector/apm-collector-boot/bin/collector-service.sh
0 → 100755
浏览文件 @
ce6d4c8d
#!/usr/bin/env bash
PRG
=
"
$0
"
PRGDIR
=
`
dirname
"
$PRG
"
`
[
-z
"
$COLLECTOR_HOME
"
]
&&
COLLECTOR_HOME
=
`
cd
"
$PRGDIR
/.."
>
/dev/null
;
pwd
`
COLLECTOR_LOGS_DIR
=
"
${
COLLECTOR_HOME
}
/logs"
JAVA_OPTS
=
" -Xms256M -Xmx512M"
if
[
!
-d
"
${
COLLECTOR_HOME
}
/logs"
]
;
then
mkdir
-p
"
${
COLLECTOR_LOGS_DIR
}
"
fi
_RUNJAVA
=
${
JAVA_HOME
}
/bin/java
[
-z
"
$JAVA_HOME
"
]
&&
_RUNJAVA
=
`
java
`
CLASSPATH
=
"
$COLLECTOR_HOME
/config:
$CLASSPATH
"
for
i
in
"
$COLLECTOR_HOME
"
/libs/
*
.jar
do
CLASSPATH
=
"
$i
:
$CLASSPATH
"
done
echo
"Starting collector...."
eval exec
"
\"
$_RUNJAVA
\"
${
JAVA_OPTS
}
-classpath
$CLASSPATH
org.skywalking.apm.collector.boot.CollectorBootStartUp
\
2>
${
COLLECTOR_LOGS_DIR
}
/collector.log 1> /dev/null &"
retval
=
$?
pid
=
$!
FAIL_MSG
=
"Collector started failure!"
SUCCESS_MSG
=
"Collector started successfully!"
[
${
retval
}
-eq
0
]
||
(
echo
${
FAIL_MSG
}
;
exit
${
retval
}
)
sleep
1
if
!
ps
-p
${
pid
}
>
/dev/null
;
then
echo
${
FAIL_MSG
}
exit
1
fi
echo
${
SUCCESS_MSG
}
\ No newline at end of file
apm-collector/apm-collector-boot/bin/startup.bat
0 → 100755
浏览文件 @
ce6d4c8d
@echo
off
setlocal
call
"
%~dp0
"
\collector
-service
.bat
start
endlocal
\ No newline at end of file
apm-collector/apm-collector-boot/bin/startup.sh
0 → 100755
浏览文件 @
ce6d4c8d
#!/usr/bin/env bash
PRG
=
"
$0
"
PRGDIR
=
`
dirname
"
$PRG
"
`
EXECUTABLE
=
collector-service.sh
exec
"
$PRGDIR
"
/
"
$EXECUTABLE
"
start
\ No newline at end of file
apm-collector/apm-collector-boot/pom.xml
浏览文件 @
ce6d4c8d
...
...
@@ -12,6 +12,13 @@
<artifactId>
apm-collector-boot
</artifactId>
<packaging>
jar
</packaging>
<properties>
<main.class>
org.skywalking.apm.collector.boot.CollectorBootStartUp
</main.class>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<docker.image.name>
skywalking/${artifactId}
</docker.image.name>
<docker.image.version>
${version}
</docker.image.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.skywalking
</groupId>
...
...
@@ -54,4 +61,73 @@
<version>
${project.version}
</version>
</dependency>
</dependencies>
<build>
<finalName>
skywalking-collector
</finalName>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-jar-plugin
</artifactId>
<version>
2.3.2
</version>
<configuration>
<excludes>
<exclude>
*.xml
</exclude>
<exclude>
*.config
</exclude>
<exclude>
*.yml
</exclude>
</excludes>
<archive>
<manifest>
<mainClass>
${main.class}
</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
assembly
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
com.spotify
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<version>
${docker.plugin.version}
</version>
<configuration>
<skipDocker>
false
</skipDocker>
<imageName>
${docker.image.name}
</imageName>
<imageTags>
<imageTag>
${docker.image.version}
</imageTag>
</imageTags>
<dockerDirectory>
${project.basedir}/docker
</dockerDirectory>
<resources>
<resource>
<targetPath>
/
</targetPath>
<directory>
${project.build.directory}
</directory>
<include>
${build.finalName}.tar.gz
</include>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-resources-plugin
</artifactId>
<version>
2.4.3
</version>
<configuration>
<encoding>
${project.build.sourceEncoding}
</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
apm-collector/apm-collector-boot/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
ce6d4c8d
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<id></id>
<formats>
<format>
tar.gz
</format>
<format>
zip
</format>
</formats>
<dependencySets>
<dependencySet>
<outputDirectory>
/libs
</outputDirectory>
<scope>
runtime
</scope>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>
${project.basedir}/bin
</directory>
<outputDirectory>
/bin
</outputDirectory>
<includes>
<include>
*.sh
</include>
<include>
*.bat
</include>
</includes>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
src/main/resources
</directory>
<includes>
<include>
application.yml
</include>
<include>
logback.xml
</include>
</includes>
<outputDirectory>
/config
</outputDirectory>
</fileSet>
<fileSet>
<directory>
${project.build.directory}
</directory>
<outputDirectory>
/libs
</outputDirectory>
<includes>
<include>
${build.finalName}.jar
</include>
</includes>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
apm-collector/apm-collector-boot/src/main/resources/application.yml
浏览文件 @
ce6d4c8d
...
...
@@ -2,25 +2,32 @@ cluster:
zookeeper
:
hostPort
:
localhost:2181
sessionTimeout
:
100000
# redis:
#agent_server:
# jetty:
# host: localhost
# port: 6379
agentstream
:
grpc
:
host
:
localhost
port
:
1000
jetty
:
host
:
localhost
port
:
2000
context_path
:
/
discovery
:
grpc
:
localhost
port
:
1000
ui
:
jetty
:
host
:
localhost
port
:
12800
context_path
:
/
# port: 10800
# context_path: /
#agent_register:
# grpc:
# host: localhost
# port: 11800
# jetty:
# host: localhost
# port: 12800
# context_path: /
#agent_stream:
# grpc:
# host: localhost
# port: 11800
# jetty:
# host: localhost
# port: 12800
# context_path: /
#ui:
# jetty:
# host: localhost
# port: 12800
# context_path: /
storage
:
elasticsearch
:
cluster_name
:
CollectorDBCluster
...
...
apm-collector/apm-collector-boot/src/main/resources/logback.xml
浏览文件 @
ce6d4c8d
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property
name=
"LOG_PATH"
value=
"../logs"
/>
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<layout
class=
"ch.qos.logback.classic.PatternLayout"
>
<Pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</layout>
</appender>
<appender
name=
"FILE"
class=
"ch.qos.logback.core.FileAppender"
>
<file>
${LOG_PATH}/skywalking-server-log4j2.log
</file>
<append>
true
</append>
<immediateFlush>
true
</immediateFlush>
<encoder>
<Pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</encoder>
</appender>
<logger
name=
"org.skywalking.apm.collector.agentstream.worker.storage.PersistenceTimer"
level=
"INFO"
/>
<logger
name=
"org.eclipse.jetty"
level=
"INFO"
/>
...
...
@@ -12,5 +22,6 @@
<root
level=
"info"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"FILE"
/>
</root>
</configuration>
\ No newline at end of file
apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/util/DefinitionLoader.java
浏览文件 @
ce6d4c8d
package
org.skywalking.apm.collector.core.util
;
import
java.io.
File
Reader
;
import
java.io.
Buffered
Reader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.net.URL
;
import
java.util.Enumeration
;
import
java.util.Iterator
;
...
...
@@ -41,7 +42,8 @@ public class DefinitionLoader<D> implements Iterable<D> {
while
(
urlEnumeration
.
hasMoreElements
())
{
URL
definitionFileURL
=
urlEnumeration
.
nextElement
();
logger
.
info
(
"definition file url: {}"
,
definitionFileURL
.
getPath
());
properties
.
load
(
new
FileReader
(
definitionFileURL
.
getPath
()));
BufferedReader
bufferedReader
=
new
BufferedReader
(
new
InputStreamReader
(
definitionFileURL
.
openStream
()));
properties
.
load
(
bufferedReader
);
Enumeration
defineItem
=
properties
.
propertyNames
();
while
(
defineItem
.
hasMoreElements
())
{
...
...
apm-collector/apm-collector-ui/src/main/java/org/skywalking/apm/collector/ui/jetty/UIJettyModuleDefine.java
浏览文件 @
ce6d4c8d
...
...
@@ -14,7 +14,6 @@ import org.skywalking.apm.collector.ui.jetty.handler.SegmentTopGetHandler;
import
org.skywalking.apm.collector.ui.jetty.handler.SpanGetHandler
;
import
org.skywalking.apm.collector.ui.jetty.handler.TraceDagGetHandler
;
import
org.skywalking.apm.collector.ui.jetty.handler.TraceStackGetHandler
;
import
org.skywalking.apm.collector.ui.jetty.handler.UIJettyServerHandler
;
import
org.skywalking.apm.collector.ui.jetty.handler.application.ApplicationsGetHandler
;
import
org.skywalking.apm.collector.ui.jetty.handler.instancehealth.InstanceHealthGetHandler
;
import
org.skywalking.apm.collector.ui.jetty.handler.instancemetric.InstanceMetricGetOneTimeBucketHandler
;
...
...
@@ -59,7 +58,6 @@ public class UIJettyModuleDefine extends UIModuleDefine {
@Override
public
List
<
Handler
>
handlerList
()
{
List
<
Handler
>
handlers
=
new
LinkedList
<>();
handlers
.
add
(
new
UIJettyServerHandler
());
handlers
.
add
(
new
TraceDagGetHandler
());
handlers
.
add
(
new
SegmentTopGetHandler
());
handlers
.
add
(
new
TraceStackGetHandler
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录