Posts tagged JMX
Payara Server provides many metrics within JMX beans. The most interesting metrics are the statistics around pools for HTTP threads and JDBC Connection pooling.
On the other hand, Payara Server also implements the MicroProfile Metrics specification. The retrieval of useful metrics from the running instance in the areas of CPU, memory, Class loading, and other MicroProfile specifications (like Fault Tolerance), are possible through the implementation of the MicroProfile Metrics in Payara Server.
(This is an update of this blog written in 2016: Making Use of Payara Server's Monitoring Service)
Payara Server has for a while now included a JMX Monitoring Service which can be used to log information from MBeans to the server log. Using the JMX Monitoring Service, you can monitor information about the JVM runtime such as heap memory usage and threading, as well as more detailed information about the running Payara Server instance. The information is logged as a series of key-value pairs prefixed with the string PAYARA-MONITORING:, making it easy to filter the output using tools such as Logstash or fluentd.
Previously in GlassFish and Payara Server, if you wanted to monitor the status of your application's MBeans, you would have to rely mostly on external programs to capture the data. In Payara Server 174, we integrated the JMX Monitoring service with our existing notification service, meaning that you can now remotely receive monitoring data via any of our notifiers, from email to Slack.
The Payara Server 173 release included a technical preview of the REST Monitoring Service, which is a service to expose JMX monitoring MBeans over HTTP. As of Payara Server 174, this feature is no longer in tech preview.
One big problem with JMX is that JMX monitoring uses RMI (Remote Method Invocation), which can lead to a few nightmares if, for example, you have a firewall which blocks connections over RMI ports. The REST monitoring service in Payara Server now provides a service which will be very familiar to users of Jolokia in that it makes this monitoring data available over HTTP, making the data available in a more standard format (JSON) and accessible over a standard HTTP connection.
In the fourth part of our continuing series on alternatives for commercial Oracle GlassFish features we are looking at the JMX Monitoring Service & the Payara HealthCheck Service as possible replacements for Oracle's Monitoring Scripting Client.