JMX Metrics
Self-Managed Commerce exposes application metrics via Java Monitoring Extensions (JMX).
Available Metrics
The following JMX metrics are available:
Log level updates
Reading and modifying log levels:
com.elasticpath.logging
JmxLogging
setLogLevel (operation)
getLogLevel (operation)
getLogFilename (attribute)
The setLogLevel
operation takes two parameters: loggerName
which is the name of the logger to set the log level for, and level
which is the log level to set the logger to.
The getLogLevel
returns the current log level for the loggerName
specified. If no exact match is found, the closest fallback match is returned. For example, if a log level for com.elasticpath
is set to INFO
, but we request com.elasticpath.extensions
, the method will return INFO
.
The getLogFilename
attribute returns the current log file name if logging is configured to write to a file.
Camel
Camel statistics for asynchronous messaging:
org.apache.camel
Core request-scoped caching
Core caching configuration and statistics for both application and OpenJPA data caches:
net.sf.ehcache
CacheConfiguration
-CacheManager
CacheStatistics
-CacheManager
Cortex Transactions
Cortex combined transaction statistics - counts, response times, rates:
EP-RelOS
EP-RelOS..COMBINED.ALL.
EP-RelOS..COMBINED.CREATE.
EP-RelOS..COMBINED.DELETE.
EP-RelOS..COMBINED.READ.
EP-RelOS..COMBINED.UPDATE.
Cortex per-resource transaction statistics - counts, response times, rates:
EP-RelOS
EP-RelOS..resource..ALL.
EP-RelOS..resource..CREATE.
EP-RelOS..resource..DELETE.
EP-RelOS..resource..READ.
EP-RelOS..resource..UPDATE.
Cortex request scope caching
Cortex request scope caching statistics:
EP-RelOS
EP-RelOS..RequestCache.*
Cortex request executor
Cortex request executor statistics:
EP-RelOS
EP-RelOS..executorService.*
Quartz
Quartz jobs in Batch Server and Search Server:
quartz
QuartzScheduler
BatchJMXScheduler
SearchServerJmxScheduler
Search indexing
Search Server indexing statistics:
com.elasticpath.search
Solr indexes:
solr/
Enabling JMX Remote Connections
To enable JMX remote connections to your production server, do the following:
Open your server’s startup script with a text editor.
Modify JAVA_OPTS to include the following:
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6969 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
This will allow a JMX client to connect to port
6969
.Restart the server.
note
If you are using CloudOps for Kubernetes to deploy your Self-Managed Commerce stack, you can enable the JMX by setting the enableJmx
, and enableJmxAuth
parameters in the Jenkins job deploy-or-delete-commerce-stack
.