skywalking5集群部署
准备环境
- skywalking-5.0.0-GA
- zookeeper-3.4.10
- elasticsearch-5.6.14
下载地址如下:
skywalking: http://skywalking.apache.org/downloads/
zookeeper: http://mirrors.hust.edu.cn/apache/zookeeper/
elasticsearch: https://www.elastic.co/downloads/past-releases
安装zk集群
- 下载并解压zk
1
2wget http://mirrors.hust.edu.cn/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
tar -xvf zookeeper-3.4.10.tar.gz - 修改配置文件
1
2
3cd zookeeper-3.4.10/conf/
cp zoo_sample.cfg zoo.cfg
vim zoo.cfg - 内容如下
1
2
3
4
5
6
7tickTime=2000
initLimit=10
syncLimit=5
dataDir=/opt/export/app/zookeeper-3.4.10/data
clientPort=2181
server.1=192.168.***.236:2888:3888
server.2=192.168.***.237:2888:3888 - 写入集群myid
1
2echo 1 > /opt/export/app/zookeeper-3.4.10/data/myid
# 另一台机器则写入2 - zk基本命令
1
2
3
4
5
6
7
8
9
10
11# 在zk的bin目录下
# 启动
./zkServer.sh start
# 停止
./zkServer.sh stop
# 查看状态
./zkServer.sh status
# 查看zk的节点
./zkCli.sh
# 连接后使用 ls / 命令查看
ls /skywalking
安装es集群
- 下载并解压es
1
2wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.14.tar.gz
tar -xvf elasticsearch-5.6.14.tar.gz - 修改配置文件
1
2cd elasticsearch-5.6.14/config/
vim elasticsearch.yml - 内容如下
1
2
3
4
5
6
7
8
9
10
11cluster.name: CollectorDBCluster
node.name: node-1
path.data: /opt/export/app/elasticsearch-5.6.14/data
path.logs: /opt/export/app/elasticsearch-5.6.14/logs
network.host: 192.168.***.234
discovery.zen.ping.unicast.hosts: ["192.168.***.234:9300", "192.168.***.235:9300"]
discovery.zen.minimum_master_nodes: 2
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
# 修改上报数据线程池大小
thread_pool.bulk.queue_size: 1000 - 常用命令
1
2
3
4# 后台启动
bin/elasticsearch -d
# 删除所有索引
curl -XDELETE 192.168.***.234:9200/*
安装skywalking
☞ 官方地址
- 下载并解压
1
2
3wget http://mirrors.shu.edu.cn/apache/incubator/skywalking/5.0.0-GA/apache-skywalking-apm-incubating-5.0.0-GA.tar.gz
tar -xvf apache-skywalking-apm-incubating-5.0.0-GA.tar.gz
mv apache-skywalking-apm-incubating-5.0.0-GA skywalking-5.0.0-GA - 修改配置
1
2cd skywalking-5.0.0-GA/config/
vim application.yml - 修改内容如下
- 集群配置
1
2
3
4cluster:
zookeeper:
hostPort: 192.168.***.236:2181,192.168.***.237:2181
sessionTimeout: 100000 - es配置
1
2
3
4
5
6storage:
elasticsearch:
clusterName: CollectorDBCluster
clusterTransportSniffer: true
clusterNodes: 192.168.***.234:9300,192.168.***.235:9300
# 其他配置 - 其他配置
1
2# host配置修改
host: 192.168.***.236
- 集群配置
- 修改webapp配置
1
vim webapp/webapp.yml
1
2
3
4
5collector:
path: /graphql
ribbon:
ReadTimeout: 10000
listOfServers: 192.168.**.236:10800,192.168.**.237:10800 - 常用命令
1
2
3
4
5# 启动collector+webUI
bin/startup.sh
# 只启动collector或webUI
bin/collectorService.sh
bin/webappService.sh - 探针使用
☞ 官方地址
java -javaagent:/path/to/skywalking-agent/skywalking-agent.jar -jar yourApp.jar
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 程序员小航!
评论