Deploy the Health Servlet on the Application Server

Server health monitoring prevents server failures and downtimes by ensuring that the server always retains sufficient capacity to conduct the required tasks.
casm172
Server health monitoring prevents server failures and downtimes by ensuring that the server always retains sufficient capacity to conduct the required tasks.
Ensure that your health servlet is installed on a separate instance of Tomcat server than CA SDM.
To deploy health servlet on the CA SDM Application Server, complete the following:
Follow these steps:
  1. Install Apache Tomcat 8.5.6 on the CA SDM Application Servers.
    Ensure that Tomcat is using JRE 1.8 and ensure that the Tomcat is not using the port number that is configured for the CA SDM components.
  2. (Optional) Configure SSL on the Tomcat servers that you have installed.
    For more information about configuring SSL, see How to Configure SSL Authentication.
  3. Log in to the application server and deploy the health servlet by completing the following steps:
    1. Copy the HealthServlet.war file from the $NX_ROOT\samples\HealthServlet\HealthServlet.WAR to the
      Apache Tomcat Webapps directory (TOMCAT_HOME
      /webapps).
    2. Restart Tomcat.
      The HealthServlet.war file is deployed in the webapps folder. To confirm the deployment, verify that the HealthServlet folder is created in the same webapps folder.
      After the successful deployment, the health servlet is ready to perform the health checks. It includes checking the status of the SLUMP and health of the CA SDM processes that are defined in the health.xml file. Find the health.xml file in the following location:
      TOMCAT_HOME/webapps/HealthServlet/WEB-INF/classes
  4. (Optional) Customize the health.xml based on your organization needs. For example, you want to monitor the webengine process. Add the process in the health.xml file with the correct tag name, as defined in CA SDM. Complete the following steps to find the tag name:
    1. Open the pdm_startup.i and pdm_startup files from the $NX_ROOT/pdmconf directory.
    2. Look for the process that you want to monitor in both the files.
    3. Find the corresponding tag name by matching the variables in both the files.
      For example, webengine process is defined in the
      pdm_startup.i
      file as follows:
      #define WEBENGINE(_TAG,_HOST,_SLUMP_NAME,_DOMSRVR, _CFG, _WEBDIRECTOR, _RPC_NAME)
    4. The webengine process is defined in the
      pdm_startup
      file as follows:
      WEBENGINE(webengine, $NX_LOCAL_HOST, web:local, domsrvr, $NX_ROOT/bopcfg/www/web.cfg, "", "rpc_srvr:%h")
      For creating a new process, the existing process is commented out in the pdm_startup file and new entries are added. Ensure that you look for the tag name in the new process entries.
      If you modify health.xml, ensure that the XML does not have any errors and that you restart Tomcat to reflect the changes that are made to the XML.
  5. Configure the chosen third-party tool to monitor the health of the application server at regular intervals. To monitor the health of the server, use the following HTTP URL:
    http(s)://application_server_name:port_number/HealthServlet/GetHealth
  6. After the successful configuration, the third-party tool starts monitoring the CA SDM application server health using the health servlet URL.
    For more information on how to deploy health servlet on the background and standby servers, see How to Enable Auto-Failover.
  7. Each server type has its own set of processes. If the SLUMP and all the CA SDM processes are working properly, the third-party tool will receive an HTTP 200 response from the Application server with a predefined payload, as follows:
    AA-Server-Status: All OK!
    AA-Server-Role: AP
     
    If a SLUMP or any of the CA SDM process (listed in health.xml) stops working and cannot resume, the third-party tool receives an HTTP 503 response from the application server with a predefined payload, as follows:
    AA-Server-Status: NOT OK!
    AA-Server-Role: AP
    You have successfully deployed the health servlet for the CA SDM Application Server.