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.ymlto configurehealthCheckEndpointfor Nginx, Filebeat, Heartbeat, APM server, Metricbeat, and Bot Master video recording on the server installationRPA/conf/bot-agent-unit.ymlto configurehealthCheckEndpointfor the Worker and RPA Unit video recording on the server and unified installation with the Worker running on Java 8 or Java 21RPA/conf/bot-agent-nordp.ymlto configurehealthCheckEndpointfor Nginx, Filebeat, Heartbeat, APM server, Metricbeat, Bot Master video recording, and the Worker on the VDI installation with the Worker running on Java 8RPA/conf/bot-agent-nordp-java21.ymlto configurehealthCheckEndpointfor Nginx, Filebeat, Heartbeat, APM server, Metricbeat, Bot Master video recording, and the Worker on the VDI installation with the Worker running on Java 21RPA/conf/bot-agent-system.ymlto configurehealthCheckEndpointfor 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.conffile: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.ymlfile:http:
enabled: true
port: 5068Heartbeat. Update the port in the
RPA/heartbeat/heartbeat.ymlfile:http:
enabled: true
port: 5067Filebeat. Update the port in the
RPA/filebeat/filebeat.ymlfile.http:
enabled: true
port: 5066APM server. Update the port in the
RPA/apm-server/apm-server.ymlfile:apm-server:
host: "127.0.0.1:8203"Video recorder. In the Bot Agent configuration, update the port in the command line in the
processessection. The default values are as follows:8090for Bot Master video recorder8090<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
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.secondsdefines 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.intervaldefines 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.batfor the VDI installationRPA/bot-agent/bin/bot-agent.cmdfor the Unit Agent running on the server or unified installationRPA/bot-agent/bin/bot-master-service.batfor the Master Agent running on the server installationRPA/bot-agent/bin/bot-system-service.batfor the Master Agent running on the unified installation