Introduction
Introduction in Supervisor Installation and Configuration Guide.
Introduction#
The Supervisor module is a critical component that manages and optimises the operation of various Heal agents running on a target server.
It acts as a central orchestrator that ensures system stability, resource efficiency, and coordinated execution of agent-level tasks. The module is equipped with intelligent decision-making capabilities, driven by self-healing thresholds and external commands from the Heal control system.
Key Responsibilities:
Agent Supervision: Continuously monitors the health and status of other agents deployed on the target server to ensure seamless operation.
Load-Aware Control: Starts or stops agents dynamically based on self-heal thresholds, helping prevent excessive resource usage and ensuring minimal performance impact on the host system.
Forensics Triggering: Responds to command inputs from the Heal system to initiate forensic data collection, aiding in root cause analysis and proactive issue detection.
Discovery Scheduling: Manages the execution of the DiscoveryAgent with elevated privileges to perform deep system scans at scheduled intervals or on demand.
By integrating supervision, intelligent control, and responsive execution, the Supervisor module plays a pivotal role in maintaining the overall health and efficiency of the Heal ecosystem on any given target server.
Architecture#
This section provides the architecture of the Supervisor.

1. Commands (ForensicCmds, AgentOperationCmds, MaintenanceCmds, Custom actions, etc.) will be sent to the “command-messages” queue by respective modules. The supervisor controller will consume the “command-messages” queue and store the command messages in its queue.
2. The supervisor will issue a “GET” call (/command) for command details to the Supervisor Controller via HAProxy.
3. Then the Supervisor Controller validates the supervisor identifier from the received GET call against the commands stored in its queue.
4. If the Supervisor Identifier is valid, then the supervisor will get the respective command from the Supervisor Controller.
5. In this command, there will be information about agentType, agentIdentifier, scriptName, etc., using which the Supervisor will trigger the exact script in the target server.
6. Once the command/script is executed, then the supervisor will send the command response back to Heal (supervisor controller) via a “POST” call (/result).
7. Then, the supervisor controller will push the command response messages to the respective modules/queues.
For example: Forensic messages will be pushed to the a1-event-messages queue.
Prerequisites#
This section lists the prerequisites for installing and configuring Supervisor.
1. HEAL v2.0 or above should be installed.
2. The following services must be up and running:
- HAProxy
- RabbitMQ
- Percona
- Supervisor Controller
- Keycloak
- HEAL Control Center
- OpenSearch
- Redis
- Redis Microservice
3. Check for connectivity from the Supervisor to HEAL.
Execute telnet to HAProxy_IP:HAProxy_Port.
telnet <IP address> <port>
4. A maximum of 1 or 2 GB of hard disk space is needed on the target box for the Supervisor agent’s cache folder, component agent, log agent, forensics agent, and discovery agent.
Notes:
1. The folder structure must be maintained exactly as created by the Agents installer.
2. All future feature releases or fixes will rely on the structure and expect the necessary softlinks to be correctly configured.
3. Never start/stop/restart Supervisor with the ‘root‘ user.
Supervisor Configuration through API Calls#
This section details the supervisor and forensic agent through API calls.
Steps to Generate an Authorization Token#
Follow the steps below to generate an authorization token:
1. Install any REST API plugin or tool in the browser to make REST API calls.
(Recommended: Restlet Client—a REST API testing plugin for Chrome/Mozilla browser).
2. Generate an authorization token for Keycloak.
3. From the terminal, execute the following command to generate a token:
curl -d "client_id=admin-cli" -d "username=<Keyclaok_UserName>" -d "password=<Keyclaok_Password>" -d "grant_type=password" "http://<Keycloak_IP>:<http_Keycloak_Port>/auth/realms/master/protocol/openid-connect/token"
4. Post successful execution of the command, copy the access token value (highlighted) as shown in the following example:

5. Navigate to API Plugin.
Add a header with ‘Authorization’ and paste the access token in the value field as shown in the following example:

Supervisor and Forensic Agent Configuration through API Calls#
This section details how to add the following details to the Supervisor and forensic agent configuration via API calls, using sample JSONs.
1. Supervisor
2. Forensic Agent
Base URL: https://<keycloak_IP>:<keycloak_Port>/appsone-controlcenter/
To add a supervisor

Installation and Configuration
This section details the Supervisor Installation and configuration on the Target Server.
Pre-Installation#
Follow the steps below for pre-installation:
1. Copy the build below to the target server.
supervisor_<OS>_<arch>_<version>.tar.gz
For example:
Supervisor_AIX_64_2.1.2.13.tar.gz
Supervisor_HPUX_ia64_64-bit_2.1.2.13.tar.gz
Supervisor_Linux_s390x_2.1.2.13.tar.gz
Supervisor_Linux_2.1.2.13.tar.gz
Supervisor_Solaris_10_2.1.2.13.tar.gz
Supervisor_Solaris_10_AMD64_2.1.2.13.tar.gz
Supervisor_Windows_3.0.1.zip
2. Untar the build using the following commands:
For SOLARIS,
a. Decompress the file:
gunzip supervisor_<OS>_<arch>_<version>.tar.gz
Expected Output:
supervisor_<OS>_<arch>_<version>.tar
b. Extracts the contents of the tar file:
tar -xvf supervisor_<OS>_<arch>_<version>.tar
3. Post-extraction, the supervisor_<OS>_<arch>_<version>.tar folder displays the following files:
config/
– config.json
– EHSupervisorConfig.json
dependencies/
install.sh
install.sh.conf
install.sh.sig
keys/
– key.pub
schemas/
-basic.config.schema.json
-advanced.config.schema.json
-command.schema.json
-log.config.schema.json
scripts/
-agent_versions.sh
-agent_versions.sh.sig
-load_dependencies.sh
-load_dependencies.sh.sig
-RunDiscoveryAgent.sh
-RunDiscoveryAgent.sh.sig
-supervisor.sh.sig
-lib/
– init_supervisor_linux
-untar.sh
-untar.sh.sig
Supervisor binary
supervisor_monitor.sh.sig
supervisor.sh.sig
supervisor.sh
version.txt
SudoHelper utility
uninstall.sh
uninstall.sh.sig
Note: The Dependencies directory might have different contents. Confirm the same respectively.
Configuring Supervisor#
There are three configuration files for the supervisor.
1. Navigate to the path below.
<Installation_Path>/supervisor/config
It contains basic.config.json, advanced.config.json, log.config.json and schedule.config.json files.
2. basic.config.json – This file contains the configuration required to configure the supervisor, which enables the Supervisor on the target server to start communicating with the Supervisor Controller through HAProxy.
Configure all the attributes in this file to start the supervisor.
Note: We do not recommend you update the basic.config.json file once the Supervisor starts. A Supervisor restart is mandatory whenever changes are made to basic.config.json,
advanced.config.json, or log.config.json.
3. Configure the basic.config.json file as follows.
| Attribute | Description |
|---|---|
| backend_url | This is a mandatory attribute. This is the backend URL, specifying the host and port. <hostname/DNS name/IP>:<port> Add the HAProxy IP and port in the URL. For example: 192.0.2.116:4000. The placeholder is @@@BACKEND_URL@@@. |
| backend_tls | If the value is true, the supervisor will use the https protocol to connect with HEAL (HAProxy). If the value is false, it will use the http protocol to connect with HEAL (HAProxy). |
| package_url | This is a mandatory attribute. This is the package URL, specifying the host and port. <hostname/DNS name/IP>:<port> Add the HAProxy IP and port in the URL. For example: 192.0.2.116:4000. The placeholder is @@@DOWNLOAD_URL@@@. |
| package_tls | If the value is true, the supervisor will use the https protocol to connect with HEAL (HAProxy). If the value is false, it will use the http protocol to connect with HEAL (HAProxy). |
| Supervisor_threadpool | The number of threads to execute commands. |
| ID | This is the identifier of the Supervisor. The placeholder is @@@AGENT_ID@@@. |
For example:
{
"backend_url": "haproxy-node1.example:9998",
"backend_tls": true,
"package_url": "https://haproxy-node1.example:9998/downloads",
"package_tls": true,
"supervisor_lite" : false,
"supervisor_threadpool": 4,
"id": "203.0.113.11_sup_432f565c1329af53334e1f20dd3c7e6"
}
4. Configure the advanced. config.json file as follows.
| Attribute | Description |
|---|---|
| PackageExtension | This is a mandatory attribute. This is an extension of the agent package file that is downloaded from the server for installation. The default value is ‘.tar.gz’. |
| Platform_shell | This is a mandatory attribute. This attribute is used for setting the shell, which is used to execute scripts. For Linux/Unix, it is ‘sh’. |
| script_extension | This is a mandatory attribute. This is the extension of the script. It is ‘.sh’ for Linux. |
| apps_dir | This is a mandatory attribute. This is the directory where agents are installed. The placeholder is @@@AGENTS_DIR@@@. <agents_dir> Change the folder to the base folder path where all the agent-type folders are present. |
| cache_dir | This is a mandatory attribute. The placeholder is @@@CACHE_DIR@@@. The supervisor creates a cache folder in the specified path. Agent packages are stored in this directory after downloading from the RAN server. Before sending a request to the RAN server, the Supervisor checks if a package exists in this folder. If it exists, the download request is not sent to the RAN server. This is a mandatory attribute. Note: |
| java_dir | This is the JDK path. If the HEAL server does not send this path to the Supervisor, then the Supervisor picks the path from this file. |
| agent_selfheal_scripts_dir | This is a mandatory attribute. This is the location of the selfheal files. The default value is selfheal. Do not modify this attribute. |
| cache_max_count | This is a mandatory attribute. The minimum value for this parameter is 0. The maximum recommended value is 5. This indicates the number of recent files that can be present in the cache directory. If the value is 0, the Supervisor deletes the downloaded file from the cache directory after completing the action. |
| public_key_location | This is a mandatory attribute. <keys_directory>/<public key file location> The public key is shared with the Supervisor. Do not modify the value of this attribute. The default value is ./keys/key.pub. |
| custom_public_key_location | This is a mandatory attribute. <custom_keys_directory>/<custom key file location> This is the location where the public key file is present for custom actions. The placeholder is @@@CUSTOM_KEY_PATH@@@/keys/key.pub. |
| selfheal_url | This is a mandatory attribute. Every time the Supervisor executes the selfheal.sh script. The supervisor will send the selfheal scripts output to HEAL via the following URL: /agentHealthStatus |
| command_url | This is a mandatory attribute. The supervisor connects to the supervisor controller and gets the command details via the following URL: /command |
| result_url | This is a mandatory attribute. Every time the supervisor executes any command other than the self-heal script, Supervisor sends the result of execution to HEAL via the following URL: /result |
| default_process_timeout | This is a mandatory attribute. This is the timeout in seconds for any command that the supervisor receives. If the supervisor cannot complete the command execution within this time, then it declares it as a command timeout. |
| default_selfheal_Interval | This is a mandatory attribute. This is the frequency in minutes at which the Supervisor executes the selfheal.sh script. |
| connection_retry_delay | This is a mandatory attribute. If the connection to HEAL fails, the supervisor will attempt to reconnect at the configured interval. The Supervisor attempts to reconnect indefinitely. The value should be in seconds. |
| datachannel_timeout | This is a mandatory attribute. The supervisor sends the command execution result to the HEAL server. The supervisor creates a session to send the result. This is the session timeout for the command result in seconds. |
| downloadchannel_timeout | This is a mandatory attribute. The Supervisor gives a download request for files. If the download does not succeed within the specified time, the supervisor declares it a timeout. |
| receiveTask_Interval | This is a mandatory attribute. This is the frequency in seconds at which the Supervisor sends the command requests over the /command URL to the HEAL server. |
| long_polling_timeout | This is a mandatory attribute. |
| config_scan_interval | This is the frequency in seconds at which the Supervisor scans the advanced.config.json file. If you change this config file, then Supervisor should read the updates online without requiring a restart. |
For example:
{
"PackageExtension": ".tar.gz",
"Platform_shell": "sh",
"script_extension": ".sh",
"apps_dir": "<agent path>/AgentInstaller/Agent",
"cache_dir": "<agent path>/opt/heal/AgentInstaller/Agent",
"java_dir": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b08-1.el7_9.x86_64/jre",
"agent_selfheal_scripts_dir": "selfheal",
"cache_max_count": 1,
"public_key_location": "./keys/key.pub",
"custom_public_key_location" : "@@@CUSTOM_KEY_PATH@@@/keys/key.pub",
"selfheal_url" : "/agentHealthStatus",
"command_url" : "/command",
"result_url" : "/result",
"default_process_timeout": 300,
"default_selfheal_Interval": 10,
"connection_retry_delay": 30,
"datachannel_timeout": 60,
"downloadchannel_timeout": 60,
"receiveTask_Interval" : 5,
"long_polling_timeout": 1800,
"config_scan_interval": 60
}
5. Configure the log.config.json file as follows.
The supervisor creates Supervisor, ShellCommandRunner, ThreadPool, HttpsClient, Process, ResultSender, SignatureVerifier, TaskReceiver, ScheduledJobsManager, and Audit types of log files.
Supervisor.log – This file contains entry-level logs.
supervisor_daemon.log –
ShellCommandRunner.log – This file contains command execution logs.
ThreadPool.log – This file contains worker thread logs.
HttpsClient – This file contains HTTP connection-related logs.
Process.log – This file contains process logs.
ResultSender.log – This file contains result thread-related logs. Resultsender has a thread that sends the results to the HEAL server.
SignatureVerifier.log – This file contains signature verification logs.
TaskReceiver.log – This file contains logs related to threads that receive commands from the HEAL server.
ScheduledJobsManager.log – This file contains logs related to all the tasks that are scheduled inside the Supervisor.
SudoHelper.log – This file contains the execution logs of the sudoHelper utility.
ThreadPool.log –
Audit – This file contains audit logs. Command execution script names that the Supervisor executes are part of this log file.
Each of the above log files includes the following attributes:
| Attribute | Description |
|---|---|
| log_folder | This is the folder where log files are present. |
| console_level | This is the level of the console log. Possible values are ERROR, WARN, INFO, DEBUG, TRACE, OFF |
| off | This is to turn OFF the console logging. |
| console_pattern | This pattern will be used as the console log format by the respective utility. |
| file_level | This is the level of the file log. Possible values are ERROR, WARN, INFO, DEBUG, TRACE, OFF |
| file_pattern | This pattern will be used as a log file format by the respective utility. |
| file_rotation_number | This is the maximum number of log files that can exist in the logs folder for that single log file type. If the number of log files exceeds this number, then the Supervisor deletes the oldest log file. |
| file_rotation_size | This is the maximum size for an individual log file. If the file size goes beyond this, then the Supervisor creates a new log file. 2M – 2 MB, 2K – 2 KB, 2B – 2 Bytes |
For example:
{
"logging": {
"Supervisor" : {
"log_folder": "logs",
"console_level": "off",
"console_pattern": "[%H:%M:%S:%f] [%^%l%$] [%n] [%t] %v",
"file_level": "info",
"file_pattern": "[%H:%M:%S:%f] [%^%l%$] [%t] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
},
"ShellCommandRunner" : {
"log_folder": "logs",
"console_level": "off",
"console_pattern": "[%H:%M:%S:%f] [%^%l%$] [%n] [%t] %v",
"file_level": "info",
"file_pattern": "[%H:%M:%S:%f] [%^%l%$] [%t] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
},
"ThreadPool" : {
"log_folder": "logs",
"console_level": "off",
"console_pattern": "[%H:%M:%S:%f] [%^%l%$] [%n] [%t] %v",
"file_level": "info",
"file_pattern": "[%H:%M:%S:%f] [%^%l%$] [%t] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
},
"HttpsClient" : {
"log_folder": "logs",
"console_level": "off",
"console_pattern": "[%H:%M:%S:%f] [%^%l%$] [%n] [%t] %v",
"file_level": "info",
"file_pattern": "[%H:%M:%S:%f] [%^%l%$] [%t] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
},
"Process" : {
"log_folder": "logs",
"console_level": "off",
"console_pattern": "[%H:%M:%S:%f] [%^%l%$] [%n] [%t] %v",
"file_level": "info",
"file_pattern": "[%H:%M:%S:%f] [%^%l%$] [%t] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
},
"ResultSender" : {
"log_folder": "logs",
"console_level": "off",
"console_pattern": "[%H:%M:%S:%f] [%^%l%$] [%n] [%t] %v",
"file_level": "info",
"file_pattern": "[%H:%M:%S:%f] [%^%l%$] [%t] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
},
"SignatureVerifier" : {
"log_folder": "logs",
"console_level": "off",
"console_pattern": "[%H:%M:%S:%f] [%^%l%$] [%n] [%t] %v",
"file_level": "info",
"file_pattern": "[%H:%M:%S:%f] [%^%l%$] [%t] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
},
"TaskReceiver" : {
"log_folder": "logs",
"console_level": "off",
"console_pattern": "[%H:%M:%S:%f] [%^%l%$] [%n] [%t] %v",
"file_level": "info",
"file_pattern": "[%H:%M:%S:%f] [%^%l%$] [%t] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
},
"ScheduledJobsManager" : {
"log_folder": "logs",
"console_level": "off",
"console_pattern": "[%H:%M:%S:%f] [%^%l%$] [%n] [%t] %v",
"file_level": "info",
"file_pattern": "[%H:%M:%S:%f] [%^%l%$] [%t] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
},
"SudoHelper" : {
"log_folder": "logs",
"console_level": "off",
"console_pattern": "[%H:%M:%S:%f] [%^%l%$] [%n] [%t] %v",
"file_level": "info",
"file_pattern": "[%H:%M:%S:%f] [%^%l%$] [%t] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
},
"Audit" : {
"log_folder": "audit_logs",
"console_level": "off",
"console_pattern": "NULL",
"file_level": "info",
"file_pattern": "[%D %H-%M-%S.%f %z] %v",
"file_rotation_number":5,
"file_rotation_size":"2M"
}
}
}