首页 帮助中心 基调听云Server Resin
基调听云Server

在Resin上安装Java探针

Resin pro 3.1+ production mode

找到conf目录下的resin.conf文件,增加

<jvm-arg>-javaagent:/${路径}/tingyun-agent-java.jar</jvm-arg>

详情如下:

针对集群所有server增加探针:

<cluster id="cluster_id"> 
      ........
    <server-default> 
      ...........
        <jvm-arg> -javaagent:/${路径}/tingyun-agent-java.jar</jvm-arg> 
      ..........
   </server-default> 
      ..........
</cluster>

针对集群某台server增加探针:

<cluster id="cluster_id"> 
      ........
    <server id="" address="xxx.xxx.xxx.xxx" port="xxxx"> 
      ...........
        <jvm-arg> -javaagent:/${路径}/tingyun-agent-java.jar</jvm-arg> 
      ..........
   </server> 
      ..........
</cluster>

Resin pro 4.0+ production mode

Resin pro 4.0+ 有两种安装方式

第一种:找到conf目录下的resin.properties文件,将jvm的配置打开,并增加 -javaagent:/${路径}/tingyun-agent-java.jar,详情如下:

# Arg passed directly to the JVM
jvm_args  : -javaagent:/${路径}/tingyun-agent-java.jar
# jvm_mode    : -server

第二种:增加

<jvm-arg>-javaagent:/${路径}/tingyun-agent-java.jar</jvm-arg>

详情如下:

针对集群所有server增加探针:

<cluster id="cluster_id"> 
      ........
    <server-default> 
      ...........
        <jvm-arg> -javaagent:/${路径}/tingyun-agent-java.jar</jvm-arg> 
      ..........
   </server-default> 
      ..........
</cluster>

针对集群某台server增加探针:

<cluster id="cluster_id"> 
      ........
    <server id="" address="xxx.xxx.xxx.xxx" port="xxxx"> 
      ...........
        <jvm-arg> -javaagent:/${路径}/tingyun-agent-java.jar</jvm-arg> 
      ..........
   </server> 
      ..........
</cluster>