调研Skywalking---实战篇

架构

SkyWalking is logically split into four parts: Probes, Platform backend, Storage and UI.

  • Probes collect data and reformat them for SkyWalking requirements (different probes support different sources).
  • Platform backend, supports data aggregation, analysis and drives process flow from probes to the UI. The analysis includes SkyWalking natives traces and metrics, 3rd party, including Istio and Envoy telemetry, Zipkin trace format, etc. You even can customize aggregation and analysis by using Observability Analysis Language for native metrics and Meter System for extension metrics.
  • Storage houses SkyWalking data through an open/plugable interface. You can choose an existing implementation, such as ElasticSearch, H2 or a MySQL cluster managed by Sharding-Sphere, or implement your own. Patches for new storage implementors welcome!
  • UI a highly customizale web based interface allowing SkyWalking end users to visualize and manage SkyWalking data.

部署

部署教程网上其实非常多。也讲得很清楚。因此这里就不详细展开。只列举重点关注项。

在Storage上,我们选择比较流行的ES作为存储引擎。

下载地址:https://archive.apache.org/dist/skywalking

解压后目录:

[admin@es-skywalking-prd-0001-10-2-0-200 skywalking-es7-v8.1.0]$ ll
total 7796
drwxrwxr-x 9 admin admin     176 Jul 31  2020 agent
drwxr-xr-x 2 admin admin     267 Aug 25 17:20 bin
drwxr-xr-x 5 admin admin     327 Aug 25 18:27 config
-rwxrwxr-x 1 admin admin   31177 Jul 31  2020 LICENSE
drwxrwxr-x 3 admin admin    4096 Aug 20  2020 licenses
drwxr-xr-x 2 admin admin   24576 Aug 30 20:14 logs
-rwxrwxr-x 1 admin admin   32140 Jul 31  2020 NOTICE
drwxrwxr-x 2 admin admin   12288 Jul 31  2020 oap-libs
-rw-rw-r-- 1 admin admin    1978 Jul 31  2020 README.txt
-rwxr-xr-x 1 admin admin 7873434 Sep  2  2020 skywalkingalarm
drwxr-xr-x 3 admin admin      30 Aug 20  2020 tools
drwxr-xr-x 2 admin admin      53 Aug 20  2020 webapp

agent:探针目录

oap-libs:oap服务运行jar包

webapp:web服务启动jar包

存储引擎安装

ES部署安装不在本篇文章的介绍范围以內

agent安装

将agent目录copy到各java应用服务目录下。这里演示k8s服务如何接入agent服务。

应用启动时,加入环境变量:

-javaagent:/path/to/agent/skywalking-agent.jar

-Dskywalking.agent.service_name=service name

-Dskywalking.collector.backend_service=skywalking backend : gRPCPort

服务挂外部持久卷,指向agent目录
服务挂外部持久卷,指向agent目录

平台后端、UI安装

启动前,修改config/application.yml,webapp/webapp.yml,调整启动的参数

bin/oapService.sh
bin/webappService.sh

使用

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述


版权声明:本文为xianweijian原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。