Metrics Through the JMX
Self-Managed Commerce exposes application metrics via JMX (Java Monitoring Extensions). The following JMX metrics are available:
-
Camel statistics for asynchronous messaging
org.apache.camel -
Core caching configuration and statistics - for both application and OpenJPA data caches
net.sf.ehcacheCacheConfiguration<context>-CacheManagerCacheStatistics<context>-CacheManager -
Cortex combined transaction statistics - counts, response times, rates
EP-RelOSEP-RelOS.<host>.COMBINED.ALL.<scope>EP-RelOS.<host>.COMBINED.CREATE.<scope>EP-RelOS.<host>.COMBINED.DELETE.<scope>EP-RelOS.<host>.COMBINED.READ.<scope>EP-RelOS.<host>.COMBINED.UPDATE.<scope> -
Cortex per-resource transaction statistics - counts, response times, rates
EP-RelOSEP-RelOS.<host>.resource.<resourceName>.ALL.<scope>EP-RelOS.<host>.resource.<resourceName>.CREATE.<scope>EP-RelOS.<host>.resource.<resourceName>.DELETE.<scope>EP-RelOS.<host>.resource.<resourceName>.READ.<scope>EP-RelOS.<host>.resource.<resourceName>.UPDATE.<scope> -
Cortex request scope caching
EP-RelOSEP-RelOS.<host>.RequestCache.* -
Cortex executor statistics
EP-RelOSEP-RelOS.<host>.executorService.* -
Quartz jobs in Batch Server and Search Server
quartzQuartzSchedulerBatchJMXSchedulerSearchServerJmxScheduler -
Search Server indexing
com.elasticpath.search -
Solr indexes
solr/<indexName>
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=falseThis will allow a JMX client to connect to port
6969. -
Restart the server.
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.