Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Adding New Plugins to Health Monitor

Adding New Plugins to Health Monitor

You can add new plugins that add additional checks that might affect the application's health. For example, you can create a plugin that interacts with an external integration, such as an ESB or payment gateway.

  1. Create a Spring configuration file in the epmonitoring. xml file at /extensions/integration/ext-integration-webapp/src/main/webapp/WEB-INF/spring/monitoring.
  2. Add beans for each of the new StatusCheckerTarget classes to this file.
  3. To register the new beans, add them to one of the two lists used by the StatusChecker class.
    You must add them to the ep-health-monitoring-<WEBAPP>.xml file, where <WEBAPP> is name of your webapp, that is available only in your webapp. You must also add this file to your elastic-path-servlet.xml context.
    • Spring does merge lists. To add new values you must override the existing list, including all of its default values. The default values are:

       <util:list id="loadBalancerStatusCheckerTargetList" scope="prototype">
      <ref bean="applicationStatusCheckerTarget"/commerce-legacy/> 
      <ref bean="databaseStatusCheckerTarget"/commerce-legacy/></util:list> 
      <util:list id="additionalInfoStatusCheckerTargetList" scope="prototype">
    • Do not add the new beans to the ep-health-monitoring-plugin.xml file, because each webapp might have a different list of the touch points.

    When a load balancer starts the status checker, using the URL /status/lb , only the status checker targets in loadBalancerStatusCheckerTargetList are examined. This list should therefore only contain status checker targets that can instruct a load balancer to stop sending traffic to a given node.

    When any of the info URLs are invoked, such as /status/info.html or /status/info.json, the status checker targets in both lists are examined.