Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
润土的好友猹
SkyWalking
提交
d50a9f2c
S
SkyWalking
项目概览
润土的好友猹
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
9
Star
0
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
d50a9f2c
编写于
9月 16, 2017
作者:
A
ascrutae
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support collector image
上级
dae5c692
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
207 addition
and
24 deletion
+207
-24
apm-collector/apm-collector-boot/docker/Dockerfile
apm-collector/apm-collector-boot/docker/Dockerfile
+28
-0
apm-collector/apm-collector-boot/docker/application.yml
apm-collector/apm-collector-boot/docker/application.yml
+33
-0
apm-collector/apm-collector-boot/docker/collector-service.sh
apm-collector/apm-collector-boot/docker/collector-service.sh
+13
-0
apm-collector/apm-collector-boot/docker/docker-entrypoint.sh
apm-collector/apm-collector-boot/docker/docker-entrypoint.sh
+37
-0
apm-collector/apm-collector-boot/docker/log4j2.xml
apm-collector/apm-collector-boot/docker/log4j2.xml
+16
-0
apm-collector/apm-collector-boot/pom.xml
apm-collector/apm-collector-boot/pom.xml
+3
-3
apm-collector/apm-collector-boot/src/main/assembly/assembly.xml
...llector/apm-collector-boot/src/main/assembly/assembly.xml
+8
-0
apm-collector/apm-collector-boot/src/main/assembly/log4j2.xml
...collector/apm-collector-boot/src/main/assembly/log4j2.xml
+26
-0
apm-collector/apm-collector-boot/src/main/resources/log4j2.xml
...ollector/apm-collector-boot/src/main/resources/log4j2.xml
+4
-14
docker-compose.yml
docker-compose.yml
+39
-7
未找到文件。
apm-collector/apm-collector-boot/docker/Dockerfile
0 → 100644
浏览文件 @
d50a9f2c
FROM
openjdk:8u111-jdk
ENV
ZK_ADDRESSES=127.0.0.1:2181 \
ES_CLUSTER_NAME=CollectorDBCluster \
ES_ADDRESSES=localhost:9300 \
BIND_HOST=localhost \
CLUSTER_BIND_HOST=localhost \
CLUSTER_BIND_PORT=11800 \
UI_BIND_HOST=localhost \
UI_BIND_PORT=12800 \
GRPC_BIND_PORT=11800 \
AGENT_SERVER_BIND_PORT=10800 \
AGENT_STREAM_JETTY_BIND_PORT=12800
ADD
skywalking-collector.tar.gz /usr/local
COPY
collector-service.sh /usr/local/skywalking-collector/bin
COPY
log4j2.xml /usr/local/skywalking-collector/config
COPY
application.yml /usr/local/skywalking-collector/config
COPY
docker-entrypoint.sh /
RUN
chmod
+x /usr/local/skywalking-collector/bin/collector-service.sh
&&
chmod
+x /docker-entrypoint.sh
EXPOSE
10800
EXPOSE
11800
EXPOSE
12800
ENTRYPOINT
["/docker-entrypoint.sh"]
CMD
["/usr/local/skywalking-collector/bin/collector-service.sh"]
apm-collector/apm-collector-boot/docker/application.yml
0 → 100644
浏览文件 @
d50a9f2c
cluster
:
zookeeper
:
hostPort
:
{
ZK_ADDRESSES
}
sessionTimeout
:
100000
agent_server
:
jetty
:
host
:
{
BIND_HOST
}
port
:
{
AGENT_SERVER_BIND_PORT
}
context_path
:
/
agent_stream
:
grpc
:
host
:
{
BIND_HOST
}
port
:
{
GRPC_BIND_PORT
}
jetty
:
host
:
{
UI_BIND_HOST
}
port
:
{
UI_BIND_PORT
}
context_path
:
/
ui
:
jetty
:
host
:
{
UI_BIND_HOST
}
port
:
{
UI_BIND_PORT
}
context_path
:
/
collector_inside
:
grpc
:
host
:
{
CLUSTER_BIND_HOST
}
port
:
{
CLUSTER_BIND_PORT
}
storage
:
elasticsearch
:
cluster_name
:
{
ES_CLUSTER_NAME
}
cluster_transport_sniffer
:
true
cluster_nodes
:
{
ES_ADDRESSES
}
index_shards_number
:
2
index_replicas_number
:
0
apm-collector/apm-collector-boot/docker/collector-service.sh
0 → 100755
浏览文件 @
d50a9f2c
#!/usr/bin/env bash
PRG
=
"
$0
"
PRGDIR
=
`
dirname
"
$PRG
"
`
[
-z
"
$COLLECTOR_HOME
"
]
&&
COLLECTOR_HOME
=
`
cd
"
$PRGDIR
/.."
>
/dev/null
;
pwd
`
CLASSPATH
=
"
$COLLECTOR_HOME
/config:
$CLASSPATH
"
for
i
in
"
$COLLECTOR_HOME
"
/libs/
*
.jar
do
CLASSPATH
=
"
$i
:
$CLASSPATH
"
done
java
${
JAVA_OPTS
}
${
COLLECTOR_OPTIONS
}
-classpath
$CLASSPATH
org.skywalking.apm.collector.boot.CollectorBootStartUp
apm-collector/apm-collector-boot/docker/docker-entrypoint.sh
0 → 100644
浏览文件 @
d50a9f2c
#!/bin/sh
echo
"replace {ZK_ADDRESSES} to
${
ZK_ADDRESSES
}
"
eval sed
-i
-e
's/\{ZK_ADDRESSES\}/${ZK_ADDRESSES}/'
/usr/local/skywalking-collector/config/application.yml
echo
"replace {ES_CLUSTER_NAME} to
${
ES_CLUSTER_NAME
}
"
eval sed
-i
-e
's/\{ES_CLUSTER_NAME\}/${ES_CLUSTER_NAME}/'
/usr/local/skywalking-collector/config/application.yml
echo
"replace {ES_ADDRESSES} to
${
ES_ADDRESSES
}
"
eval sed
-i
-e
's/\{ES_ADDRESSES\}/${ES_ADDRESSES}/'
/usr/local/skywalking-collector/config/application.yml
echo
"replace {BIND_HOST} to
${
BIND_HOST
}
"
eval sed
-i
-e
's/\{BIND_HOST\}/${BIND_HOST}/'
/usr/local/skywalking-collector/config/application.yml
echo
"replace {GRPC_BIND_PORT} to
${
GRPC_BIND_PORT
}
"
eval sed
-i
-e
's/\{GRPC_BIND_PORT\}/${GRPC_BIND_PORT}/'
/usr/local/skywalking-collector/config/application.yml
echo
"replace {AGENT_SERVER_BIND_PORT} to
${
AGENT_SERVER_BIND_PORT
}
"
eval sed
-i
-e
's/\{AGENT_SERVER_BIND_PORT\}/${AGENT_SERVER_BIND_PORT}/'
/usr/local/skywalking-collector/config/application.yml
echo
"replace {AGENT_STREAM_JETTY_BIND_PORT} to
${
AGENT_STREAM_JETTY_BIND_PORT
}
"
eval sed
-i
-e
's/\{AGENT_STREAM_JETTY_BIND_PORT\}/${AGENT_STREAM_JETTY_BIND_PORT}/'
/usr/local/skywalking-collector/config/application.yml
echo
"replace {UI_BIND_HOST} to
${
UI_BIND_HOST
}
"
eval sed
-i
-e
's/\{UI_BIND_HOST\}/${UI_BIND_HOST}/'
/usr/local/skywalking-collector/config/application.yml
echo
"replace {UI_BIND_PORT} to
${
UI_BIND_PORT
}
"
eval sed
-i
-e
's/\{UI_BIND_PORT\}/${UI_BIND_PORT}/'
/usr/local/skywalking-collector/config/application.yml
echo
"replace {CLUSTER_BIND_HOST} to
${
CLUSTER_BIND_HOST
}
"
eval sed
-i
-e
's/\{CLUSTER_BIND_HOST\}/${CLUSTER_BIND_HOST}/'
/usr/local/skywalking-collector/config/application.yml
echo
"replace {CLUSTER_BIND_PORT} to
${
CLUSTER_BIND_PORT
}
"
eval sed
-i
-e
's/\{CLUSTER_BIND_PORT\}/${CLUSTER_BIND_PORT}/'
/usr/local/skywalking-collector/config/application.yml
exec
"
$@
"
apm-collector/apm-collector-boot/docker/log4j2.xml
0 → 100644
浏览文件 @
d50a9f2c
<?xml version="1.0" encoding="UTF-8"?>
<Configuration
status=
"debug"
>
<Appenders>
<Console
name=
"Console"
target=
"SYSTEM_OUT"
>
<PatternLayout
charset=
"UTF-8"
pattern=
"[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%p] - %l - %m%n"
/>
</Console>
</Appenders>
<Loggers>
<logger
name=
"org.eclipse.jetty"
level=
"INFO"
/>
<logger
name=
"org.apache.zookeeper"
level=
"INFO"
/>
<logger
name=
"org.skywalking.apm.collector.agentstream.worker.storage.PersistenceTimer"
level=
"INFO"
/>
<Root
level=
"INFO"
>
<AppenderRef
ref=
"Console"
/>
</Root>
</Loggers>
</Configuration>
apm-collector/apm-collector-boot/pom.xml
浏览文件 @
d50a9f2c
...
...
@@ -15,7 +15,7 @@
<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.name>
skywalking/
skywalking-collector
</docker.image.name>
<docker.image.version>
${version}
</docker.image.version>
</properties>
...
...
@@ -115,7 +115,7 @@
<resources>
<resource>
<targetPath>
/
</targetPath>
<directory>
${project.b
uild.directory}
</directory>
<directory>
${project.b
asedir}/../../packages
</directory>
<include>
${build.finalName}.tar.gz
</include>
</resource>
</resources>
...
...
@@ -131,4 +131,4 @@
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
</project>
apm-collector/apm-collector-boot/src/main/assembly/assembly.xml
浏览文件 @
d50a9f2c
...
...
@@ -27,10 +27,18 @@
<directory>
src/main/resources
</directory>
<includes>
<include>
application.yml
</include>
</includes>
<outputDirectory>
/config
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/assembly
</directory>
<includes>
<include>
log4j2.xml
</include>
</includes>
<outputDirectory>
/config
</outputDirectory>
</fileSet>
<fileSet>
<directory>
${project.build.directory}
</directory>
<outputDirectory>
/libs
</outputDirectory>
...
...
apm-collector/apm-collector-boot/src/main/assembly/log4j2.xml
0 → 100644
浏览文件 @
d50a9f2c
<?xml version="1.0" encoding="UTF-8"?>
<Configuration
status=
"error"
>
<Properties>
<Property
name=
"log-path"
>
${sys:collector.logDir}
</Property>
</Properties>
<Appenders>
<RollingFile
name=
"RollingFile"
fileName=
"${log-path}/skywalking-collector.log"
filePattern=
"${log-path}/skywalking-web-server-%d{yyyy-MM-dd}-%i.log"
>
<PatternLayout>
<pattern>
%d - %c -%-4r [%t] %-5p %x - %m%n
</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy
size=
"102400KB"
/>
</Policies>
<DefaultRolloverStrategy
max=
"30"
/>
</RollingFile>
</Appenders>
<Loggers>
<logger
name=
"org.eclipse.jetty"
level=
"INFO"
/>
<logger
name=
"org.apache.zookeeper"
level=
"INFO"
/>
<logger
name=
"org.skywalking.apm.collector.agentstream.worker.storage.PersistenceTimer"
level=
"INFO"
/>
<Root
level=
"info"
>
<AppenderRef
ref=
"RollingFile"
/>
</Root>
</Loggers>
</Configuration>
apm-collector/apm-collector-boot/src/main/resources/log4j2.xml
浏览文件 @
d50a9f2c
<?xml version="1.0" encoding="UTF-8"?>
<Configuration
status=
"error"
>
<Properties>
<Property
name=
"log-path"
>
${sys:collector.logDir}
</Property>
</Properties>
<Appenders>
<RollingFile
name=
"RollingFile"
fileName=
"${log-path}/skywalking-collector.log"
filePattern=
"${log-path}/skywalking-web-server-%d{yyyy-MM-dd}-%i.log"
>
<PatternLayout>
<pattern>
%d - %c -%-4r [%t] %-5p %x - %m%n
</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy
size=
"102400KB"
/>
</Policies>
<DefaultRolloverStrategy
max=
"30"
/>
</RollingFile>
<Console
name=
"Console"
target=
"SYSTEM_OUT"
>
<PatternLayout
charset=
"UTF-8"
pattern=
"%d - %c -%-4r [%t] %-5p %x - %m%n"
/>
</Console>
</Appenders>
<Loggers>
<logger
name=
"org.eclipse.jetty"
level=
"INFO"
/>
<logger
name=
"org.apache.zookeeper"
level=
"INFO"
/>
<logger
name=
"org.skywalking.apm.collector.agentstream.worker.storage.PersistenceTimer"
level=
"INFO"
/>
<Root
level=
"info"
>
<AppenderRef
ref=
"
RollingFi
le"
/>
<AppenderRef
ref=
"
Conso
le"
/>
</Root>
</Loggers>
</Configuration>
docker-compose.yml
浏览文件 @
d50a9f2c
version
:
'
2.1'
services
:
skywalking-webui
:
image
:
skywalking/sky
-walking-ui:3.1
-2017
image
:
skywalking/sky
walking-ui:3.2
-2017
expose
:
-
"
8080"
ports
:
-
"
8080:8080"
links
:
-
skywalking-collector
depends_on
:
skywalking-collector
:
condition
:
service_healthy
environment
:
-
COLLECTOR_SERVERS=skywalking-collector:1
2
800
-
COLLECTOR_SERVERS=skywalking-collector:1
0
800
skywalking-collector
:
image
:
skywalking/skywalking-collector:3.
1
-2017
image
:
skywalking/skywalking-collector:3.
2
-2017
expose
:
-
"
10800"
-
"
11800"
-
"
12800"
-
"
1000"
ports
:
-
"
12800:12800"
-
"
11800:11800"
-
"
10800:10800"
depends_on
:
es-server
:
condition
:
service_healthy
zookeeper-server
:
condition
:
service_healthy
links
:
-
es-server
-
zookeeper-server
environment
:
-
ES_CLUSTER_NODES=es-server:9300
-
HTTP_HOST_NAME=0.0.0.0
-
ZK_ADDRESSES=zookeeper-server:2181
-
ES_ADDRESSES=es-server:9300
-
BIND_HOST=0.0.0.0
-
UI_BIND_HOST=skywalking-collector
-
CLUSTER_BIND_HOST=0.0.0.0
healthcheck
:
test
:
[
"
CMD"
,
"
curl"
,
"
-f"
,
"
http://localhost:10800/agentstream/grpc"
]
interval
:
10s
timeout
:
10s
retries
:
5
zookeeper-server
:
image
:
zookeeper:3.4.9
expose
:
-
"
2181"
ports
:
-
"
2181:2181"
healthcheck
:
test
:
[
"
CMD"
,
"
/zookeeper-3.4.9/bin/zkServer.sh"
,
"
status"
]
interval
:
10s
timeout
:
10s
retries
:
5
es-server
:
image
:
elasticsearch:5.3
...
...
@@ -36,8 +65,11 @@ services:
expose
:
-
"
9200"
-
"
9300"
ports
:
-
"
9200:9200"
-
"
9300:9300"
healthcheck
:
test
:
[
"
CMD"
,
"
curl"
,
"
-f"
,
"
http://localhost:9200"
]
interval
:
3
0s
interval
:
1
0s
timeout
:
10s
retries
:
5
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录