In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Microservice spring-cloud Link tracking skywalking6.x introduced the example analysis, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
I. preparatory work
Environment:
1.jdk1.8, higher than unsupported
2.elasticsearch7.5.4 search engine:
Wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.tar.gz
Decompress: tar-zxvf elasticsearch-6.5.4.tar.gz
Configuration:
Vim elasticsearch-6.5.4/config/elasticsearch.yml
Modify the following
Cluster.name: myskywalking
Path.data: / opt/data/es/data
Path.logs: / opt/data/es/logs
Bootstrap.memory_lock: false
Bootstrap.system_call_filter: false
Network.host: 127.0.0.1 # Native IP recommended
Http.port: 9200
Start es
Second, install the skywalking server
1. Download from the official website: http://skywalking.apache.org/
# wget http://mirror.bit.edu.cn/apache/skywalking/6.1.0/apache-skywalking-apm-6.1.0.tar.gz
# decompression: tar-zxvf apache-skywalking-apm-6.1.0.tar.gz
two。 Modify the webapp port from default 8080 to 13800:
Cd / home/wshop/skywalking/apache-skywalking-apm-bin/webapp
Vi webapp.yml
Server:
Port: 13800
3. Modify es configuration
Cd / home/wshop/skywalking/apache-skywalking-apm-bin/config
Vi application.yml
4. Start
Cd / home/wshop/skywalking/apache-skywalking-apm-bin/bin
. / startup.sh
Two services will be started: collector port 11800 and monitoring ui interface port 13800
Visit: http://192.168.60.235:13800/
It indicates that the server has started successfully.
3. The client introduces:
192.168.60.235purl 11800 belongs to the collector
Local server, as long as it corresponds to "skywalking-agent.jar"
Other services can monitor as long as they copy the agent directory and start the corresponding service interface.
For the corresponding jar project, add "- javaagent:/home/wshop/skywalking/apache-skywalking-apm-bin/agent/skywalking-agent.jar-Dskywalking.agent.service_name=$ {APPNAME}-Dskywalking.collector.backend_service=192.168.60.235:11800" before starting the script.
Complete client-side run script
#! / bin/bash
#
# File Name: run.sh
# Function:
# Author: Mason
# Version: V1.0
# Created Time: 28/1/2019 11:41:48
#
# chkconfig:-98 33
# description: Starts and stops the java project daemon\
# used to provide some java jar packet services.
Source / etc/profile
# base env parameters setting
BASEDIR=$ (dirname $(readlink-f $0))
APPNAME=user-manager
VERSION=1.0.0
PORT=8710
JAVAOPT= "- Xms256m-Xmx512m-XX:PermSize=128M-XX:MaxPermSize=256M"
# define some functions
Get_pid () {
PID=$ (ps-ef | grep ${APPNAME} | grep "java" | grep-v grep | awk'{print $2}')
}
Start () {
If [- z ${PID}]; then
Nohup java ${JAVAOPT}-Dlogging.config=$ {BASEDIR} / logback-spring.xml-D$APPNAME-javaagent:/home/wshop/skywalking/apache-skywalking-apm-bin/agent/skywalking-agent.jar-Dskywalking.agent.service_name=$ {APPNAME}-Dskywalking.collector.backend_service=192.168.60.235:11800-jar ${BASEDIR} / ${APPNAME}-${VERSION} .jar-spring.config.location=$ {BASEDIR} / application.yml,/home/wshop/service/config/bootstrap.yml & > / dev/null &
Inter=1
Time=10
ITunes 0
While (I
< time));do get_pid #if [ $(netstat -lntup|grep -c $PID) -le 1 ];then if((i>(time-2)); then
If [${PID}]; then
Echo "${APPNAME} started OK."
Break
Else
Sleep ${inter}
Let iTunes +
Fi
Else
Sleep ${inter}
Let iTunes +
Fi
Done
If (I = = time); then
Echo "${APPNAME} started FAIL in $((inter*time)) second!"
Exit 1
Fi
Else
Echo "${APPNAME} is still running with pid ${PID}!"
Exit 1
Fi
}
Stop () {
If [!-z ${PID}]; then
Kill-9 ${PID} & & echo "${APPNAME} was killed."
Else
Echo "${APPNAME} is not running!"
Exit 0
Fi
}
Restart () {
Stop
Start
}
Status () {
If [!-z ${PID}]; then
Echo "${APPNAME} is running with pid ${PID}"
Else
Echo "${APPNAME} is not running."
Fi
}
# the main program started
Get_pid
Case "$1" in
Start)
Start
Stop)
Stop
Restart)
Restart
Status)
Status
*)
Echo $"Usage: $0 {start | stop | restart | status}"
Exit 2
Esac
Exit $?
After reading the above, have you mastered the method of sample analysis introduced by microservice spring-cloud link tracking skywalking6.x? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 275
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.