skywalking-6.0.0-GA安装及配置

2019-01-31 官方从6.0.0-beta版更新为6.0.0-GA,今天刚去看了下,刚好觉得还有些地方需要修改了。顺带直接更新到6.的正式版。
https://github.com/apache/incubator-skywalking/blob/v6.0.0-GA/docs/others/cn/setup/README.md
官方的还是的todo的状态。

1、skywalking

1.1 skywalking安装

6.0.0-GA

打开以下链接招到对应系统的正式版本。以免错过最新版本。
http://www.apache.org/dyn/closer.cgi/incubator/skywalking/6.0.0-GA/apache-skywalking-apm-incubating-6.0.0-GA.zip

  • Windows

    #下载  		
    http://mirror.bit.edu.cn/apache/incubator/skywalking/6.0.0-GA/apache-skywalking-apm-incubating-6.0.0-GA.zip 
    
  • Linux

    # 下载
    wget http://mirrors.shu.edu.cn/apache/incubator/skywalking/6.0.0-GA/apache-skywalking-apm-incubating-6.0.0-GA.tar.gz
    #解压到 /data1/skywalking-6.0.0-GA 目录
    tar -xvf apache-skywalking-apm-incubating-6.0.0-GA.tar.gz -C /data1/skywalking-6.0.0-GA
    

1.2 运行

1.2.1 服务运行

1.2.2 客户端运行

  • Windows 示例

    java -javaagent:f:/data1/skywalking-6.0.0-GA/apache-skywalking-apm-incubating/agent/skywalking-agent.jar -jar f:/xxx(你自己的app包)-app.jar
    
  • Linux 示例

    java -javaagent:/data1/skywalking-6.0.0-GA/apache-skywalking-apm-incubating/agent/skywalking-agent.jar -jar /home/xxx(你自己的app包)-app.jar
    

1.3 服务端配置修改

  • 不修改配置也是能运行的。如果是看下效果,还是不修改配置的为好。

1.3.1 application.yml 配置修改参考如下

解压压后位于apache-skywalking-apm-incubating\config\下application.yml

1.3.1.2 配置 修改

主要是zookeeper,mysql,elasticsearch的配置。其中mysql配置方式最为特殊,也与5.X版本变化较大。
mysql 详细配置,详见 1.3.2.2 mysql

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cluster:
# standalone:
# Please check your ZooKeeper is 3.5+, However, it is also compatible with ZooKeeper 3.4.x. Replace the ZooKeeper 3.5+
# library the oap-libs folder with your ZooKeeper 3.4.x library.
#-----------------------zookeeper配置------------------------------------
# 此配置为开启状态
zookeeper:
    nameSpace: ${SW_NAMESPACE:""}
    hostPort: ${SW_CLUSTER_ZK_HOST_PORT:xxx.xxx.xxx.xxx:2181,xxx.xxx.xxx.xxx:2181,xxx.xxx.xxx.xxx:2181}
#-----------------------zookeeper配置------------------------------------
    #Retry Policy
    baseSleepTimeMs: ${SW_CLUSTER_ZK_SLEEP_TIME:1000} # initial amount of time to wait between retries
    maxRetries: ${SW_CLUSTER_ZK_MAX_RETRIES:3} # max number of times to retry
#  kubernetes:
#    watchTimeoutSeconds: ${SW_CLUSTER_K8S_WATCH_TIMEOUT:60}
#    namespace: ${SW_CLUSTER_K8S_NAMESPACE:default}
#    labelSelector: ${SW_CLUSTER_K8S_LABEL:app=collector,release=skywalking}
#    uidEnvName: ${SW_CLUSTER_K8S_UID:SKYWALKING_COLLECTOR_UID}
#  consul:
#    serviceName: ${SW_SERVICE_NAME:"SkyWalking_OAP_Cluster"}
#     Consul cluster nodes, example: 10.0.0.1:8500,10.0.0.2:8500,10.0.0.3:8500
#    hostPort: ${SW_CLUSTER_CONSUL_HOST_PORT:localhost:8500}
core:
default:
    restHost: ${SW_CORE_REST_HOST:0.0.0.0}
    restPort: ${SW_CORE_REST_PORT:12800}
    restContextPath: ${SW_CORE_REST_CONTEXT_PATH:/}
    gRPCHost: ${SW_CORE_GRPC_HOST:0.0.0.0}
    gRPCPort: ${SW_CORE_GRPC_PORT:11800}
    downsampling:
    - Hour
    - Day
    - Month
    # Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted.
    recordDataTTL: ${SW_CORE_RECORD_DATA_TTL:90} # Unit is minute
    minuteMetricsDataTTL: ${SW_CORE_MINUTE_METRIC_DATA_TTL:90} # Unit is minute
    hourMetricsDataTTL: ${SW_CORE_HOUR_METRIC_DATA_TTL:36} # Unit is hour
    dayMetricsDataTTL: ${SW_CORE_DAY_METRIC_DATA_TTL:45} # Unit is day
    monthMetricsDataTTL: ${SW_CORE_MONTH_METRIC_DATA_TTL:18} # Unit is month
storage:
#  h2:
#    driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource}
#    url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db}
#    user: ${SW_STORAGE_H2_USER:sa}
# --------------------------elasticsearch配置--------------------------
#  elasticsearch:
#    # nameSpace: ${SW_NAMESPACE:""}
#    clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:10.2.100.16:9200}
#    indexShardsNumber: ${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:2}
#    indexReplicasNumber: ${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:0}
#    # Batch process setting, refer to https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html
#    bulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:2000} # Execute the bulk every 2000 requests
#    bulkSize: ${SW_STORAGE_ES_BULK_SIZE:20} # flush the bulk every 20mb
#    flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:10} # flush the bulk every 10 seconds whatever the number of requests
#    concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requests
# --------------------------elasticsearch配置--------------------------
# --------------------------mysql配置--------------------------
# mysql配置后参见 本文 1.3.2.2 mysql 章节
mysql:
# --------------------------mysql配置--------------------------
receiver-register:
default:
receiver-trace:
default:
    bufferPath: ${SW_RECEIVER_BUFFER_PATH:../trace-buffer/}  # Path to trace buffer files, suggest to use absolute path
    bufferOffsetMaxFileSize: ${SW_RECEIVER_BUFFER_OFFSET_MAX_FILE_SIZE:100} # Unit is MB
    bufferDataMaxFileSize: ${SW_RECEIVER_BUFFER_DATA_MAX_FILE_SIZE:500} # Unit is MB
    bufferFileCleanWhenRestart: ${SW_RECEIVER_BUFFER_FILE_CLEAN_WHEN_RESTART:false}
    sampleRate: ${SW_TRACE_SAMPLE_RATE:10000} # The sample rate precision is 1/10000. 10000 means 100% sample in default.
receiver-jvm:
default:
#service-mesh:
#  default:
#    bufferPath: ${SW_SERVICE_MESH_BUFFER_PATH:../mesh-buffer/}  # Path to trace buffer files, suggest to use absolute path
#    bufferOffsetMaxFileSize: ${SW_SERVICE_MESH_OFFSET_MAX_FILE_SIZE:100} # Unit is MB
#    bufferDataMaxFileSize: ${SW_SERVICE_MESH_BUFFER_DATA_MAX_FILE_SIZE:500} # Unit is MB
#    bufferFileCleanWhenRestart: ${SW_SERVICE_MESH_BUFFER_FILE_CLEAN_WHEN_RESTART:false}
#istio-telemetry:
#  default:
#receiver_zipkin:
#  default:
#    host: ${SW_RECEIVER_ZIPKIN_HOST:0.0.0.0}
#    port: ${SW_RECEIVER_ZIPKIN_PORT:9411}
#    contextPath: ${SW_RECEIVER_ZIPKIN_CONTEXT_PATH:/}
query:
graphql:
    path: ${SW_QUERY_GRAPHQL_PATH:/graphql}
alarm:
default:

1.3.2注意需要点

1.3.2.1 elasticsearch
1.3.2.2 mysql
  • 必须使用 mysql-connector-java-5.1.36.jar 的包,可以用时从任意项目中maven配置获取jar包(自己搜索5.1.36的包,找到后改名为 mysql-connector-java-5.1.36.jar,5.x skywaking 复制到 apache-skywalking-apm-incubating\collector-libs\ 6.xskywaking 复制到 apache-skywalking-apm-incubating\oap-libs)。maven加入如下配置:

      <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.36</version>
      </dependency>
    
  • 启用 mysql必须 修改 datasource-settings.properties 修改如下。(加压后位于apache-skywalking-apm-incubating\config\)

      jdbcUrl=jdbc:mysql://xxx.xxx.xxx.xxx:3306/skywalking?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useSSL=false&logger=com.mysql.jdbc.log.Slf4JLogger
      dataSource.user=admin
      dataSource.password=admin
      dataSource.cachePrepStmts=true
      dataSource.prepStmtCacheSize=250
      dataSource.prepStmtCacheSqlLimit=2048
      dataSource.useServerPrepStmts=true
      dataSource.useLocalSessionState=true
      dataSource.rewriteBatchedStatements=true
      dataSource.cacheResultSetMetadata=true
      dataSource.cacheServerConfiguration=true
      dataSource.elideSetAutoCommits=true
      dataSource.maintainTimeStats=false
    

参考文档

链路追踪的功能对比文档参见:
https://blog.csdn.net/u012394095/article/details/79700200

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值