pcp
[Top] [All Lists]

parfait updates: parfait-agent, a -java-agent for Parfair

To: Paul Smith <psmith@xxxxxxxxxx>, Marko Myllynen <myllynen@xxxxxxxxxx>
Subject: parfait updates: parfait-agent, a -java-agent for Parfair
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Wed, 23 Mar 2016 04:20:27 -0400 (EDT)
Cc: parfait-users@xxxxxxxxxxxxxxxx, PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1267741995.33536698.1458718520432.JavaMail.zimbra@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: o0sdQ8ile0CkwTYcNIadttERjjOx+A==
Thread-topic: parfait updates: parfait-agent, a -java-agent for Parfair
Hi guys,

This is highly experimental code, but shows off a working parfait-agent
in less than 100 lines of code.  Don't merge please Paul, it needs alot
more love yet.  :)

Changes committed to git://git.pcp.io/nathans/parfait.git master

Nathan Scott (8):
      Early prototype code for a -java-agent jar building on Parfait
      Update top level gitignore for generated Eclipse files
      Add commented-out code to show possible Spring injection point
      Un-comment-out Spring injection code, TallPaul says its close
      monitoring.xml for parfait-agent: towards a working version
      Update .gitignore file to ignore actively (vim-)edited files
      Switch to using DynamicMonitoringView, toss prototype code
      parfait-agent: functional enhancements, JMX metrics working too


 .gitignore                                                              |    5 
 parfait-agent/.gitignore                                                |    1 
 parfait-agent/build.sh                                                  |    2 
 parfait-agent/demo/AgentDemo.java                                       |   39 
 parfait-agent/demo/run.sh                                               |    5 
 parfait-agent/pom.xml                                                   |  125 
 parfait-agent/src/main/java/com/custardsource/parfait/ParfaitAgent.java |  243 
 parfait-agent/src/main/resources/MANIFEST.MF                            |    1 
 parfait-agent/src/main/resources/monitoring.xml                         | 2859 
+++++-----
 pom.xml                                                                 |    3 
 10 files changed, 2024 insertions(+), 1259 deletions(-)


commit ee72b67a16849ea1d492a207f1da14f1f82d1a49
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Mar 23 15:49:34 2016 +1100

    parfait-agent: functional enhancements, JMX metrics working too
    
    Deal with the absence of spring-utils schema by hand-coding the
    list of JVM metrics into a javax.util.list object.  This is now
    found by Spring and all the JMX metrics are auto-wired into the
    registry.
    
    Remove several no-longer-used java imports - Spring IoC handles
    all of that now.
    
    Use TallPauls Spring PropertyPlaceholderConfigurer tip, and now
    the jvm.version metric is working as nature intended.  Started
    using System properties more widely throughout as a result, and
    several parameters are pushed into the properties file now.
    
    Discovered the G1 garbage collector metrics needed.  In Java 8,
    the perm gen is completely removed (so these metrics commented
    out for now) - we'll need to build a way to only optionally
    instantiate some beans, depending on JVM version.  I see Aconex
    folk have done before using an optional metric registry so that
    might be the best way to go here too - OptionalFactoryBean from
    http://stackoverflow.com/questions/3957430/optional-spring-bean-references
    describes that approach.

commit 2d7899ccaa81d2097b2c9cab2fa080c299c6b7d4
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Fri Mar 18 19:11:29 2016 +1100

    Switch to using DynamicMonitoringView, toss prototype code
    
    This is now generating MMV files populated by Spring beans,
    although most are missing currently.

commit 04d375de8107fa620fe1b90fbcf9053b6a5ce152
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Fri Mar 18 19:10:17 2016 +1100

    Update .gitignore file to ignore actively (vim-)edited files

commit 63defd5c4dca164a77f0426f37fc4709b92db6b1
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Fri Mar 18 13:45:16 2016 +1100

    monitoring.xml for parfait-agent: towards a working version
    
    Alrighty!  These changes get us to an agent that doesn't fall
    over immediately:
    - use the non-versioned xsi:schemaLocation since that resolves
      (from withing the spring jars we're building with, I think)
    - drop schema/util xmlns as thats not resolvable at all (we're
      using it only for util:list which we don't seem to need just
      yet - and theres other ways to achieve the same thing).
    - drop a bunch of Aconex-specific class references
    - comment-out the JDBC and codahale metrics references for now

commit 9998a45d437e4da0dd79611f38d4c23bd43af8df
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Mar 16 17:16:31 2016 +1100

    Un-comment-out Spring injection code, TallPaul says its close
    
    Also convert monitoring.xml to non-dos line endings, and drop
    some error-inducing parts of that file:
    - <aop:aspectj-autoproxy/> ?
    - clusterIdentifier (will need to revisit, use 42 for now)
    - Bean 'tomcatThreadPoolMBeanRegistrar' (will need to think
      about optional components like Tomcat later?)

commit 59bb87b7bd1a7933a7770d3e28c8339346dea2b0
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Mar 16 14:34:22 2016 +1100

    Add commented-out code to show possible Spring injection point

commit fd1b1cdc639f6461b3873d3142702279439c59e2
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Mar 16 14:04:19 2016 +1100

    Update top level gitignore for generated Eclipse files

commit 276348bda94ebe3fd7863125da7828545d08ceaf
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Mar 16 14:03:41 2016 +1100

    Early prototype code for a -java-agent jar building on Parfait
    
    To build it,   cd parfait-agent && ./build.sh
    To try it out,    cd parfait-agent/demo && ./run.sh
    
    Currently just has some hard-coded metrics; next steps are to
    wire up parfait-jmx and parfait-spring via monitoring.xml (in
    parfait-agent/src/main/resources)

<Prev in Thread] Current Thread [Next in Thread>