Display an unhealthy score for a REST call

In this topic, an error is introduced to see how it affects the health score of the server. Edit the openedge.properties file, and add an activate.p procedure as the session activate procedure. This procedure is run when a session is started by REST call. In this example, the procedure explicitly raises an error so the HealthScanner will detect the problem.

  1. Use an editor to modify the openedge.properties file located in the instance-name\conf directory to specify sessionActivateProc=activate.p.
  2. Save changes to the openedge.properties file.
  3. Use the editor to create an activate.p procedure that returns an error and a string:
    RETURN ERROR "Fail".
  4. Save the file to instance\openedge\activate.p, which puts the file in the PROPATH for the instance.
  5. Restart the server:
    tcman pasoestart -restart
  6. Test the REST service again.
  7. This time there is an error introduced by the activate.p procedure. The unformatted output:
    The formatted output:
  8. Poll the details of the probes again with http://hostname:8899/health?view=details.

    As a result, the PASOE HealthScanner score lowered to 77%.

  9. Press Ctrl+Fto search for REST Ping Health. Stop at the first occurrence.

    Note: The value of 0 for the health is 0% healthy for the REST Ping Health . The HealthScanner acts as the warning light not a diagnostic tool for analyzing the issue. The next steps is to review the log files to discover the underlying cause of the lowered health score.
  10. Modify the openedge.properties file located in the instance-name\conf directory to reset the value for sessionActivateProc= to the original blank value to avoid any future problems.