Skywalking Agent配置及使用

准备安装文件

# 下载安装包
wget -c -P /tmp http://mirrors.hust.edu.cn/apache/incubator/skywalking/5.0.0-GA/apache-skywalking-apm-incubating-5.0.0-GA.tar.gz

# 解压
tar xf /tmp/apache-skywalking-apm-incubating-5.0.0-GA.tar.gz -C /tmp

# 拷贝到安装位置
mkdir -p /home/test/apps/skywalking-agent;\
mv /tmp/apache-skywalking-apm-incubating/agent /home/test/apps/skywalking-agent/5.0.0;\
ln -s /home/test/apps/skywalking-agent/5.0.0 /home/test/apps/skywalking-agent/current;\
chown -R svwcop. /home/test/apps

配置Agent

# 备份配置文件
mv /home/test/apps/skywalking-agent/current/config/agent.config /home/test/apps/skywalking-agent/current/config/agent.config_bak

# 创建配置文件
tee /home/test/apps/skywalking-agent/current/config/agent.config << 'EOF'
# 命名空间,一般是项目编码
agent.namespace=cop
# Collector认证Token
agent.authentication=Password_1234
# 每3秒收集的请求数,负数表示全部收集
agent.sample_n_per_3_secs=-1
agent.span_limit_per_segment=300
# 排除项
agent.ignore_suffix=.jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,.mp4,.html,.svg
agent.is_open_debugging_class=false

collector.servers=192.168.1.41:10800,192.168.1.42:10800,192.168.1.43:10800
logging.level=WARN
EOF

应用启动配置VM参数

-javaagent:/home/test/apps/skywalking-agent/current/skywalking-agent.jar -Dskywalking.agent.application_code=test-app
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章