stagemonitor / stagemonitor-mailinglist

GitHub issues abused as a mailing list
3 stars 0 forks source link

Stagemonitor for monitoring Jira & Jira custom plugins #28

Open slavinas opened 8 years ago

slavinas commented 8 years ago

Hey guys,

I'm trying to evaluate Stagemonitor as a monitoring solution for our Jira server. The setup is the following - Jira runs in a Tomcat container and Jira and all custom plugins (ones provided by vendors and our in house dev) run inside as Osgi bundles. Is it possible to use Stagemonitor in such case to monitor the overal JVM performance, load on the server and possibly identify the most used use cases? Unfortunately, I have control only over our in house developed plugins, so I tried adding the stagemonitor dependencies to one of our custom plugins and deploying it but this doesn't seem to work. Is there something more required in order to make it work?

Thanks in advance, Slavina

felixbarny commented 8 years ago

Unfortunately, I have no experience with Jira and how it is deployed. Do you deploy it as a .war file? How is the directory layout of it? You might be able to add stagemonitor in the lib folder. To configure stagemonitor, you could set system properties in setenv.sh.

slavinas commented 8 years ago

Hey Felix,

thanks for the quick response.

Basically the deployment looks like:

image

You have multple bundles like "Your Plugin" for each deployed one and a core Attlassian Application. I think they use a bit of a customized version of Tomcat.

The directory layout is the following: untitled

and atlassian-jira looks like: image

I just tried coping stagemonitor and all dependencies into the lib folder as you suggested. I've added the java agent to setenv.sh via: CATALINA_OPTS="$CATALINA_OPTS -javaagent:../lib/stagemonitor-javaagent-0.19.0.jar" and stagemonitor.properties in atlassian-jira/WEB-INF/classes but there seems to be an issue and the server doesn't start. In catalina.out I get the following exception:

NFO: Starting Servlet Engine: Apache Tomcat/7.0.55
May 13, 2016 5:09:06 PM org.apache.catalina.startup.ContextConfig processAnnotationsJar
SEVERE: Unable to process Jar entry [org/stagemonitor/javassist/ByteArrayClassPath.class] from Jar [jar:file:/home/jira/uat_jira/lib/stagemonitor-core-0.19.0.jar!/] for annotations
java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
    at org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:796)
    at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
    at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:57)
    at org.apache.tomcat.util.bcel.classfile.Method.<init>(Method.java:71)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Any idea what's the issue here? I was thinking that probably that's due to not being able to find the config file, but I can't seem to find a way to pass it command line. How is this done?

Thanks, Slavina

felixbarny commented 8 years ago

You are using a pretty outdated version of stagemonitor. Try with the latest version Maven Central. See here how to get all required libs. You don't need a configuration file as you can configure everything via system properties: https://github.com/stagemonitor/stagemonitor/wiki/Configuration-Sources#java-system-properties

slavinas commented 8 years ago

Thanks a lot, Felix! This seemed to do the job, it seems to be working now. At least I managet to get the request monitor working.

felixbarny commented 8 years ago

Thats great news! Feel free to ask any further questions.