Since Payara Server 184.108.40.206
Payara Server includes a HealthCheck Service that is disabled by default. When enabled it can periodically check the following performance metrics:
Host CPU Usage
Host Memory Usage
Payara Server’s JVM Garbage Collections
Payara Server’s JVM Heap Usage
CPU Usage of individual threads
Detects stuck threads
If there is a problem with any of these metrics and they exceed a
configurable threshold then a
notification is sent to the Notification Service. Notifications can be then sent
to one or more notifiers, e.g. a log file.
This allows operations teams to rapidly detect problems or work out what happened after these problems have occurred.
|The Host Memory Usage currently only works on Linux and BSD derivatives.|
If the Log Notifier is enabled, such events will be presented in the server’s log file like in the following sample:
[2016-05-24T03:52:28.690+0000] [Payara 4.1] [INFO] [fish.payara.nucleus.healthcheck.HealthCheckService] [tid: _ThreadID=72 _ThreadName=healthcheck-service-3 [timeMillis: 1464061948690] [levelValue: 800] [[ CPUC:Health Check Result:[[status=WARNING, message='CPU%: 75.6, Time CPU used: 267 milliseconds'']']]] ￼ ￼[2016-05-24T21:11:36.579+0000] [Payara 4.1] [SEVERE] [fish.payara.nucleus.healthcheck.HealthCheckService] [tid: _ThreadID=71 _ThreadName=healthcheck-service-3] [timeMillis: 1464124296579] [levelValue: 1000] [[ HOGT:Health Check Result:[[status=CRITICAL, message='Thread with <id-name>: 145-testing-thread-1 is a hogging thread for the last 59 seconds 999 milliseconds'']']]] ￼