×
Back to Geneos FAQ
Dashboard and Web Server - How do I monitor a Webserver using the JMX-Server Plugin?
- Modify the Webserver start script.
JMX\_PORT=50505 # these two lines enable remote monitoring/profiling of the application
JMX\_FLAGS="-Dcom.sun.management.jmxremote.port=$JMX\_PORT -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
From the preceding steps, uncommenting those variables will allow the Webserver to run with the JMX flags. Once a Java application is run with JMX flags, JMX managers/clients such as JConsole and our JMX-Server plugin will now be able to monitor the MBean attributes (such as Memory) of the Java application.
- Save the start script.
- Start the Webserver.
- Configure the JMX-Server Sampler.
<sampler name="centos_jmx_server_webserver">
<sampleInterval>
<data>1</data>
</sampleInterval>
<plugin>
<jmx-server>
<connectionSettings>
<generic>
<connectionSetting>
<name>serviceURL</name>
<value>
<var ref="WebServerJMX"></var>
</value>
</connectionSetting>
</generic>
</connectionSettings>
<aliases>
<alias>
<name>$1</name>
<value>
<data>java.lang:type=Memory,*</data>
</value>
<showCommands>
<headlines>false</headlines>
<tableColumns>false</tableColumns>
</showCommands>
</alias>
</aliases>
<columns>
<column>
<label>attribute</label>
<rowTemplate>
<data>HeapMemoryUsage</data>
</rowTemplate>
</column>
<column>
<label>committed</label>
<rowTemplate>
<data>$1.HeapMemoryUsage.committed</data>
</rowTemplate>
</column>
<column>
<label>init</label>
<rowTemplate>
<data>$1.HeapMemoryUsage.init</data>
</rowTemplate>
</column>
<column>
<label>max</label>
<rowTemplate>
<data>$1.HeapMemoryUsage.max</data>
</rowTemplate>
</column>
<column>
<label>used</label>
<rowTemplate>
<data>$1.HeapMemoryUsage.used</data>
</rowTemplate>
</column>
</columns>
<jproperties>
<jproperty>
<data>-Xint</data>
</jproperty>
</jproperties>
<idAttributes></idAttributes>
</jmx-server>
</plugin>
</sampler>
- Save the Gateway setup.
The resulting Dataview will look something like this:
This guide assumes that the Netprobe has been set up to run the JMX-Server plugin. For more information, see JMX plugin documentation.
["Geneos"]
["Geneos > Web Dashboard"]
["FAQ"]