Skip to main content
Version: 10.3.2

Configure health check endpoints

After launching a process, the Master Agent is responsible for verifying that the process started successfully by querying the process health check endpoint, if one is defined. If no health check endpoint is configured, the Bot Agent does not verify the process health after its launch.

Define health check endpoint

To define a health check endpoint on the Bot Agent side, in the Bot Agent configuration file, update the healthCheckEndpoint value in the processes section. To disable the health check for a specific process, delete this value.

- id: rpa.nginx
expression: "cmd /c start /min /wait cmd /c start_nginx.bat"
directory: "../nginx"
tag: "nginx"
healthCheckEndpoint: "http://localhost:8444/nginx_health"

Update the following configuration files based on the installation type and Worker's Java version:

  • RPA/conf/bot-agent-master.yml to configure healthCheckEndpoint for Nginx, Filebeat, Heartbeat, APM server, Metricbeat, and Bot Master video recording on the server installation

  • RPA/conf/bot-agent-unit.yml to configure healthCheckEndpoint for the Worker and RPA Unit video recording on the server and unified installation with the Worker running on Java 8 or Java 21

  • RPA/conf/bot-agent-nordp.yml to configure healthCheckEndpoint for Nginx, Filebeat, Heartbeat, APM server, Metricbeat, Bot Master video recording, and the Worker on the VDI installation with the Worker running on Java 8

  • RPA/conf/bot-agent-nordp-java21.yml to configure healthCheckEndpoint for Nginx, Filebeat, Heartbeat, APM server, Metricbeat, Bot Master video recording, and the Worker on the VDI installation with the Worker running on Java 21

  • RPA/conf/bot-agent-system.yml to configure healthCheckEndpoint for Nginx, Filebeat, Heartbeat, APM server, and Metricbeat on the unified installation

To update a health check endpoint on the component side, configure the following values:

  • Nginx. Update the port in the RPA/nginx/conf/nginx.conf file:

    server {
    listen 127.0.0.1:8444;
    server_name localhost;
    location /nginx_health {
    default_type application/json;
    add_header Content-Type application/json always;
    return 200 '{"status": "UP", "timestamp": "$time_local"}';
    }
    }
  • Metricbeat. Update the port in the RPA/metricbeat/metricbeat.yml file:

    http:
    enabled: true
    port: 5068
  • Heartbeat. Update the port in the RPA/heartbeat/heartbeat.yml file:

    http:
    enabled: true
    port: 5067
  • Filebeat. Update the port in the RPA/filebeat/filebeat.yml file.

    http:
    enabled: true
    port: 5066
  • APM server. Update the port in the RPA/apm-server/apm-server.yml file:

    apm-server:
    host: "127.0.0.1:8203"
  • Video recorder. In the Bot Agent configuration, update the port in the command line in the processes section. The default values are as follows:

    • 8090 for Bot Master video recorder
    • 8090<UNIT_ID> for RPA Unit video recorder
     id: rpa.video.<master|unitX>
    expression: "cmd /c rpa-video-recorder.bat master \"${environment.recordings.root.dir}\" ${video.recording.length} 8090"
    directory: "../tools"
    tag: "recording"
    stop: "powershell ../scripts/ctrlc.ps1"
    autorestart: true
    startup: ${video.recording.enabled}
    healthCheckEndpoint: "http://localhost:8090/health/"
    initialDelay: 180
info

The health check port in the Bot Agent configuration must match the health check port in the component configuration.

Configure timeout and polling interval

To set up the timeout and polling interval for the Bot Agent, update the following configuration values:

  • healthcheck.timeout.seconds defines the maximum time within which a process must start and return a "healthy" response to the Bot Agent. If no "healthy" response is received from the component within the specified time, the component is restarted.

    The component continues restarting until the Bot Agent receives a "healthy" response, but only up to a maximum of seven consecutive attempts. The restore count parameter increases after each failed startup attempt.

    If the component fails to start successfully after seven attempts, it is stopped. If the component starts successfully, the restore count parameter is reset to 0.

  • healthcheck.polling.interval defines the polling interval for the health check endpoint.

For example:

-Dhealthcheck.timeout.seconds=300^
-Dhealthcheck.polling.interval=60^

Apply changes in the following files:

  • RPA/bot-agent/bin/bot-nordp service.bat for the VDI installation

  • RPA/bot-agent/bin/bot-agent.cmd for the Unit Agent running on the server or unified installation

  • RPA/bot-agent/bin/bot-master-service.bat for the Master Agent running on the server installation

  • RPA/bot-agent/bin/bot-system-service.bat for the Master Agent running on the unified installation