skywalking配備
7444 ワード
【Skywalking基本紹介】
[ダウンロード]をクリックして公式サイトに必要なソフトウェアバージョンをダウンロードし、バイナリインストールパッケージをダウンロードすることをお勧めします.
プロジェクトのアドレス:https://github.com/apache/incubator-skywalking/tree/5.x、他のバージョンが必要な場合はbranhまたはtagを自分で切り替えてください
解凍
ソフトウェアホームにアクセス
関連ディレクトリの説明
Agent:javaクライアントディレクトリ
bin:WindowsとLinuxを含むサービス・エンド・プログラム起動スクリプト
config:プロファイルが存在するディレクトリ
webapp:サービス側プログラムが存在するサービス
【Elasticsearch 5.x配備】
[ダウンロード]をクリックして指定されたバージョンを取得し、RPMパッケージのダウンロードをお勧めします
Javaインフラストラクチャのインストール
elasticsearchのインストール
データディレクトリの作成
elasticsearchを構成し、プロファイル[/etc/elasticsearch/elasticsearch.yml]
サービスの開始
コメント:
【Skywalkingサービスの起動】
次のポートが使用されていないことを確認します.
108001180012800および8080
プログラムディレクトリへ
skywalkingプライマリプロファイル、config/applicationを変更します.yml
主にリスニングとアクセスのアドレスを変更し、すべて真実のIPに変更し、またESクラスタにアクセスするアドレスを変更し、クラスタ名とアドレスポートを記入すればよい.
skywalking-webappプロファイル、webapp/webappを変更します.yml
collectorサービスへのアクセス先の変更
サービスの開始
アクセスdashboard、サービス側プログラムが存在するサーバのアドレス+8080ポートアクセス
http://192.168.6.102:8080
デフォルトのユーザー名パスワード:admin/admin
【javaクライアントの配備】
プロファイルを変更すると、クライアントプログラムはagentのディレクトリ全体であり、プロファイルはagent/config/agentである.config
現在のクライアントが存在するappの名前とcollectorにアクセスするアドレスを主に変更します.
Javaプロジェクトでagentを使用する
参考資料:githubアドレス
使用方法:公式ブログ
[ダウンロード]をクリックして公式サイトに必要なソフトウェアバージョンをダウンロードし、バイナリインストールパッケージをダウンロードすることをお勧めします.
プロジェクトのアドレス:https://github.com/apache/incubator-skywalking/tree/5.x、他のバージョンが必要な場合はbranhまたはtagを自分で切り替えてください
解凍
tar -xvzf apache-skywalking-apm-incubating-5.0.0-GA.tar.gz -C /usr/local/
ソフトウェアホームにアクセス
cd /usr/local/apache-skywalking-apm-incubating/
$ ls
agent bin collector-libs config DISCLAIMER LICENSE licenses NOTICE README.txt webapp
関連ディレクトリの説明
Agent:javaクライアントディレクトリ
bin:WindowsとLinuxを含むサービス・エンド・プログラム起動スクリプト
config:プロファイルが存在するディレクトリ
webapp:サービス側プログラムが存在するサービス
【Elasticsearch 5.x配備】
[ダウンロード]をクリックして指定されたバージョンを取得し、RPMパッケージのダウンロードをお勧めします
Javaインフラストラクチャのインストール
yum -y install java-1.8.0-openjdk
elasticsearchのインストール
rpm -ivh elasticsearch-5.6.14.rpm
データディレクトリの作成
mkdir -p /data/es/{data,log}
chown -R elasticsearch:elasticsearch /data/es
elasticsearchを構成し、プロファイル[/etc/elasticsearch/elasticsearch.yml]
cluster.name: skywalking
node.name: node1
path.data: /data/es/data
path.logs: /data/es/log
network.host: 0.0.0.0
http.port: 9200
サービスの開始
systemctl daemon-reload
systemctl enable elasticsearch.service
systemctl start elasticsearch.service
コメント:
【Skywalkingサービスの起動】
次のポートが使用されていないことを確認します.
108001180012800および8080
プログラムディレクトリへ
/usr/local/apache-skywalking-apm-incubating
skywalkingプライマリプロファイル、config/applicationを変更します.yml
# 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:
# zookeeper:
# hostPort: localhost:2181
# sessionTimeout: 100000
naming:
jetty:
#OS real network IP(binding required), for agent to find collector cluster
host: 192.168.6.102 #
port: 10800
contextPath: /
cache:
# guava:
caffeine:
remote:
gRPC:
# OS real network IP(binding required), for collector nodes communicate with each other in cluster. collectorN --(gRPC) --> collectorM
host: 192.168.6.102 #
port: 11800
agent_gRPC:
gRPC:
#OS real network IP(binding required), for agent to uplink data(trace/metrics) to collector. agent--(gRPC)--> collector
host: 192.168.6.102 #
port: 11800
# Set these two setting to open ssl
#sslCertChainFile: $path
#sslPrivateKeyFile: $path
# Set your own token to active auth
#authentication: xxxxxx
agent_jetty:
jetty:
# OS real network IP(binding required), for agent to uplink data(trace/metrics) to collector through HTTP. agent--(HTTP)--> collector
# SkyWalking native Java/.Net/node.js agents don't use this.
# Open this for other implementor.
host: 192.168.6.102 #
port: 12800
contextPath: /
analysis_register:
default:
analysis_jvm:
default:
analysis_segment_parser:
default:
bufferFilePath: ../buffer/
bufferOffsetMaxFileSize: 10M
bufferSegmentMaxFileSize: 500M
bufferFileCleanWhenRestart: true
ui:
jetty:
# Stay in `localhost` if UI starts up in default mode.
# Change it to OS real network IP(binding required), if deploy collector in different machine.
host: 192.168.6.102 #
port: 12800
contextPath: /
storage:
elasticsearch:
clusterName: skywalking #
clusterTransportSniffer: true
clusterNodes: localhost:9300 #
indexShardsNumber: 2
indexReplicasNumber: 0
highPerformanceMode: true
# Batch process setting, refer to https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html
bulkActions: 2000 # Execute the bulk every 2000 requests
bulkSize: 20 # flush the bulk every 20mb
flushInterval: 10 # flush the bulk every 10 seconds whatever the number of requests
concurrentRequests: 2 # the number of concurrent requests
# Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted.
traceDataTTL: 90 # Unit is minute
minuteMetricDataTTL: 90 # Unit is minute
hourMetricDataTTL: 36 # Unit is hour
dayMetricDataTTL: 45 # Unit is day
monthMetricDataTTL: 18 # Unit is month
#storage:
# h2:
# url: jdbc:h2:~/memorydb
# userName: sa
configuration:
default:
#namespace: xxxxx
# alarm threshold
applicationApdexThreshold: 2000
serviceErrorRateThreshold: 10.00
serviceAverageResponseTimeThreshold: 2000
instanceErrorRateThreshold: 10.00
instanceAverageResponseTimeThreshold: 2000
applicationErrorRateThreshold: 10.00
applicationAverageResponseTimeThreshold: 2000
# thermodynamic
thermodynamicResponseTimeStep: 50
thermodynamicCountOfResponseTimeSteps: 40
# max collection's size of worker cache collection, setting it smaller when collector OutOfMemory crashed.
workerCacheMaxSize: 10000
#receiver_zipkin:
# default:
# host: localhost
# port: 9411
# contextPath: /
主にリスニングとアクセスのアドレスを変更し、すべて真実のIPに変更し、またESクラスタにアクセスするアドレスを変更し、クラスタ名とアドレスポートを記入すればよい.
skywalking-webappプロファイル、webapp/webappを変更します.yml
# 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.
server:
port: 8080
collector:
path: /graphql
ribbon:
ReadTimeout: 10000
listOfServers: 192.168.6.102:10800 #
security:
user:
admin:
password: admin
collectorサービスへのアクセス先の変更
サービスの開始
sh bin/startup.sh
アクセスdashboard、サービス側プログラムが存在するサーバのアドレス+8080ポートアクセス
http://192.168.6.102:8080
デフォルトのユーザー名パスワード:admin/admin
【javaクライアントの配備】
プロファイルを変更すると、クライアントプログラムはagentのディレクトリ全体であり、プロファイルはagent/config/agentである.config
agent.application_code=APPNAME
collector.servers=192.168.6.102:10800
現在のクライアントが存在するappの名前とcollectorにアクセスするアドレスを主に変更します.
Javaプロジェクトでagentを使用する
参考資料:githubアドレス
使用方法:公式ブログ