Enabling Auto-Correction for Processes Test

eG Enterprise includes a default auto-correction script for the Processes running measure of Processes test. When a process that has been configured for monitoring stops, this script automatically executes and starts the process. To enable the auto-correction capability for the Processes test and to associate the default script with it, do the following:

  1. When configuring the parameters of Processes test (see Figure 1), you will find a correct flag that is set to No by default.


    Figure 1 : Configuring corrective scripts for Processes Test

  2. To enable the auto-correction capability, select the Yes option against correct.
  3. Upon selecting the Yes option, three new parameters, namely, ALARMTYPE, USERPARAMS, and CORRECTIVESCRIPT will appear. The alarmtype parameter indicates when the auto-corrective script should execute. You can set the corrective script to execute when a specific type of alarm is generated, by selecting an option from the ALARMTYPE list box. For example, if the Critical option is chosen from the ALARMTYPE list box, then the corrective script will run only when a critical alarm for the Processes test is generated. Similarly, if the Critical/Major option is chosen, then the corrective script will execute only when the eG Enterprise system generates critical or major alarms for the Processes test. In order to ensure that the corrective script executes regardless of the alarm type, select the Critical/Major/Minor option.
  4. The user-defined parameters that are to be passed to the corrective script are specified in the USERPARAMS text box. One of the following formats can be applied to the userparams specification:

    • exec@processName:command: In this specification, processName is the display name of the process pattern specified against the process parameter, and command is the command to be executed by the default script when the process(es) represented by the processName stops. For example, assume that the process parameter of ProcessTest has been configured in the following manner: Apache:*/opt/egurkha/manager/apache/bin/httpd*,Tomcat:*java*tomcat*, where Apache and Tomcat are the processNames or display names of the configured patterns. If auto-correction is enabled for these processes, then the userparams specification can be as follows:

      “exec@Apache:/opt/egurkha/manager/apache/bin/apachectl start,Tomcat: /opt/tomcat/bin/catalina.sh start”

      This indicates that if the processes configured under the processName “Apache” stop (i.e. */opt/egurkha/manager/apache/bin/httpd*), then the script will automatically execute the command “/opt/egurkha/manager/apache/bin/apachectl start” to start the processes. Similarly, if the “Tomcat” processes (i.e. *java*tomcat*) stop, the script will execute the command “/opt/tomcat/bin/catalina.sh start” to start the processes.

    • “command”: In this specification, “command” signifies the command to be executed when any of the processes configured for monitoring, stop. Such a format best suits situations where only a single process has been configured for monitoring, or, a single command is capable of starting all the configured processes. For example, assume that the process parameter has been configured to monitor IISWebSrv:*inetinfo*. Since only one process requires monitoring, the first format need not be used for configuring the userparams. Therefore, simplify specify the command, “net start World Wide Web Publishing Service”.


      • The userparams specification should be placed within double quotes if this value includes one or more blank spaces (eg.,”Apache:/opt/egurkha/bin/apachectl start”).
      • If the Processes test is being configured to run on a Windows system, then in the “command” specification, the process name alone should be enclosed within single quotes. Take the case of the World Wide Web Publishing Service example above. Here, your command specification for Windows should be: “net start ‘World Wide Web Publishing Service’”.
      • Note that if a processName configured in the process parameter does not have a corresponding entry in userparams (as discussed in format 1), then the auto-correction capability will not be enabled for these processes.
  5. Once the userparams are defined, specify none in the CORRECTIVESCRIPT text box to use the default auto-correction script.
  6. Finally, click the Update button.
  7. Once this is done, then the default corrective script associated with the No of processes measure of the Processes test will execute whenever the state of the measure changes to generate an alarm of the alarmtype chosen. For instance, if the alarmtype chosen is Critical, then the corrective script will execute whenever the state of the No of processes measure changes from Normal to Critical, Major to Critical, or Minor to Critical.