Based on CentOS environment, use SkyAPM-dotnet to introduce SkyWalking. SkyAPM-dotnet is SkyWalking's .NET Agent
Download and install Elasticsearch (CentOS as an example) Refer to the official tutorial.
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
[ elasticsearch]``name=Elasticsearch repository for 7.x packages``baseurl=https://artifacts.elastic.co/packages/7.x/yum``gpgcheck=1``gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch``enabled=0``autorefresh=1``type=rpm-md
sudo yum install --enablerepo=elasticsearch elasticsearch
After the installation is complete, you need to make the following changes to /etc/elasticsearch.yml
# modify
# If cluster.name is not set to CollectorDBCluster, you need to modify the SkyWalking configuration file
cluster.name: CollectorDBCluster
# IP port
network.host:0.0.0.0
http.host:0.0.0.0
http.port:9200
# node
node.name: node-1
cluster.initial_master_nodes:["node-1"]
For more configuration, refer to the official document
Elasticsearch's port is bound to 127.0.0.1 by default, http.host is configured for opening http ports to the outside world, and network.host is configured for opening tcp ports to the outside world
About network configuration refer to official
To configure Elasticsearch to start automatically when the system starts
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
Start and stop can use the following commands
sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service
You can test whether your Elasticsearch node is running by sending an HTTP request to the local host port 9200
curl "http://localhost:9200/"
The following message should be displayed
{" name":"XXXX","cluster_name":"CollectorDBCluster","cluster_uuid":"JVNBpkf1TjeFJUjiPdD5dQ","version":{"number":"7.5.1","build_flavor":"default","build_type":"rpm","build_hash":"3ae9ac9a93c95bd0cdc054951cf95d88e1e18d96","build_date":"2019-12-16T22:57:37.835892Z","build_snapshot":false,"lucene_version":"8.3.0","minimum_wire_compatibility_version":"6.8.0","minimum_index_compatibility_version":"6.0.0-beta1"},"tagline":"You Know, for Search"}
SkyWalking recommends to download the official compilation directly, download link
(http://skywalking.apache.org/downloads/)
( Linux can download Binary Distribution for ElasticSearch 7 (Linux))
After decompression, renamed to SkyWalking-ES7 (see personal hobbies)
The file is located at /home/SkyWalking-ES7/config/application.yml
The default data storage is h2, here we need to modify the data storage to Elasticsearch7 (before starting SkyWalking, make sure that Elasticsearch is started)
The startup of SkyWalking (bin directory) includes two parts, one is SkyWalking Collector (oapService) and the other is SkyWalking UI (webappService).
Bat is used in windows environment and sh is used in linux environment. We can start oapService and webappService separately, or start them all at once through startup. From the commands in startup, we can know that they actually start oapService and webappService separately.
# cd /home/SkyWalking-ES7/bin --The bin directory decompressed by SkyWalking
# . /startup.sh
The following message indicates success
SkyWalking OAP started successfully!
SkyWalking Web Application started successfully!
If you start to access successfully (refer to the quick start if it fails), you can open the link http://localhost:8080
View SkyWalking UI
The file is located at /home/SkyWalking-ES7/webapp/webapp.yml
Config | Description |
---|---|
server.port | Listen on port 8080 by default |
collector.ribbon.listOfServers | collector's access service name (same as the naming.jetty configuration in config/application.yml) and if there are multiple collector service names separated by',' |
collector.path | Collector query uri address. The default is /graphql |
collector.ribbon.ReadTimeout | Query timeout time, the default is 10 seconds |
Refer to the Demo under the official link SkyAPM-dotnet sample directory
Install-Package SkyAPM.Agent.AspNetCore
set ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyAPM.Agent.AspNetCore
Some of the above configuration files can refer to the quick start
https://github.com/apache/skywalking/blob/5.x/docs/cn/Deploy-backend-in-cluster-mode-CN.md
Reprinting is a kind of power Sharing is a virtue
Author: Heart Levin Technology Chen Langlin
If you like the author's article, please pay attention to the subscription number of [Makou Chat Technology] to get the latest content as soon as possible. The copyright of this article belongs to the author and Hunan Xinlai Information Technology Co., Ltd., welcome to reprint, but this statement must be retained without the author's consent, and the original link must be given in an obvious place on the article page, otherwise the right to pursue legal responsibility is reserved.
Document official website: docs.xin-lai.com
Recommended Posts