Commit 666d8bff authored by 马超's avatar 马超

doc: 修改安装部署文档

parent a4eceeb1
...@@ -56,14 +56,191 @@ tar -zxvf apache-skywalking-apm-8.8.1.tar.gz ...@@ -56,14 +56,191 @@ tar -zxvf apache-skywalking-apm-8.8.1.tar.gz
└── webapp.yml # ui配置文件 └── webapp.yml # ui配置文件
``` ```
## 二、配置文件解释及修改 ## 二、配置文件修改
切换到config目录,最重要的配置文件是`application.yml` 切换到config目录,最重要的配置文件是`application.yml`,配置详看最后一节。这里主要描述三种配置:
### 2.1、集群配置(单体、集群)
```yml
# 集群配置
cluster:
# 默认是以单机方式启动,如果想以集群方式启动,建议使用Nacos
selector: ${SW_CLUSTER:standalone}
# 单机版
standalone:
# nacos 注册集群配置
nacos:
serviceName: ${SW_SERVICE_NAME:"SkyWalking_OAP_Cluster"}
hostPort: ${SW_CLUSTER_NACOS_HOST_PORT:nacos-server0:8018}
# Nacos Configuration namespace
namespace: ${SW_CLUSTER_NACOS_NAMESPACE:"public"}
# Nacos auth username
username: ${SW_CLUSTER_NACOS_USERNAME:""}
password: ${SW_CLUSTER_NACOS_PASSWORD:""}
# Nacos auth accessKey
accessKey: ${SW_CLUSTER_NACOS_ACCESSKEY:""}
secretKey: ${SW_CLUSTER_NACOS_SECRETKEY:""}
```
cluster配置模式是单体方式启动OAP服务,如果需要集群启动,只需要将
```yml
selector: ${SW_CLUSTER:standalone}
```
修改为
```yml
selector: ${SW_CLUSTER:nacos}
```
并配置nacos的访问地址,username(用户名)、password(密码信息)即可。
### 2.2、核心配置
核心配置包含很多数据,这里我们重点关注端口配置即可
- 11800:和Skywalking通信的gRPC端口
- 12800:和Skywalking通信的HTTP端口
修改HTTP端口,找到restPort配置,修改端口值即可
```yml
restPort: ${SW_CORE_REST_PORT:12800}
```
修改gRPC端口,找到gRPCPort配置,修改端口值即可
```yml
gRPCPort: ${SW_CORE_GRPC_PORT:11800}
```
需要注意的是,这些端口修改后,SkyWalking UI对应的配置文件中,与OAP服务交互的配置也需要修改
### 2.3、存储配置
存储配置默认是使用h2数据库,重启SkyWalking后数据会丢失,SkyWalking支持多种存储方式,这里推荐使用mysql
```yml
# 存储配置
storage:
# 默认使用h2数据库
selector: ${SW_STORAGE:h2}
# h2配置
h2:
driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource}
url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db;DB_CLOSE_DELAY=-1}
user: ${SW_STORAGE_H2_USER:sa}
metadataQueryMaxSize: ${SW_STORAGE_H2_QUERY_MAX_SIZE:5000}
maxSizeOfArrayColumn: ${SW_STORAGE_MAX_SIZE_OF_ARRAY_COLUMN:20}
numOfSearchableValuesPerTag: ${SW_STORAGE_NUM_OF_SEARCHABLE_VALUES_PER_TAG:2}
maxSizeOfBatchSql: ${SW_STORAGE_MAX_SIZE_OF_BATCH_SQL:100}
asyncBatchPersistentPoolSize: ${SW_STORAGE_ASYNC_BATCH_PERSISTENT_POOL_SIZE:1}
# mysql配置
mysql:
properties:
# mysql链接地址
jdbcUrl: ${SW_JDBC_URL:"jdbc:mysql://localhost:3306/swtest?rewriteBatchedStatements=true"}
# 用户名
dataSource.user: ${SW_DATA_SOURCE_USER:root}
# 密码
dataSource.password: ${SW_DATA_SOURCE_PASSWORD:root@1234}
dataSource.cachePrepStmts: ${SW_DATA_SOURCE_CACHE_PREP_STMTS:true}
dataSource.prepStmtCacheSize: ${SW_DATA_SOURCE_PREP_STMT_CACHE_SQL_SIZE:250}
dataSource.prepStmtCacheSqlLimit: ${SW_DATA_SOURCE_PREP_STMT_CACHE_SQL_LIMIT:2048}
dataSource.useServerPrepStmts: ${SW_DATA_SOURCE_USE_SERVER_PREP_STMTS:true}
metadataQueryMaxSize: ${SW_STORAGE_MYSQL_QUERY_MAX_SIZE:5000}
maxSizeOfArrayColumn: ${SW_STORAGE_MAX_SIZE_OF_ARRAY_COLUMN:20}
numOfSearchableValuesPerTag: ${SW_STORAGE_NUM_OF_SEARCHABLE_VALUES_PER_TAG:2}
maxSizeOfBatchSql: ${SW_STORAGE_MAX_SIZE_OF_BATCH_SQL:2000}
asyncBatchPersistentPoolSize: ${SW_STORAGE_ASYNC_BATCH_PERSISTENT_POOL_SIZE:4}
```
切换到mysql需要修改h2 为mysql,并修改mysql的链接地址、用户名、密码。
```yml
selector: ${SW_STORAGE:mysql}
```
**PS:SkyWalking没有mysql驱动,需要根据自己需要将驱动下载或拷贝到oap-libs目录下**
参考样例:
```shell
# 切换到oap-libs目录下
cd aop-libs/
# 下载mysql驱动
wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar
```
### 2.4、UI端口修改
UI的配置文件位于webapp目录下,修改webapp.yml文件
```yaml
server:
# UI服务的默认端口
port: 8080
spring:
cloud:
gateway:
routes:
- id: oap-route
uri: lb://oap-service
predicates:
- Path=/graphql/**
discovery:
client:
simple:
instances:
oap-service:
# 如果在核心配置处修改了OAP端口,则需要修改此处配置
- uri: http://127.0.0.1:12800
mvc:
throw-exception-if-no-handler-found: true
web:
resources:
add-mappings: true
management:
server:
base-path: /manage
```
## 三、启动SkyWalking
配置文件修改后,就可以启动SkyWalking了,SkyWalking里面有两个东西需要启动,一个是ui服务,一个是oap(Observability Analysis Platform)分析服务.
```shell
# 切换到bin目录下
cd bin
# 启动oap服务和ui服务
./startup.sh
```
也可以单独启动服务
```shell
# 启动oap服务
./oapService.sh
# 启动ui服务
./webappService.sh
```
服务启动好后,访问:http://部署服务器ip/8080
## 四、配置详解
```yml ```yml
#集群配置 #集群配置
cluster: cluster:
# 选择哪一种集群模式,默认配置为单机模式 # 选择哪一种集群模式
selector: ${SW_CLUSTER:standalone} selector: ${SW_CLUSTER:standalone}
# 单机版 # 单机版
standalone: standalone:
...@@ -109,10 +286,7 @@ cluster: ...@@ -109,10 +286,7 @@ cluster:
# Nacos auth accessKey # Nacos auth accessKey
accessKey: ${SW_CLUSTER_NACOS_ACCESSKEY:""} accessKey: ${SW_CLUSTER_NACOS_ACCESSKEY:""}
secretKey: ${SW_CLUSTER_NACOS_SECRETKEY:""} secretKey: ${SW_CLUSTER_NACOS_SECRETKEY:""}
``` #核心配置
```yml
# core核心配置
core: core:
#配置选择 #配置选择
selector: ${SW_CORE:default} selector: ${SW_CORE:default}
...@@ -189,10 +363,7 @@ core: ...@@ -189,10 +363,7 @@ core:
searchableTracesTags: ${SW_SEARCHABLE_TAG_KEYS:http.method,status_code,db.type,db.instance,mq.queue,mq.topic,mq.broker} searchableTracesTags: ${SW_SEARCHABLE_TAG_KEYS:http.method,status_code,db.type,db.instance,mq.queue,mq.topic,mq.broker}
# 定义一组日志标记键,该键应该可以通过GraphQL进行搜索。 # 定义一组日志标记键,该键应该可以通过GraphQL进行搜索。
searchableLogsTags: ${SW_SEARCHABLE_LOGS_TAG_KEYS:level} searchableLogsTags: ${SW_SEARCHABLE_LOGS_TAG_KEYS:level}
``` # 存储配置
```yml
# storage数据存储配置
storage: storage:
# 选择数据存储类型 # 选择数据存储类型
selector: ${SW_STORAGE:elasticsearch7} selector: ${SW_STORAGE:elasticsearch7}
...@@ -243,13 +414,101 @@ storage: ...@@ -243,13 +414,101 @@ storage:
oapLogAnalyzer: ${SW_STORAGE_ES_OAP_LOG_ANALYZER:"{\"analyzer\":{\"oap_log_analyzer\":{\"type\":\"standard\"}}}"} # the oap log analyzer. It could be customized by the ES analyzer configuration to support more language log formats, such as Chinese log, Japanese log and etc. oapLogAnalyzer: ${SW_STORAGE_ES_OAP_LOG_ANALYZER:"{\"analyzer\":{\"oap_log_analyzer\":{\"type\":\"standard\"}}}"} # the oap log analyzer. It could be customized by the ES analyzer configuration to support more language log formats, such as Chinese log, Japanese log and etc.
# 高级配置 # 高级配置
advanced: ${SW_STORAGE_ES_ADVANCED:""} advanced: ${SW_STORAGE_ES_ADVANCED:""}
``` # es7版本配置
elasticsearch7:
```yml nameSpace: ${SW_NAMESPACE:""}
# agent-analyzer :接收探针代理配置 clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:10.2.55.29:9201}
protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"}
trustStorePath: ${SW_STORAGE_ES_SSL_JKS_PATH:""}
trustStorePass: ${SW_STORAGE_ES_SSL_JKS_PASS:""}
# 索引步长
dayStep: ${SW_STORAGE_DAY_STEP:1}
# 索引分片
indexShardsNumber: ${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:1}
# 索引副本
indexReplicasNumber: ${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:1}
# 大数据索引步长,默认与dayStep一致
superDatasetDayStep: ${SW_SUPERDATASET_STORAGE_DAY_STEP:-1}
# 大数据索引分片因子,分片数为indexShardsNumber*superDatasetIndexShardsFactor
# 此因素也会影响Zipkin和Jaeger的踪迹。
superDatasetIndexShardsFactor: ${SW_STORAGE_ES_SUPER_DATASET_INDEX_SHARDS_FACTOR:5}
# 大数据索引副本数
superDatasetIndexReplicasNumber:
${SW_STORAGE_ES_SUPER_DATASET_INDEX_REPLICAS_NUMBER:0}
user: ${SW_ES_USER:""}
password: ${SW_ES_PASSWORD:""}
# 安全管理文件,内容包括用户名/密码,由第三方工具管理。
secretsManagementFile: ${SW_ES_SECRETS_MANAGEMENT_FILE:""}
# 异步批量写库,默认1000条
bulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:1000}
# 同步批量写库,默认5w条
syncBulkActions: ${SW_STORAGE_ES_SYNC_BULK_ACTIONS:50000}
# 按时间写库,默认10秒
flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:10}
# 并发入库请求数
concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2}
# 查询结果返回条数,每次查询返回的数据条数
resultWindowMaxSize: ${SW_STORAGE_ES_QUERY_MAX_WINDOW_SIZE:10000}
# 元数据查询最大条数
metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:5000}
# 分段查询最大条数
segmentQueryMaxSize: ${SW_STORAGE_ES_QUERY_SEGMENT_SIZE:200}
# 任务查询最大条数
profileTaskQueryMaxSize: ${SW_STORAGE_ES_QUERY_PROFILE_TASK_SIZE:200}
# oap分析器
oapAnalyzer: ${SW_STORAGE_ES_OAP_ANALYZER:"{\"analyzer\":{\"oap_analyzer\":{\"type\":\"stop\"}}}"} # the oap analyzer.
# oap日志分析器,支持更多语言分析
oapLogAnalyzer: ${SW_STORAGE_ES_OAP_LOG_ANALYZER:"{\"analyzer\":{\"oap_log_analyzer\":{\"type\":\"standard\"}}}"}
advanced: ${SW_STORAGE_ES_ADVANCED:""}
h2:
driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource}
url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db;DB_CLOSE_DELAY=-1}
user: ${SW_STORAGE_H2_USER:sa}
metadataQueryMaxSize: ${SW_STORAGE_H2_QUERY_MAX_SIZE:5000}
maxSizeOfArrayColumn: ${SW_STORAGE_MAX_SIZE_OF_ARRAY_COLUMN:20}
numOfSearchableValuesPerTag: ${SW_STORAGE_NUM_OF_SEARCHABLE_VALUES_PER_TAG:2}
mysql:
properties:
jdbcUrl: ${SW_JDBC_URL:"jdbc:mysql://localhost:3306/swtest"}
dataSource.user: ${SW_DATA_SOURCE_USER:root}
dataSource.password: ${SW_DATA_SOURCE_PASSWORD:root@1234}
dataSource.cachePrepStmts: ${SW_DATA_SOURCE_CACHE_PREP_STMTS:true}
dataSource.prepStmtCacheSize: ${SW_DATA_SOURCE_PREP_STMT_CACHE_SQL_SIZE:250}
dataSource.prepStmtCacheSqlLimit: ${SW_DATA_SOURCE_PREP_STMT_CACHE_SQL_LIMIT:2048}
dataSource.useServerPrepStmts: ${SW_DATA_SOURCE_USE_SERVER_PREP_STMTS:true}
metadataQueryMaxSize: ${SW_STORAGE_MYSQL_QUERY_MAX_SIZE:5000}
maxSizeOfArrayColumn: ${SW_STORAGE_MAX_SIZE_OF_ARRAY_COLUMN:20}
numOfSearchableValuesPerTag: ${SW_STORAGE_NUM_OF_SEARCHABLE_VALUES_PER_TAG:2}
tidb:
properties:
jdbcUrl: ${SW_JDBC_URL:"jdbc:mysql://localhost:4000/tidbswtest"}
dataSource.user: ${SW_DATA_SOURCE_USER:root}
dataSource.password: ${SW_DATA_SOURCE_PASSWORD:""}
dataSource.cachePrepStmts: ${SW_DATA_SOURCE_CACHE_PREP_STMTS:true}
dataSource.prepStmtCacheSize: ${SW_DATA_SOURCE_PREP_STMT_CACHE_SQL_SIZE:250}
dataSource.prepStmtCacheSqlLimit: ${SW_DATA_SOURCE_PREP_STMT_CACHE_SQL_LIMIT:2048}
dataSource.useServerPrepStmts: ${SW_DATA_SOURCE_USE_SERVER_PREP_STMTS:true}
dataSource.useAffectedRows: ${SW_DATA_SOURCE_USE_AFFECTED_ROWS:true}
metadataQueryMaxSize: ${SW_STORAGE_MYSQL_QUERY_MAX_SIZE:5000}
maxSizeOfArrayColumn: ${SW_STORAGE_MAX_SIZE_OF_ARRAY_COLUMN:20}
numOfSearchableValuesPerTag: ${SW_STORAGE_NUM_OF_SEARCHABLE_VALUES_PER_TAG:2}
influxdb:
# InfluxDB configuration
url: ${SW_STORAGE_INFLUXDB_URL:http://localhost:8086}
user: ${SW_STORAGE_INFLUXDB_USER:root}
password: ${SW_STORAGE_INFLUXDB_PASSWORD:}
database: ${SW_STORAGE_INFLUXDB_DATABASE:skywalking}
actions: ${SW_STORAGE_INFLUXDB_ACTIONS:1000} # the number of actions to collect
duration: ${SW_STORAGE_INFLUXDB_DURATION:1000} # the time to wait at most (milliseconds)
batchEnabled: ${SW_STORAGE_INFLUXDB_BATCH_ENABLED:true}
fetchTaskLogMaxSize: ${SW_STORAGE_INFLUXDB_FETCH_TASK_LOG_MAX_SIZE:5000} # the max number of fetch task log in a request
connectionResponseFormat: ${SW_STORAGE_INFLUXDB_CONNECTION_RESPONSE_FORMAT:MSGPACK} # the response format of connection to influxDB, cannot be anything but MSGPACK or JSON.
# 接收探针代理配置
agent-analyzer: agent-analyzer:
selector: ${SW_AGENT_ANALYZER:default} selector: ${SW_AGENT_ANALYZER:default}
default: default:
# 采样率,精度为1/10000,采样率越高,处理存储的数据越大。
sampleRate: ${SW_TRACE_SAMPLE_RATE:10000}
# 慢数据访问阀值,单位ms # 慢数据访问阀值,单位ms
slowDBAccessThreshold: ${SW_SLOW_DB_THRESHOLD:default:200,mongodb:100} slowDBAccessThreshold: ${SW_SLOW_DB_THRESHOLD:default:200,mongodb:100}
# 开启采样率时,开启对错误分段数据全部保持,防止没有处理错误数据。 # 开启采样率时,开启对错误分段数据全部保持,防止没有处理错误数据。
...@@ -264,78 +523,236 @@ agent-analyzer: ...@@ -264,78 +523,236 @@ agent-analyzer:
# 慢跟踪阀值,花费更多的时间进行采样,开启采样机,-1不对慢跟踪采样。 # 慢跟踪阀值,花费更多的时间进行采样,开启采样机,-1不对慢跟踪采样。
slowTraceSegmentThreshold: ${SW_SLOW_TRACE_SEGMENT_THRESHOLD:-1} slowTraceSegmentThreshold: ${SW_SLOW_TRACE_SEGMENT_THRESHOLD:-1}
# 可以被分析的文件,用“,”逗号分隔 # 可以被分析的文件,用“,”逗号分隔
meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:spring-sleuth.yaml} meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:spring-sleuth.yaml}
``` # 日志分析,主要是对前端采集到的日志
log-analyzer:
selector: ${SW_LOG_ANALYZER:default}
default:
lalFiles: ${SW_LOG_LAL_FILES:default}
malFiles: ${SW_LOG_MAL_FILES:""}
## 三、UI端口修改 event-analyzer:
selector: ${SW_EVENT_ANALYZER:default}
修改./webapp/webapp.yml文件 default:
# 共享服务器
```shell receiver-sharing-server:
vim webapp/webapp.yml selector: ${SW_RECEIVER_SHARING_SERVER:default}
``` default:
# For Jetty server
```yaml restHost: ${SW_RECEIVER_SHARING_REST_HOST:0.0.0.0}
server: restPort: ${SW_RECEIVER_SHARING_REST_PORT:0}
port: 8080 restContextPath: ${SW_RECEIVER_SHARING_REST_CONTEXT_PATH:/}
restMinThreads: ${SW_RECEIVER_SHARING_JETTY_MIN_THREADS:1}
spring: restMaxThreads: ${SW_RECEIVER_SHARING_JETTY_MAX_THREADS:200}
cloud: restIdleTimeOut: ${SW_RECEIVER_SHARING_JETTY_IDLE_TIMEOUT:30000}
gateway: restAcceptorPriorityDelta: ${SW_RECEIVER_SHARING_JETTY_DELTA:0}
routes: restAcceptQueueSize: ${SW_RECEIVER_SHARING_JETTY_QUEUE_SIZE:0}
- id: oap-route # For gRPC server
uri: lb://oap-service gRPCHost: ${SW_RECEIVER_GRPC_HOST:0.0.0.0}
predicates: gRPCPort: ${SW_RECEIVER_GRPC_PORT:0}
- Path=/graphql/** maxConcurrentCallsPerConnection: ${SW_RECEIVER_GRPC_MAX_CONCURRENT_CALL:0}
discovery: maxMessageSize: ${SW_RECEIVER_GRPC_MAX_MESSAGE_SIZE:0}
client: gRPCThreadPoolQueueSize: ${SW_RECEIVER_GRPC_POOL_QUEUE_SIZE:0}
simple: gRPCThreadPoolSize: ${SW_RECEIVER_GRPC_THREAD_POOL_SIZE:0}
instances: gRPCSslEnabled: ${SW_RECEIVER_GRPC_SSL_ENABLED:false}
oap-service: gRPCSslKeyPath: ${SW_RECEIVER_GRPC_SSL_KEY_PATH:""}
- uri: http://127.0.0.1:12800 gRPCSslCertChainPath: ${SW_RECEIVER_GRPC_SSL_CERT_CHAIN_PATH:""}
# agent上传数据时的权限key,key不对无法上传数据,对于agent.authentication配置
mvc: authentication: ${SW_AUTHENTICATION:""}
throw-exception-if-no-handler-found: true # 远程配置
configuration:
web: selector: ${SW_CONFIGURATION:none}
resources: # 不用远程配置
add-mappings: true none:
grpc:
management: host: ${SW_DCS_SERVER_HOST:""}
server: port: ${SW_DCS_SERVER_PORT:80}
base-path: /manage clusterName: ${SW_DCS_CLUSTER_NAME:SkyWalking}
``` # 获取配置频率,单位秒
period: ${SW_DCS_PERIOD:20}
apollo:
## 四、启动SkyWalking apolloMeta: ${SW_CONFIG_APOLLO:http://localhost:8080}
apolloCluster: ${SW_CONFIG_APOLLO_CLUSTER:default}
配置文件修改后,就可以启动SkyWalking了,SkyWalking里面有两个东西需要启动,一个是ui服务,一个是oap(Observability Analysis Platform)分析服务. apolloEnv: ${SW_CONFIG_APOLLO_ENV:"DEV"}
appId: ${SW_CONFIG_APOLLO_APP_ID:SkyWalking}
```shell period: ${SW_CONFIG_APOLLO_PERIOD:5}
# 切换到bin目录下 zookeeper:
cd bin period: ${SW_CONFIG_ZK_PERIOD:60} # Unit seconds, sync period. Default fetch every 60 seconds.
# 启动oap服务和ui服务 nameSpace: ${SW_CONFIG_ZK_NAMESPACE:/default}
./startup.sh hostPort: ${SW_CONFIG_ZK_HOST_PORT:localhost:2181}
``` # Retry Policy
baseSleepTimeMs: ${SW_CONFIG_ZK_BASE_SLEEP_TIME_MS:1000} # initial amount of time to wait between retries
也可以单独启动服务 maxRetries: ${SW_CONFIG_ZK_MAX_RETRIES:3} # max number of times to retry
etcd:
period: ${SW_CONFIG_ETCD_PERIOD:60} # Unit seconds, sync period. Default fetch every 60 seconds.
group: ${SW_CONFIG_ETCD_GROUP:skywalking}
serverAddr: ${SW_CONFIG_ETCD_SERVER_ADDR:localhost:2379}
clusterName: ${SW_CONFIG_ETCD_CLUSTER_NAME:default}
consul:
# Consul host and ports, separated by comma, e.g. 1.2.3.4:8500,2.3.4.5:8500
hostAndPorts: ${SW_CONFIG_CONSUL_HOST_AND_PORTS:1.2.3.4:8500}
# Sync period in seconds. Defaults to 60 seconds.
period: ${SW_CONFIG_CONSUL_PERIOD:60}
# Consul aclToken
aclToken: ${SW_CONFIG_CONSUL_ACL_TOKEN:""}
k8s-configmap:
period: ${SW_CONFIG_CONFIGMAP_PERIOD:60}
namespace: ${SW_CLUSTER_K8S_NAMESPACE:default}
labelSelector: ${SW_CLUSTER_K8S_LABEL:app=collector,release=skywalking}
nacos:
# Nacos Server Host
serverAddr: ${SW_CONFIG_NACOS_SERVER_ADDR:127.0.0.1}
# Nacos Server Port
port: ${SW_CONFIG_NACOS_SERVER_PORT:8848}
# Nacos Configuration Group
group: ${SW_CONFIG_NACOS_SERVER_GROUP:skywalking}
# Nacos Configuration namespace
namespace: ${SW_CONFIG_NACOS_SERVER_NAMESPACE:}
# Unit seconds, sync period. Default fetch every 60 seconds.
period: ${SW_CONFIG_NACOS_PERIOD:60}
# Nacos auth username
username: ${SW_CONFIG_NACOS_USERNAME:""}
password: ${SW_CONFIG_NACOS_PASSWORD:""}
# Nacos auth accessKey
accessKey: ${SW_CONFIG_NACOS_ACCESSKEY:""}
secretKey: ${SW_CONFIG_NACOS_SECRETKEY:""}
# 数据接收器,从其他监测系统获取上传的数据。
receiver-meter:
selector: ${SW_RECEIVER_METER:default}
default:
receiver-otel:
selector: ${SW_OTEL_RECEIVER:-}
default:
enabledHandlers: ${SW_OTEL_RECEIVER_ENABLED_HANDLERS:"oc"}
enabledOcRules: ${SW_OTEL_RECEIVER_ENABLED_OC_RULES:"istio-controlplane"}
receiver_zipkin:
selector: ${SW_RECEIVER_ZIPKIN:-}
default:
host: ${SW_RECEIVER_ZIPKIN_HOST:0.0.0.0}
port: ${SW_RECEIVER_ZIPKIN_PORT:9411}
contextPath: ${SW_RECEIVER_ZIPKIN_CONTEXT_PATH:/}
jettyMinThreads: ${SW_RECEIVER_ZIPKIN_JETTY_MIN_THREADS:1}
jettyMaxThreads: ${SW_RECEIVER_ZIPKIN_JETTY_MAX_THREADS:200}
jettyIdleTimeOut: ${SW_RECEIVER_ZIPKIN_JETTY_IDLE_TIMEOUT:30000}
jettyAcceptorPriorityDelta: ${SW_RECEIVER_ZIPKIN_JETTY_DELTA:0}
jettyAcceptQueueSize: ${SW_RECEIVER_ZIPKIN_QUEUE_SIZE:0}
receiver_jaeger:
selector: ${SW_RECEIVER_JAEGER:-}
default:
gRPCHost: ${SW_RECEIVER_JAEGER_HOST:0.0.0.0}
gRPCPort: ${SW_RECEIVER_JAEGER_PORT:14250}
# gRPC服务接受浏览器性能数据和错误日志。
receiver-browser:
selector: ${SW_RECEIVER_BROWSER:default}
default:
# The sample rate precision is 1/10000. 10000 means 100% sample in default.
sampleRate: ${SW_RECEIVER_BROWSER_SAMPLE_RATE:10000}
# 本机日志接收机
receiver-log:
selector: ${SW_RECEIVER_LOG:default}
default:
receiver-register:
selector: ${SW_RECEIVER_REGISTER:default}
default:
receiver-trace:
selector: ${SW_RECEIVER_TRACE:default}
default:
receiver-jvm:
selector: ${SW_RECEIVER_JVM:default}
default:
receiver-clr:
selector: ${SW_RECEIVER_CLR:default}
default:
receiver-profile:
selector: ${SW_RECEIVER_PROFILE:default}
default:
```shell
# 启动oap服务
./oapService.sh
# 启动ui服务 service-mesh:
./webappService.sh selector: ${SW_SERVICE_MESH:default}
default:
envoy-metric:
selector: ${SW_ENVOY_METRIC:default}
default:
acceptMetricsService: ${SW_ENVOY_METRIC_SERVICE:true}
alsHTTPAnalysis: ${SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS:""}
# `k8sServiceNameRule` allows you to customize the service name in ALS via Kubernetes metadata,
# the available variables are `pod`, `service`, f.e., you can use `${service.metadata.name}-${pod.metadata.labels.version}`
# to append the version number to the service name.
# Be careful, when using environment variables to pass this configuration, use single quotes(`''`) to avoid it being evaluated by the shell.
k8sServiceNameRule: ${K8S_SERVICE_NAME_RULE:"${service.metadata.name}"}
# 数据抓取
prometheus-fetcher:
selector: ${SW_PROMETHEUS_FETCHER:-}
default:
enabledRules: ${SW_PROMETHEUS_FETCHER_ENABLED_RULES:"self"}
# 使用kafka获取agent数据,需要agent配置kafka相同地址,可以与grpc同时使用
kafka-fetcher:
selector: ${SW_KAFKA_FETCHER:-}
default:
bootstrapServers: ${SW_KAFKA_FETCHER_SERVERS:localhost:9092}
partitions: ${SW_KAFKA_FETCHER_PARTITIONS:3}
replicationFactor: ${SW_KAFKA_FETCHER_PARTITIONS_FACTOR:2}
enableMeterSystem: ${SW_KAFKA_FETCHER_ENABLE_METER_SYSTEM:false}
enableLog: ${SW_KAFKA_FETCHER_ENABLE_LOG:false}
isSharding: ${SW_KAFKA_FETCHER_IS_SHARDING:false}
consumePartitions: ${SW_KAFKA_FETCHER_CONSUME_PARTITIONS:""}
kafkaHandlerThreadPoolSize: ${SW_KAFKA_HANDLER_THREAD_POOL_SIZE:-1}
kafkaHandlerThreadPoolQueueSize: ${SW_KAFKA_HANDLER_THREAD_POOL_QUEUE_SIZE:-1}
# 查询路径
query:
selector: ${SW_QUERY:graphql}
graphql:
path: ${SW_QUERY_GRAPHQL_PATH:/graphql}
# 告警配置
alarm:
selector: ${SW_ALARM:default}
default:
# prometheus获取数据配置
telemetry:
selector: ${SW_TELEMETRY:none}
none:
prometheus:
host: ${SW_TELEMETRY_PROMETHEUS_HOST:0.0.0.0}
port: ${SW_TELEMETRY_PROMETHEUS_PORT:1234}
sslEnabled: ${SW_TELEMETRY_PROMETHEUS_SSL_ENABLED:false}
sslKeyPath: ${SW_TELEMETRY_PROMETHEUS_SSL_KEY_PATH:""}
sslCertChainPath: ${SW_TELEMETRY_PROMETHEUS_SSL_CERT_CHAIN_PATH:""}
# 数据导出接口
exporter:
selector: ${SW_EXPORTER:-}
grpc:
targetHost: ${SW_EXPORTER_GRPC_HOST:127.0.0.1}
targetPort: ${SW_EXPORTER_GRPC_PORT:9870}
# 健康检查,检查远程服务健康状况
health-checker:
selector: ${SW_HEALTH_CHECKER:-}
default:
# 检查频率
checkIntervalSeconds: ${SW_HEALTH_CHECKER_INTERVAL_SECONDS:5}
# 配置发现,是否每次都获取agent的配置
configuration-discovery:
selector: ${SW_CONFIGURATION_DISCOVERY:default}
default:
disableMessageDigest: ${SW_DISABLE_MESSAGE_DIGEST:false}
``` ```
## 访问地址
http://localhost:8080/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment