Description:

Add Skywalking to tomcat project, this service is war package. Skywalking probe monitoring needs to be added to the server

Tools required:

  • The skywalking agent. The jar

Steps:

  1. Put the Skywalking. jar file in the /opt folder and decompress the file to /opt/agent

  2. Change the probe name of Skywalking to /opt/agent/agent.conf

    Agent. The service_name = ${14} SW_AGENT_NAME: passback_230.

  3. Modify/opt/tomcat/bin/catalina. Sh add the following content:

    mem=free -g|awk ‘NR==2 {print $2}’ if [[ mem -le 5 && mem -gt 2 ]]; Then let jVMmem = MEm − 1ELif [[MEm −1elif[[MEm −1elif[[MEm -le 2]];then jVMmem =1 else let jVMmem = mem/2fiJAVAOPTS=”mem/2 fi JAVA_OPTS=”mem/2fiJAVAOPTS=”JAVA_OPTS -javaagent:/opt/agent/skywalking-agent.jar”

  4. Restart the service after the service is added.

    Stop /tomcat/bin/shutup.sh and restart /tomcat/bin/startup.sh

Trouble spots

  • Don’t you need to add skywalking parameters to the startup script?

    You only need to add it in the catalina.sh script. The catalina.sh script is referenced in startup.sh startup script

  • Are there release requirements for installing Skywalking?

    • JDK 1.8 and above can be used;

    • The red hat system in CentOS cannot be lower than 6.