본문 바로가기

리눅스

[리눅스] Scouter Host Agent 설치

반응형

Scouter Host Agent 설치

Scouter 다운로드(https://github.com/scouter-project/scouter/releases)

cd /app
tar xvfz scouter.agent.tar.gz
chown -R tomcat.tomcat /app/scouter

 

su - tomcat
vi .bashrc
## JAVA_HOME
export JAVA_HOME="/app/java"
export PATH="$PATH:$JAVA_HOME/bin"

 

cd /app/scouter/agent.host/conf
vi scouter.conf
$ vi scouter.conf
# Scouter Server IP Address (Default : 127.0.0.1)
net_collector_ip=10.1.5.215

 

./host.sh

 

vi .bashrc
## JAVA_HOME
export JAVA_HOME="/app/java"
export PATH="$PATH:$JAVA_HOME/bin"

## SCOUTER_AGENT
SCOUTER_AGENT_DIR=/app/scouter/agent.java
export SCOUTER_AGENT_DIR

 

cd /app/scouter/agent.java/
cat was11.conf
$ cat was11.conf
# Scouter Server IP Address (Default : 127.0.0.1)
net_collector_ip=10.1.5.215

# Scouter Server Port (Default : 6100)
net_collector_udp_port=6100
net_collector_tcp_port=6100

# Scouter Name(Default : tomcat1)
obj_name=was11

 

vi /app/was01/bin/catalina.sh
...
280 fi
281
282 # ----- Execute The Requested Command -----------------------------------------
283 JAVA_OPTS="$JAVA_OPTS -javaagent:${SCOUTER_AGENT_DIR}/scouter.agent.jar -Dscouter.config=${SCOUTER_AGENT_DIR}/was11.conf"
284 CATALINA_PID=$CATALINA_HOME/logs/.tomcat_pid
285
286 # Bugzilla 37848: only output this if we have a TTY
...

 

cd /app/was01/bin/
./startup.sh
$ ./startup.sh
Using CATALINA_BASE:   /app/was01
Using CATALINA_HOME:   /app/was01
Using CATALINA_TMPDIR: /app/was01/temp
Using JRE_HOME:        /app/java
Using CLASSPATH:       /app/was01/bin/bootstrap.jar:/app/was01/bin/tomcat-juli.jar
Using CATALINA_PID:    /app/was01/logs/.tomcat_pid
Tomcat started.

 

ps -ef | grep was01 | grep scouter
$ ps -ef | grep was01 | grep scouter
tomcat 12184     1 35 17:20 pts/0    00:00:11 /app/java/bin/java -Djava.util.logging.config.file=/app/was01/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server -Xms2g -Xmx2g -XX:MaxPermSize=512m -Dfile.encoding=UTF-8 -Djdk.tls.client.protocols=TLSv1,TLSv1.1,TLSv1.2 -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 -Ddeployment.security.TLSv1=true -Ddeployment.security.TLSv1.1=true -Ddeployment.security.TLSv1.2=true -Dsun.security.ssl.allowUnsafeRenegotiation=false -Djava.net.preferIPv4Stack=true -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -javaagent:/app/scouter/agent.javascouter.agent.jar -Dscouter.config=/app/scouter/agent.java/was11.conf -Djava.endorsed.dirs=/app/was01/endorsed -classpath /app/was01/bin/bootstrap.jar:/app/was01/bin/tomcat-juli.jar -Dcatalina.base=/app/was01 -Dcatalina.home=/app/was01 -Djava.io.tmpdir=/app/was01/temp org.apache.catalina.startup.Bootstrap start

 

 

참고URL

- https://github.com/scouter-project/scouter/blob/master/scouter.document/main/Setup_kr.md

 

728x90
반응형