1、需求:有两台服务器分别装了app,对这些app进行性能监控
三台服务器:10.10.20.198作为服务端展示性能数据,10.10.20.64客户端,装btam系统,10.10.20.63客户端装任务管理系统和工作量系统。
2、所安装的软件版本如下:
(1)JDK1.8
(2)elasticsearch-5.6.8
(3)zookeeper-3.4.10(集群需要,单机可不装)
(4)apache-skywalking-apm-incubating-5.0.0
安装包下载地址:
链接:https://pan.baidu.com/s/1kOhSdTgIFO2OsbOeIzoO0g
提取码:qsqa
2.1 JDK安装及配置环境变量(略)
2.2 elasticsearch-5.6.8配置
将elasticsearch-5.6.8拷贝到客户端指定文件夹,
修改D:\elasticsearch-5.6.8\config\elasticsearch.yml
启动D:\elasticsearch-5.6.8\bin\elasticsearch.bat
启动成功可在浏览器通过http://10.10.20.63:9200查看
cluster.name: CollectorDBCluster
node.name: node-3 #设置唯一的节点名称
node.max_local_storage_nodes: 4
node.attr.rack: r1
path.data: D:/elasticsearch-5.6.8/data
path.logs: D:/elasticsearch-5.6.8/logs
network.host: 10.10.20.63
thread_pool.bulk.queue_size: 1000
http.port: 9200
discovery.zen.ping.unicast.hosts: ["10.10.20.198:9300","10.10.20.64:9300","10.10.20.63:9300"]
discovery.zen.minimum_master_nodes: 1
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
2.3 zookeeper-3.4.10
将zookeeper包分别拷贝到各个服务器,修改D:\zookeeper\conf\zoo.conf
在dataDir制定的文件夹D:\zookeeper\data下新建文件myid,无后缀名,文件内容为server的序号:1,序号必须与其对应的服务器保持一致
按服务器的顺序先后启动D:\zookeeper\bin\zkserver.cmd
tickTime=2000
initLimit=10
syncLimit=5
dataDir=D:\\zookeeper\\data
dataLogDir=D:\\zookeeper\\logs
clientPort=2181
server.1=10.10.20.198:2888:3888
server.2=10.10.20.64:2888:3888
server.3=10.10.20.63:2888:3888
2.4 服务端collector
修改apache-skywalking-apm-incubating\config\application.yml
启动apache-skywalking-apm-incubating\bin\collectorService.bat
修改的配置如下:
cluster:
zookeeper:
hostPort: 10.10.20.198:2181,10.10.20.64:2181,10.10.20.63:2181
sessionTimeout: 100000
naming:
jetty:
host: 10.10.20.198
remote:
gRPC:
host: 10.10.20.198
agent_gRPC:
gRPC:
host: 10.10.20.198
agent_jetty:
jetty:
host: 10.10.20.198
ui:
jetty:
host: 10.10.20.198
storage:
elasticsearch:
clusterName: CollectorDBCluster
clusterNodes: 10.10.20.198:9300,10.10.20.64:9300,10.10.20.63:9300
2.5 服务端webui配置
修改apache-skywalking-apm-incubating\webapp\webapp.yml
启动apache-skywalking-apm-incubating\bin\webappservice.bat
server:
port: 8080
collector:
path: /graphql
ribbon:
ReadTimeout: 10000
listOfServers: 127.0.0.1:10800
2.6 客户端collector配置
单独下载skywalking-collector包到客户端
修改D:\skywalking-collector\config\collector.conf
启动D:\skywalking-collector\bin\collector-service.bat
cluster.current.hostname = 10.10.20.63 #当前服务器
cluster.seed_nodes=10.10.20.63:11800 #当前服务器
es.cluster.nodes=10.10.20.63:9300,10.10.20.198:9300,10.10.20.64:9300
http.hostname=10.10.20.198 #服务端webui所在服务器
2.7 客户端agent配置
将agent文件夹拷贝到客户端服务器
修改C:\jetty\agent\config\agent.config
设置系统环境变量,然后启动app
JAVA_TOOL_OPTIONS=-javaagent:C:/jetty/agent/skywalking-agent.jar,
或者直接使用如下命令启动app
Java -javaagent:C:/jetty/agent/skywalking-agent.jar -jar asset.jar
修改的配置如下:
agent.application_code=CollectorDBCluster
collector.direct_servers=10.10.20.63:11800,10.10.20.64:11800,10.10.20.198:11800
2.8 页面访问 http://10.10.20.198:8080
相关文章
- 12-26flask项目部署步骤
- 12-26Flask-爱家租房项目ihome-11-Docker-compose部署flask+celery
- 12-26nginx+gunicorn部署Django项目
- 12-26django+nginx+gunicorn+supervisro部署
- 12-26Flask_环境部署(十六)
- 12-26部署flask
- 12-26Docker 部署 Flask应用
- 12-26idea插件Alibaba Cloud结合supervisorctl自动化部署
- 12-26python – 部署Django,supervisorctl异常终止
- 12-26在AWS EC2上部署django应用程序时,无法在端口80上运行gunicorn