Skip to content

Commit

Permalink
Introduce the new local-jmx managed server - so you don't have to go …
Browse files Browse the repository at this point in the history
…over jolokia if you are monitoring the same VM as where the agent is installed
  • Loading branch information
jmazzitelli committed Dec 1, 2016
1 parent 667a368 commit 6cfc0b0
Show file tree
Hide file tree
Showing 32 changed files with 1,504 additions and 153 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@
<param name="restart" type="bool" default-value="false" description="Should the server be restarted after shutdown?"/>
</operation-dmr>
<operation-dmr name="Suspend" internal-name="suspend">
<param name="timemout" type="int" description="Timeout in seconds to allow active connections to drain"/>
<param name="timeout" type="int" default-value="0" description="Timeout in seconds to allow active connections to drain"/>
</operation-dmr>
<operation-dmr name="Deploy" internal-name="deploy"/>
<operation-dmr name="Undeploy" internal-name="undeploy"/>
Expand Down Expand Up @@ -1060,7 +1060,7 @@
</resource-type-dmr>
</resource-type-set-dmr>

<!-- JMX metadata for monitoring Jolokia-enabled applications -->
<!-- JMX metadata for monitoring Jolokia-enabled or local JMX applications -->

<avail-set-jmx name="RuntimeAvailsJMX" enabled="true">
<avail-jmx name="VM Avail"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
<param name="restart" type="bool" default-value="false" description="Should the server be restarted after shutdown?"/>
</operation-dmr>
<operation-dmr name="Suspend" internal-name="suspend" >
<param name="timeout" type="int" default-value="0" description="Timeout in seconds to allow active connections to drain"/>
<param name="timeout" type="int" default-value="0" description="Timeout in seconds to allow active connections to drain"/>
</operation-dmr>
<operation-dmr name="Deploy" internal-name="deploy"/>
<operation-dmr name="Undeploy" internal-name="undeploy"/>
Expand Down Expand Up @@ -990,6 +990,89 @@
</resource-type-dmr>
</resource-type-set-dmr>

<!-- JMX metadata for monitoring Jolokia-enabled or local JMX applications -->

<avail-set-jmx name="RuntimeAvailsJMX" enabled="true">
<avail-jmx name="VM Avail"
interval="30"
time-units="seconds"
attribute="StartTime"
up-regex="[0123456789]+" />
</avail-set-jmx>

<avail-set-jmx name="MemoryPoolAvailsJMX" enabled="true">
<avail-jmx name="Memory Pool Avail"
interval="30"
time-units="seconds"
attribute="Valid"
up-regex="[tT].*" />
</avail-set-jmx>

<metric-set-jmx name="RuntimeMetricsJMX" enabled="true">
<metric-jmx name="VM Uptime"
interval="30"
time-units="seconds"
metric-units="milliseconds"
attribute="Uptime" />
<metric-jmx name="Used Heap Memory"
interval="30"
time-units="seconds"
metric-units="bytes"
object-name="java.lang:type=Memory"
attribute="HeapMemoryUsage#used" />
<metric-jmx name="Aggregate GC Collection Time"
interval="30"
time-units="seconds"
metric-units="milliseconds"
object-name="java.lang:type=GarbageCollector,name=*"
attribute="CollectionTime" />
</metric-set-jmx>

<metric-set-jmx name="MemoryPoolMetricsJMX" enabled="true">
<metric-jmx name="Initial"
interval="2"
time-units="minutes"
metric-units="bytes"
attribute="Usage#init" />
<metric-jmx name="Used"
interval="1"
time-units="minutes"
metric-units="bytes"
attribute="Usage#used" />
<metric-jmx name="Committed"
interval="1"
time-units="minutes"
metric-units="bytes"
attribute="Usage#committed" />
<metric-jmx name="Max"
interval="2"
time-units="minutes"
metric-units="bytes"
attribute="Usage#max" />
</metric-set-jmx>

<resource-type-set-jmx name="MainJMX" enabled="true">
<resource-type-jmx name="Runtime MBean"
resource-name-template="JMX [%_ManagedServerName%][%type%]"
object-name="java.lang:type=Runtime"
metric-sets="RuntimeMetricsJMX"
avail-sets="RuntimeAvailsJMX" >
<resource-config-jmx name="OS Name" object-name="java.lang:type=OperatingSystem" attribute="Name" />
<resource-config-jmx name="Java VM Name" attribute="VmName" />
</resource-type-jmx>
</resource-type-set-jmx>

<resource-type-set-jmx name="MemoryPoolJMX" enabled="true">
<resource-type-jmx name="Memory Pool MBean"
parents="Runtime MBean"
resource-name-template="JMX [%_ManagedServerName%] %type% %name%"
object-name="java.lang:type=MemoryPool,name=*"
metric-sets="MemoryPoolMetricsJMX"
avail-sets="MemoryPoolAvailsJMX" >
<resource-config-jmx name="Type" attribute="Type" />
</resource-type-jmx>
</resource-type-set-jmx>

<managed-servers>
<remote-dmr name="Another Remote Server"
enabled="false"
Expand All @@ -1002,6 +1085,11 @@
<local-dmr name="Local"
enabled="true"
resource-type-sets="Standalone Environment,Deployment,Web Component,EJB,Datasource,XA Datasource,JDBC Driver,Transaction Manager,Messaging,Socket Binding Group,Clustering,Hawkular" />

<remote-jmx name="Remote JMX" enabled="false" resource-type-sets="MainJMX,MemoryPoolJMX" url="http://localhost:8080/jolokia-war"/>

<local-jmx name="Local JMX" enabled="false" resource-type-sets="MainJMX,MemoryPoolJMX" />

</managed-servers>

<platform enabled="true">
Expand Down

0 comments on commit 6cfc0b0

Please sign in to comment.