Using Spring Insight with Tomcat 6

别等时光非礼了梦想. 提交于 2019-12-03 13:27:38

问题


I want to use Spring Insight with Tomcat 6. I cant use TC server because of reasons beyond my control. So I am looking at integrating Spring Insight with Tomcat 6. Has any one worked on this before or can any one point me to any documentation.

Thanks, Anuj


回答1:


Insight Developer (the free product) comes in two form, packaged with tc Server Developer and packaged with STS. Neither option will provide an easy mechanism for installing Insight into Tomcat. I'm not saying that it can't be done, there is just no simple way to do it.

If you really want to run Insight on Tomcat then you are going to need to do some work. Here are the rough steps that you'll need to do.

  1. Download vFabric tc Server Developer
  2. Create a vFabric tc Server instance which has Insight enabled.
  3. Download the latest Apache Tomcat 6.0.x or 7.0.x
  4. Copy the following files & folders from the tc Server instance w/Insight

    • bin/setenv.sh
    • bin/insight-bootstrap-tcserver-1.8.3.RELEASE.jar
    • insight
    • lib/*
    • webapps/insight.war
  5. Edit conf/server.xml and add the following Valve to the Engine block.

    <Valve className="com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve"/>

  6. Edit conf/context.xml and add the following before the closing Context tag.

    <Loader loaderClass="com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader" />

    <Listener className="com.springsource.insight.collection.tcserver.lifecycle.ApplicationLifecycleCollectionListener" />

  7. Start the Tomcat instance.

Alternatively, Insight Operations (a paid product) makes this much easier and offers an installer that allows you to easily and quickly add the Insight Agent into different containers, including ASF Tomcat. Here's a link to the documentation.

http://pubs.vmware.com/vfabric51/topic/com.vmware.vfabric.tc-server.2.7/operations/install-agents.html




回答2:


I think this instruction can be helpful for you http://blog.jelastic.com/2012/11/28/application-monitoring-in-the-cloud-with-spring-insight/ Actually in this tutorial Tomcat is a cloud instance, but I guess it is suitable for local installation too.




回答3:


I downloaded vfacbric-tc-server-2.9.6 and followed the instructions mentioned by Daniel Mikusa to set up insight on tomcat 7. Unfortunately tomcat was not able to find the classes HttpRequestOperationCollectionValve, TomcatWeavingInsightClassLoader and ApplicationLifecycleCollectionListener in the jars provided. After struggling 2 days adding new jars containing these classes and getting class clash., finally I figured out that just removing the configuration in server.xml and context.xml are sufficient to get insight working on tomcat.

So, all you need to setup insight on tomcat are the steps 1 to 4 and 7 in his answer. I'm copying the same for the ease of others

  1. Download vFabric tc Server Developer
  2. Create a vFabric tc Server instance which has Insight enabled.
  3. Download the latest Apache Tomcat 6.0.x or 7.0.x
  4. Copy the following files & folders from the tc Server instance w/Insight bin/setenv.sh bin/insight-bootstrap-tcserver-1.8.3.RELEASE.jar insight lib/* webapps/insight.war
  5. Start the Tomcat instance.



回答4:


I am trying to follow the updated instructions provided by "nagamanojv". I am able to start http://localhost:8080/insight/ on Tomcat 6, but I do not see any applications. I have deployed one of my web applications on the same tomcat instance. Let me know if I am missing anything.



来源:https://stackoverflow.com/questions/12406146/using-spring-insight-with-tomcat-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!