tomcat集成newrelic
catalina.shK8S部署—- New Relic switch automatically added to start command on 2017 Nov 15, 14:25:45NR_JAR=/usr/local/blackboard/apps/tomcat/newrelic/newrelic.jar;export NR_JARCATALINA_OPTS=”
catalina.sh
catalina.sh 中包含NR_JAR
catalina.sh.20171122_062859中没有插入
—- New Relic switch automatically added to start command on 2017 Nov 22, 06:28:59
NR_JAR=/usr/local/blackboard/apps/tomcat/newrelic/newrelic.jar; export NR_JAR
CATALINA_OPTS=”
CATALINAOPTS−javaagent:
NR_JAR”; export CATALINA_OPTS
—- New Relic switch automatically added to start command on 2017 Nov 15, 14:25:45
NR_JAR=/usr/local/blackboard/apps/tomcat/newrelic/newrelic.jar;
export NR_JAR
CATALINA_OPTS=”
CATALINAOPTS−javaagent:
NR_JAR”;
export CATALINA_OPTS
K8S 中设置env
问题1:
目录结构:
/usr/local/blackboard/apps/tomcat
/usr/local/blackboard/apps/newrelic/newrelic.jar
脚本中:
java -jar ${NEWRELIC}/newrelic/newrelic.jar install -s /usr/local/blackboard/apps/
错误日志:
* Installing version 3.34.0 …
Could not edit start script because:
Could not locate a Tomcat, Jetty, JBoss, JBoss7 or Glassfish instance in /usr/local/blackboard/apps/tomcat/tempTry re-running the install command with the -s option or from /newrelic.
If that doesn’t work, locate and edit the start script manually.No need to create New Relic configuration file because:
A config file already exists: /usr/local/blackboard/apps/newrelic/newrelic.yml
* Install incomplete
解决:
java -jar ${NEWRELIC}/newrelic/newrelic.jar install -s /usr/local/blackboard/apps/tomcat
关键,“-s” 参数,必须指定tomcat目录
问题2:
目录结构,
/usr/local/blackboard/apps/tomcat
/usr/local/blackboard/apps/tomcat/newrelic/newrelic.jar
脚本中:
java -jar /usr/local/blackboard/apps/tomcat/newrelic/newrelic.jar install -s /usr/local/blackboard/apps/tomcat
log:
成功安装,但是newrelic不产生日志
解决:newrelic移动到和tomcat同级目录
/usr/local/blackboard/apps/tomcat
/usr/local/blackboard/apps/newrelic/newrelic.jar
java -jar /usr/local/blackboard/apps/newrelic/newrelic.jar install -s /usr/local/blackboard/apps/tomcat
更多推荐
所有评论(0)